multi-module-maven-release-plugin
multi-module-maven-release-plugin copied to clipboard
Skipping tag pushing doesn't work
I use mvn -DpushTags=false com.github.danielflower.mavenplugins:multi-module-maven-release-plugin:release Despite using option to skip pushing tags, tags are tried to be pushed anyway. As GIT user has no rights to push, build fails:
[INFO] About to tag the repository with release-2.0.0
[ERROR]
[ERROR]
[ERROR]
[ERROR] ************************************
[ERROR] Could not execute the release plugin
[ERROR] ************************************
[ERROR]
[ERROR]
[ERROR] There was an error while accessing the Git repository. The error returned from git was:
[ERROR] https://*****: *****/info/refs?service=git-receive-pack not found: Not Found
[ERROR] Stack trace:
[ERROR] org.eclipse.jgit.api.errors.TransportException: https://*****: https://*****/info/refs?service=git-receive-pack not found: Not Found
at org.eclipse.jgit.api.PushCommand.call(PushCommand.java:180)
at com.github.danielflower.mavenplugins.release.RemoteTagPusher.pushTags(LocalGitRepo.java:305)
at com.github.danielflower.mavenplugins.release.LocalGitRepo.tagAndPushRepo(LocalGitRepo.java:185)
at com.github.danielflower.mavenplugins.release.ReleaseMojo.tagAndPushRepo(ReleaseMojo.java:191)
at com.github.danielflower.mavenplugins.release.ReleaseMojo.execute(ReleaseMojo.java:139)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
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:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.eclipse.jgit.errors.NoRemoteRepositoryException: https://github.tools.sap/c4suitex-CloudMagic/release.git: https://github.tools.sap/c4suitex-CloudMagic/release.git/info/refs?service=git-receive-pack not found: Not Found
at org.eclipse.jgit.transport.TransportHttp.createNotFoundException(TransportHttp.java:496)
at org.eclipse.jgit.transport.TransportHttp.connect(TransportHttp.java:527)
at org.eclipse.jgit.transport.TransportHttp.openPush(TransportHttp.java:439)
at org.eclipse.jgit.transport.PushProcess.execute(PushProcess.java:160)
at org.eclipse.jgit.transport.Transport.push(Transport.java:1346)
at org.eclipse.jgit.api.PushCommand.call(PushCommand.java:170)
... 26 more
[ERROR]
After tracing in source it seems that correct parameter is:
-Dpush=false
Probably it's because of inconsistency between property & alias definition:
@Parameter(alias = "pushTags", defaultValue="true", property="push")