having trouble with releasing to jenkins-ci.org

334 views
Skip to first unread message

Michael Michael

unread,
Mar 1, 2018, 2:49:04 AM3/1/18
to Jenkins Developers
hi there,

i performed all the steps and got permission to upload our plugin using the https://github.com/jenkins-infra/repository-permissions-updater/blob/master/permissions/plugin-apprenda.yml process.

However, i can't get maven to execute the full process correctly.

A few notes on my environment first
* I am using Windows 10 x64
* I am using subversion for windows, installed from the link on the jenkins wiki
* I am using git shell for all my operations (i tried cygwin initially and saw the mention in https://wiki.jenkins.io/display/JENKINS/Hosting+Plugins that it is not advised)
* I created an SSH key , imported it to my github account, and started an SSH server using GIT Shell
* I put my creds in a simple ~/.m2/settings.xml (I am using plain text passwords for now)
*My github account username is michmike while my Jenkins CI account is apprenda, with different passwords of course
*I run my maven command "mvn release:prepare release:perform"

No matter what troubleshooting step i tried, i always get this error. Any ideas on how to proceed?

[INFO] --- maven-release-plugin:2.5.2:prepare (default-cli) @ apprenda ---
[INFO] Resuming release from phase 'scm-commit-release'
[INFO] Checking in modified POMs...
[INFO] Executing: cmd.exe /X /C "svn --non-interactive commit --file C:\Users\mmichael\AppData\Local\Temp\maven-scm-1221881271.commit --targets C:\Users\mmichael\AppData\Local\Temp\maven-scm-8041922886922418610-targets"
[INFO] Working directory: C:\Users\mmichael\Documents\GitHub\apprenda-plugin
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.706 s
[INFO] Finished at: 2018-03-01T01:08:39-06:00
[INFO] Final Memory: 17M/304M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.5.2:prepare (default-cli) on project apprenda: Unable to commit files
[ERROR] Provider message:
[ERROR] The svn command failed.
[ERROR] Command output:
[ERROR] svn: E155007: 'C:\Users\mmichael\Documents\GitHub\apprenda-plugin\pom.xml' is not a working copy
[ERROR]
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
~\Documents\GitHub\apprenda-plugin [master ≡ +1 ~2 -0 !]>

Ullrich Hafner

unread,
Mar 1, 2018, 4:24:46 AM3/1/18
to Jenkins Developers
Seems that somehow SVN is still configured (I don’t see it in your pom). Do you have some Subversion folders in your working copy?
You don’t need subversion, everything is stored in git.

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/831de64c-1d27-4f7f-a554-2fc4bcff8d40%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

signature.asc

Michael Michael

unread,
Mar 1, 2018, 12:15:13 PM3/1/18
to Jenkins Developers
thank you Ullrich for the reply.

i don't see any subversion folders in my git repo working folder. is there something specific i should be looking for?
i deleted everything and cloned my repo again and i got the same error.

Oleg Nenashev

unread,
Mar 1, 2018, 12:36:14 PM3/1/18
to Jenkins Developers
Also check your global Maven settings. Maybe it overrides release destinations there.
The plugin's POM XML looks good to me (repo.jenkins-ci.org should be ideally switched to HTTPs).

BR, Oleg

Michael Michael

unread,
Mar 1, 2018, 1:53:29 PM3/1/18
to Jenkins Developers
I updated the repo.jenkins-ci.org to be https.
I also checked my maven\conf\settings.xml and it is the vanilla one that comes with installation (everything is commented out).

any other ideas? thanks for the pointers so far.

Michael Michael

unread,
Mar 8, 2018, 8:15:47 PM3/8/18
to Jenkins Developers
is there anyone that can provide additional guidance? i installed a linux virtual machine running CentOS 7.4 and i am still hitting the same issue.
Some additional, but important details.

* If i just run "mvn deploy", my package is uploaded the artifactory. so my creds in settings.xml are accurate and working
* if i run "ssh -T g...@github.com" i am able to successfully login to github using SSH

but the mvn release fails with exactly the same error.
can someone help?

[INFO] Working directory: /root/apprenda-plugin
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.024 s
[INFO] Finished at: 2018-03-09T01:15:00Z
[INFO] Final Memory: 18M/259M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.5.2:prepare (default-cli) on project apprenda: Unable to commit files
[ERROR] Provider message:
[ERROR] The svn command failed.
[ERROR] Command output:
[ERROR] svn: E155007: '/root/apprenda-plugin/pom.xml' is not a working copy
[ERROR]
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.5.2:prepare (default-cli) on project apprenda: Unable to commit files
Provider message:
The svn command failed.
Command output:
svn: E155007: '/root/apprenda-plugin/pom.xml' is not a working copy

    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:213)
    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:955)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
    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.apache.maven.plugin.MojoFailureException: Unable to commit files
