org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.2.1:prepare (default-cli) on project parent: Cannot prepare the release because you have local modifications : [C:\jenkins\slave\workspace\testjob\logcat_5637825123254995961.log:unknown]

Jenkins JIRA | Richard Mortimer | 5 years ago
  1. 0

    Use of maven-release-plugin with the android-emulator-plugin fails because the logcat temporary log file is captured as a modified file in the maven workspace. {code} mavenExecutionResult exceptions not empty message : Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.2.1:prepare (default-cli) on project parent: Cannot prepare the release because you have local modifications : [C:\jenkins\slave\workspace\testjob\logcat_5637825123254995961.log:unknown] cause : Cannot prepare the release because you have local modifications : [C:\jenkins\slave\workspace\testjob\logcat_5637825123254995961.log:unknown] Stack trace : org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.2.1:prepare (default-cli) on project parent: Cannot prepare the release because you have local modifications : [C:\jenkins\slave\workspace\testjob\logcat_5637825123254995961.log:unknown] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) at org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:79) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:329) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239) at org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:158) at hudson.maven.Maven3Builder.call(Maven3Builder.java:112) at hudson.maven.Maven3Builder.call(Maven3Builder.java:70) at hudson.remoting.UserRequest.perform(UserRequest.java:118) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:287) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: org.apache.maven.plugin.MojoFailureException: Cannot prepare the release because you have local modifications : [C:\jenkins\slave\workspace\testjob\logcat_5637825123254995961.log:unknown] at org.apache.maven.plugins.release.PrepareReleaseMojo.prepareRelease(PrepareReleaseMojo.java:310) at org.apache.maven.plugins.release.PrepareReleaseMojo.execute(PrepareReleaseMojo.java:258) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) ... 27 more Caused by: org.apache.maven.shared.release.ReleaseFailureException: Cannot prepare the release because you have local modifications : [C:\jenkins\slave\workspace\testjob\logcat_5637825123254995961.log:unknown] at org.apache.maven.shared.release.phase.ScmCheckModificationsPhase.execute(ScmCheckModificationsPhase.java:153) at org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:206) at org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:142) at org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:104) at org.apache.maven.plugins.release.PrepareReleaseMojo.prepareRelease(PrepareReleaseMojo.java:302) ... 30 more {code} I cannot easily work around this by adding a checkModificationExcludes entry into the release:prepare parameters because it does not take a wildcard filename (needed to match the logcat_*.log temporary filename). I have managed to workaround this by building a local copy of the plugin that uses a file suffix of .log~ (maven ignores that because it treats is as a backup file). Example patch snippet to do this below. {code} - final FilePath logcatFile = build.getWorkspace().createTempFile("logcat_", ".log"); + final FilePath logcatFile = build.getWorkspace().createTempFile("logcat_", ".log~"); {code} That is not a proper solution but it does work. I guess that the proper solution will involve generating a temporary file outside of the workspace somewhere on the build slave.

    Jenkins JIRA | 5 years ago | Richard Mortimer
    org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.2.1:prepare (default-cli) on project parent: Cannot prepare the release because you have local modifications : [C:\jenkins\slave\workspace\testjob\logcat_5637825123254995961.log:unknown]
  2. 0

    Use of maven-release-plugin with the android-emulator-plugin fails because the logcat temporary log file is captured as a modified file in the maven workspace. {code} mavenExecutionResult exceptions not empty message : Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.2.1:prepare (default-cli) on project parent: Cannot prepare the release because you have local modifications : [C:\jenkins\slave\workspace\testjob\logcat_5637825123254995961.log:unknown] cause : Cannot prepare the release because you have local modifications : [C:\jenkins\slave\workspace\testjob\logcat_5637825123254995961.log:unknown] Stack trace : org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.2.1:prepare (default-cli) on project parent: Cannot prepare the release because you have local modifications : [C:\jenkins\slave\workspace\testjob\logcat_5637825123254995961.log:unknown] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) at org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:79) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:329) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239) at org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:158) at hudson.maven.Maven3Builder.call(Maven3Builder.java:112) at hudson.maven.Maven3Builder.call(Maven3Builder.java:70) at hudson.remoting.UserRequest.perform(UserRequest.java:118) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:287) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: org.apache.maven.plugin.MojoFailureException: Cannot prepare the release because you have local modifications : [C:\jenkins\slave\workspace\testjob\logcat_5637825123254995961.log:unknown] at org.apache.maven.plugins.release.PrepareReleaseMojo.prepareRelease(PrepareReleaseMojo.java:310) at org.apache.maven.plugins.release.PrepareReleaseMojo.execute(PrepareReleaseMojo.java:258) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) ... 27 more Caused by: org.apache.maven.shared.release.ReleaseFailureException: Cannot prepare the release because you have local modifications : [C:\jenkins\slave\workspace\testjob\logcat_5637825123254995961.log:unknown] at org.apache.maven.shared.release.phase.ScmCheckModificationsPhase.execute(ScmCheckModificationsPhase.java:153) at org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:206) at org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:142) at org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:104) at org.apache.maven.plugins.release.PrepareReleaseMojo.prepareRelease(PrepareReleaseMojo.java:302) ... 30 more {code} I cannot easily work around this by adding a checkModificationExcludes entry into the release:prepare parameters because it does not take a wildcard filename (needed to match the logcat_*.log temporary filename). I have managed to workaround this by building a local copy of the plugin that uses a file suffix of .log~ (maven ignores that because it treats is as a backup file). Example patch snippet to do this below. {code} - final FilePath logcatFile = build.getWorkspace().createTempFile("logcat_", ".log"); + final FilePath logcatFile = build.getWorkspace().createTempFile("logcat_", ".log~"); {code} That is not a proper solution but it does work. I guess that the proper solution will involve generating a temporary file outside of the workspace somewhere on the build slave.

    Jenkins JIRA | 5 years ago | Richard Mortimer
    org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.2.1:prepare (default-cli) on project parent: Cannot prepare the release because you have local modifications : [C:\jenkins\slave\workspace\testjob\logcat_5637825123254995961.log:unknown]
  3. 0

    Having trouble with Maven Release plugin -- "Cannot prepare the release because you have local modifications"

    Google Groups | 3 years ago | Dave
    org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.0:prepare (default-cli) on project test: Cannot prepare the release because you have local modifications : [target/maven-archiver/pom.properties:modified] [target/surefire-reports/TEST-org.myco.subco.AppTest.xml:modified] [target/surefire-reports/org.myco.subco.AppTest.txt:modified] [target/test-1.1-SNAPSHOT.jar:unknown]
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    "You don't have a SNAPSHOT project in the reactor projects list." when using Jenkins Maven release plugin

    Stack Overflow | 3 years ago | Dave
    org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.0:prepare (default-cli) on project myproject: You don't have a SNAPSHOT project in the reactor projects list.
  6. 0

    Information about SnapShot - softlike.us

    softlike.us | 1 year ago
    org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.0:prepare (default-cli) on project myproject: You don't have a SNAPSHOT project in the reactor projects list.

    1 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.apache.maven.shared.release.ReleaseFailureException

      Cannot prepare the release because you have local modifications : [C:\jenkins\slave\workspace\testjob\logcat_5637825123254995961.log:unknown]

      at org.apache.maven.shared.release.phase.ScmCheckModificationsPhase.execute()
    2. Maven Release Manager
      DefaultReleaseManager.prepare
      1. org.apache.maven.shared.release.phase.ScmCheckModificationsPhase.execute(ScmCheckModificationsPhase.java:153)
      2. org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:206)
      3. org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:142)
      4. org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:104)
      4 frames
    3. org.apache.maven
      PrepareReleaseMojo.execute
      1. org.apache.maven.plugins.release.PrepareReleaseMojo.prepareRelease(PrepareReleaseMojo.java:302)
      2. org.apache.maven.plugins.release.PrepareReleaseMojo.execute(PrepareReleaseMojo.java:258)
      2 frames
    4. Maven Plugin
      DefaultBuildPluginManager.executeMojo
      1. org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
      1 frame
    5. Maven Core
      DefaultMaven.execute
      1. org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
      2. org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
      3. org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
      4. org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
      5. org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
      6. org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
      7. org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
      8. org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
      9. org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
      9 frames
    6. M3 Interceptor
      Maven3Launcher.main
      1. org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:79)
      1 frame
    7. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      4. java.lang.reflect.Method.invoke(Unknown Source)
      4 frames
    8. Plexus
      Launcher.launch
      1. org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:329)
      2. org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239)
      2 frames
    9. M3 Agent
      Maven3Main.launch
      1. org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:158)
      1 frame
    10. Hudson Maven Embedder
      Maven3Builder.call
      1. hudson.maven.Maven3Builder.call(Maven3Builder.java:112)
      2. hudson.maven.Maven3Builder.call(Maven3Builder.java:70)
      2 frames
    11. Hudson :: Remoting Layer
      Request$2.run
      1. hudson.remoting.UserRequest.perform(UserRequest.java:118)
      2. hudson.remoting.UserRequest.perform(UserRequest.java:48)
      3. hudson.remoting.Request$2.run(Request.java:287)
      3 frames
    12. Java RT
      Thread.run
      1. java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
      2. java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
      3. java.util.concurrent.FutureTask.run(Unknown Source)
      4. java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
      5. java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      6. java.lang.Thread.run(Unknown Source)
      6 frames