aleksandr-m / gitflow-maven-plugin

The Git-Flow Maven Plugin supports various Git workflows, including GitFlow and GitHub Flow. This plugin runs Git and Maven commands from the command line.
https://aleksandr-m.github.io/gitflow-maven-plugin/
Apache License 2.0
490 stars 182 forks source link

Problem releasing with Java 11 #265

Closed pethers closed 3 years ago

pethers commented 3 years ago

`WARNING: Failed to get value for environment variable: [java.ext.dirs]

at com.amashchenko.maven.plugin.gitflow.AbstractGitFlowMojo.executeCommand (AbstractGitFlowMojo.java:1170)
at com.amashchenko.maven.plugin.gitflow.AbstractGitFlowMojo.executeMvnCommand (AbstractGitFlowMojo.java:1112)
at com.amashchenko.maven.plugin.gitflow.AbstractGitFlowMojo.mvnRun (AbstractGitFlowMojo.java:1058)
at com.amashchenko.maven.plugin.gitflow.GitFlowReleaseMojo.execute (GitFlowReleaseMojo.java:285)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)`

Think plexus-utils need to be upgraded to resolve this. https://mvnrepository.com/artifact/org.codehaus.plexus/plexus-utils

aleksandr-m commented 3 years ago

@pethers Please show the command you are running. What is in preReleaseGoals / postReleaseGoals?

pethers commented 3 years ago

used `

com.amashchenko.maven.plugin
        <artifactId>gitflow-maven-plugin</artifactId>
        <configuration>
            <gitFlowConfig>
                <developmentBranch>master</developmentBranch>
            </gitFlowConfig>
            <installProject>true</installProject>
            <postReleaseGoals>deploy</postReleaseGoals>
            <argLine>-DperformRelease=true</argLine>
        </configuration>
    </plugin>`

and

steps { sh "git reset --hard origin/master" sh "git checkout -f master" sh "git reset --hard origin/master" sh "mvn -B clean" sh "mvn -B gitflow:release " }

pethers commented 3 years ago

Moved back to maven release plugin, but happy if I can get this to work again.

aleksandr-m commented 3 years ago

@pethers It is working fine for me. Where do you set java.ext.dirs variable?

pethers commented 3 years ago

Didn't set any java.ext.dirs since it is not used by Java 11.

aleksandr-m commented 3 years ago

@pethers Can you create some test project which reproduces this issue?

aleksandr-m commented 3 years ago

@pethers @foofighter69 Some test project please.