Provider message:
The svn command failed.
Command output:
svn: E155007: '/root/apprenda-plugin/pom.xml' is not a working copy

    at org.apache.maven.plugins.release.PrepareReleaseMojo.prepareRelease (PrepareReleaseMojo.java:294)
    at org.apache.maven.plugins.release.PrepareReleaseMojo.execute (PrepareReleaseMojo.java:240)
    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:955)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
    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.apache.maven.shared.release.scm.ReleaseScmCommandException: Unable to commit files
Provider message:
The svn command failed.
Command output:
svn: E155007: '/root/apprenda-plugin/pom.xml' is not a working copy

    at org.apache.maven.shared.release.phase.AbstractScmCommitPhase.checkin (AbstractScmCommitPhase.java:165)
    at org.apache.maven.shared.release.phase.AbstractScmCommitPhase.performCheckins (AbstractScmCommitPhase.java:145)
    at org.apache.maven.shared.release.phase.ScmCommitPreparationPhase.runLogic (ScmCommitPreparationPhase.java:76)
    at org.apache.maven.shared.release.phase.AbstractScmCommitPhase.execute (AbstractScmCommitPhase.java:78)
    at org.apache.maven.shared.release.DefaultReleaseManager.prepare (DefaultReleaseManager.java:234)
    at org.apache.maven.shared.release.DefaultReleaseManager.prepare (DefaultReleaseManager.java:169)
    at org.apache.maven.shared.release.DefaultReleaseManager.prepare (DefaultReleaseManager.java:146)
    at org.apache.maven.shared.release.DefaultReleaseManager.prepare (DefaultReleaseManager.java:107)
    at org.apache.maven.plugins.release.PrepareReleaseMojo.prepareRelease (PrepareReleaseMojo.java:286)
    at org.apache.maven.plugins.release.PrepareReleaseMojo.execute (PrepareReleaseMojo.java:240)
    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:955)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
    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)

Daniel Beck

unread,
Mar 8, 2018, 8:34:42 PM3/8/18
to jenkin...@googlegroups.com

> On 9. Mar 2018, at 02:15, Michael Michael <mich...@gmail.com> wrote:
>
> can someone help?
>

Why are you specifying m-r-p 2.5.2 in your POM?

Michael Michael

unread,
Mar 8, 2018, 8:56:58 PM3/8/18
to Jenkins Developers
i removed that line right now, cleaned up the target and the .m2\repository folders and still seeing the same failure.
is there anything specific i need to be setting up for SVN and its communication/interaction with git.

Daniel Beck

unread,
Mar 8, 2018, 8:59:12 PM3/8/18
to jenkin...@googlegroups.com

> On 9. Mar 2018, at 02:56, Michael Michael <mich...@gmail.com> wrote:
>
> i need to be setting up for SVN and its communication/interaction with git.

It's unclear why you're asking this. Subversion should not be involved at all. Git is its replacement for us. Whatever link you followed is probably long obsolete, as the Jenkins project does not use SVN anymore.

Michael Michael

unread,
Mar 8, 2018, 9:00:41 PM3/8/18
to Jenkins Developers
if i also run "svn status" i get 
<<
[root@jenkinsslavecentos apprenda-plugin]# svn status
svn: warning: W155007: '/root/apprenda-plugin' is not a working copy

Michael Michael

unread,
Mar 8, 2018, 9:03:18 PM3/8/18
to Jenkins Developers
hi Daniel,

may i ask what these commands do then in the output trail? It seems that SVN is called in here, and this is the command that is failing
<<
[INFO] Resuming release from phase 'scm-commit-release'
[INFO] Checking in modified POMs...
[INFO] Executing: /bin/sh -c cd /root/apprenda-plugin && svn --non-interactive commit --file /tmp/maven-scm-1675137483.commit --targets /tmp/maven-scm-9172792877660663843-targets
[INFO] Working directory: /root/apprenda-plugin

Michael Michael

unread,
Mar 8, 2018, 10:37:09 PM3/8/18
to Jenkins Developers
one last thing. not sure if it is relevant or not, but i am using github's two factor authentication for logging in. this is required by my organization.

Daniel Beck

unread,
Mar 8, 2018, 10:37:33 PM3/8/18
to jenkin...@googlegroups.com

> On 9. Mar 2018, at 03:03, Michael Michael <mich...@gmail.com> wrote:
>
> may i ask what these commands do then in the output trail? It seems that SVN is called in here, and this is the command that is failing
> <<
> [INFO] Resuming release from phase 'scm-commit-release'
> [INFO] Checking in modified POMs...
> [INFO] Executing: /bin/sh -c cd /root/apprenda-plugin && svn --non-interactive commit --file /tmp/maven-scm-1675137483.commit --targets /tmp/maven-scm-9172792877660663843-targets
> [INFO] Working directory: /root/apprenda-plugin
> >>
>

Are you working in a Git repository (working copy), or did you download the sources? Perhaps it checks if you're in a Git repo, and if not, falls back to SVN? IOW, in the directory that also contains pom.xml, does `git status` show an error?

Besides that, https://github.com/jenkinsci/apprenda-plugin/blob/b0e8592ba5b83f3ee63802bdf9a83ee14c84d3bc/pom.xml#L54 should be long obsolete, so it's unclear to me how you managed to deploy a snapshot with that. (Unrelated to SCM problems though.)

Michael Michael

unread,
Mar 8, 2018, 10:46:21 PM3/8/18
to Jenkins Developers
i am working in a git repository. see command output below.
<<
[root@jenkinsslavecentos apprenda-plugin]# git status
# On branch master
nothing to commit, working directory clean
[root@jenkinsslavecentos apprenda-plugin]# dir pom.xml
pom.xml
[root@jenkinsslavecentos apprenda-plugin]# pwd
/root/apprenda-plugin
[root@jenkinsslavecentos apprenda-plugin]# git remote -v

Michael Michael

unread,
Mar 8, 2018, 10:48:57 PM3/8/18
to Jenkins Developers
i added the distribution management section while i was troubleshooting to see if i could find what was wrong.
i tried everything i would read online..and this was one of them.

Baptiste Mathus

unread,
Mar 9, 2018, 5:32:36 AM3/9/18
to Jenkins Developers
You committed & push the release.properties and pom.xml.releaseBackup files, delete and add them to .gitignore to never ever do it again.

Also, the version in the pom.xml should always contain -SNAPSHOT in the end. Only the release plugin will remove it when releasing.

Cheers

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/9dbd768f-c3c8-47f5-a59a-d394f2bb0220%40googlegroups.com.

Robert Sandell

unread,
Mar 9, 2018, 5:39:24 AM3/9/18
to jenkin...@googlegroups.com
I see a checked in release.properties in the root https://github.com/jenkinsci/apprenda-plugin/blob/master/release.properties that shouldn't be there. Probably accidentally checked in from some earlier botched release.
Since the file is there I'm guessing the release plugin assumes :prepare has already run and :release uses the data in that file to perform the release. It has a svn url for scm.url so is probably the culprit here.

/B

2018-03-09 4:48 GMT+01:00 Michael Michael <mich...@gmail.com>:

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/9dbd768f-c3c8-47f5-a59a-d394f2bb0220%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Robert Sandell
Software Engineer
CloudBees, Inc.
CloudBees-Logo.png
Twitter: robert_sandell

Michael Michael

unread,
Mar 10, 2018, 2:09:28 AM3/10/18
to Jenkins Developers
Robert and Baptiste, you were 100% correct. Removing the checked in release.properties file fixed this issue. it was checked in by the previous developer of this plugin and i did not realize its impact.
thank you for all your help.
I am able to release to the artifactory now.


On Friday, March 9, 2018 at 1:39:24 PM UTC+3, Robert Sandell wrote:
I see a checked in release.properties in the root https://github.com/jenkinsci/apprenda-plugin/blob/master/release.properties that shouldn't be there. Probably accidentally checked in from some earlier botched release.
Since the file is there I'm guessing the release plugin assumes :prepare has already run and :release uses the data in that file to perform the release. It has a svn url for scm.url so is probably the culprit here.

/B
2018-03-09 4:48 GMT+01:00 Michael Michael <mich...@gmail.com>:
i added the distribution management section while i was troubleshooting to see if i could find what was wrong.
i tried everything i would read online..and this was one of them.

On Friday, March 9, 2018 at 6:37:33 AM UTC+3, Daniel Beck wrote:

> On 9. Mar 2018, at 03:03, Michael Michael <mich...@gmail.com> wrote:
>
> may i ask what these commands do then in the output trail? It seems that SVN is called in here, and this is the command that is failing
> <<
> [INFO] Resuming release from phase 'scm-commit-release'
> [INFO] Checking in modified POMs...
> [INFO] Executing: /bin/sh -c cd /root/apprenda-plugin && svn --non-interactive commit --file /tmp/maven-scm-1675137483.commit --targets /tmp/maven-scm-9172792877660663843-targets
> [INFO] Working directory: /root/apprenda-plugin
> >>
>

Are you working in a Git repository (working copy), or did you download the sources? Perhaps it checks if you're in a Git repo, and if not, falls back to SVN? IOW, in the directory that also contains pom.xml, does `git status` show an error?

Besides that, https://github.com/jenkinsci/apprenda-plugin/blob/b0e8592ba5b83f3ee63802bdf9a83ee14c84d3bc/pom.xml#L54 should be long obsolete, so it's unclear to me how you managed to deploy a snapshot with that. (Unrelated to SCM problems though.)

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages