Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set-scm-tag functionality needed for Subversion #342

Closed
hatleyt opened this issue Mar 27, 2019 · 1 comment · Fixed by #694
Closed

set-scm-tag functionality needed for Subversion #342

hatleyt opened this issue Mar 27, 2019 · 1 comment · Fixed by #694
Milestone

Comments

@hatleyt
Copy link

hatleyt commented Mar 27, 2019

In working w/scripting some release:prepare -like functionality for RCP-based applications (Maven's release plugin doesn't directly support the manifest-based RCP builds, Tycho plugin doesn't support the tagging), I've come across the initial enhancement request at:

#182

...but in reading the comments it appears the Git-only support was implemented via the set-scm-tag goal (never found the discussed documentation that would explain this was Git-only support).

Here's my script (running in Jenkins v2.160 Windows Batch Command):

@echo OFF
echo. Creating tag '%project%/tags/%tag_name%' using MVN tag process...
echo.
echo Using Maven to update entries...
@echo ON
mvn -DnewTag=%tag_name% versions:set-scm-tag -e
echo ... entries updated.
echo.
mvn -Dtag=%tag_name% scm:tag
echo ...tagging completed.

My attempts at utilizing set-scm-tag on a Subversion-supported project results in the following error/stacktrace:

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for combine-payroll-project 1.0.6-SNAPSHOT:
[INFO]
[INFO] combine-payroll-project ............................ FAILURE [ 2.937 s]
[INFO] combine-payroll .................................... SKIPPED
[INFO] combine-payroll-wix ................................ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 19.391 s
[INFO] Finished at: 2019-03-20T15:23:15-07:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:versions-maven-plugin:2.7:set-scm-tag (default-cli) on project combine-payroll-project: Could not update the SCM tag -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:versions-maven-plugin:2.7:set-scm-tag (default-cli) on project combine-payroll-project: Could not update the SCM tag
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
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:956)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
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: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.apache.maven.plugin.MojoFailureException: Could not update the SCM tag
at org.codehaus.mojo.versions.SetScmTagMojo.update (SetScmTagMojo.java:72)
at org.codehaus.mojo.versions.AbstractVersionsUpdaterMojo.process (AbstractVersionsUpdaterMojo.java:314)
at org.codehaus.mojo.versions.AbstractVersionsUpdaterMojo.execute (AbstractVersionsUpdaterMojo.java:250)
at org.codehaus.mojo.versions.SetScmTagMojo.execute (SetScmTagMojo.java:53)
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:956)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
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: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)
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.

Subversion support could use 'newTag' to change the , , and elements all at once, or new args could be added for each if they needed to be changed individually (we keep the 3 matching all the time, not sure if others do the same).

This would really be helpful when trying to configure RCP-based/Subversion-supported projects for CI/CD processes.

@jarmoniuk
Copy link
Contributor

Partial support is already included: see set-scm-tag, but it only allows resetting existing elements to new values, it will barf on a non-existing entry.

I'm working on an enhancement to that so that it'll also be possible to define scm elements which don't currently exist in the POM.

jarmoniuk added a commit to jarmoniuk/versions-maven-plugin that referenced this issue Sep 16, 2022
jarmoniuk added a commit to jarmoniuk/versions-maven-plugin that referenced this issue Sep 16, 2022
jarmoniuk added a commit to jarmoniuk/versions-maven-plugin that referenced this issue Sep 16, 2022
@slawekjaranowski slawekjaranowski linked a pull request Sep 17, 2022 that will close this issue
@slawekjaranowski slawekjaranowski added this to the 2.13.0 milestone Sep 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants