Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-9869

Jenkins Maven Release Plug-in fails because workspace directory does not exist

    • Icon: Bug Bug
    • Resolution: Incomplete
    • Icon: Major Major
    • m2release-plugin
    • None
    • Mac OS X 10.6.7

      I have a multi-module maven project. It successfully builds, and the release:prepare successfully competes. However, after all of the steps (looking at console output) have completed, the whole thing fails when it tries to do something with an extra workspace directory that doesn't exist.

      Here's the last part of the exception.
      Caused by: org.codehaus.plexus.util.cli.CommandLineException: Working directory "/Users/dallwardt/.jenkins/jobs/Vault-test6/workspace/target/checkout/workspace" does not exist!
      at org.codehaus.plexus.util.cli.Commandline.execute(Commandline.java:644)
      at org.codehaus.plexus.util.cli.CommandLineUtils.executeCommandLine(CommandLineUtils.java:118)
      at org.codehaus.plexus.util.cli.CommandLineUtils.executeCommandLine(CommandLineUtils.java:93)
      at org.apache.maven.shared.invoker.DefaultInvoker.executeCommandLine(DefaultInvoker.java:149)
      at org.apache.maven.shared.invoker.DefaultInvoker.execute(DefaultInvoker.java:102)
      at org.apache.maven.shared.release.exec.InvokerMavenExecutor.executeGoals(InvokerMavenExecutor.java:387)
      ... 36 more
      channel stopped
      Finished: FAILURE

      Here's what the file system looks like:
      dallwardt$ pwd
      /Users/dallwardt/.jenkins/jobs/Vault-test6/workspace

      dallwardt$ ls
      Common WzlDocs pom.xml pom.xml.releaseBackup release.properties target

      dallwardt$ pwd
      /Users/dallwardt/.jenkins/jobs/Vault-test6/workspace/target/checkout

      dallwardt$ ls
      dev tags trunk


      Notice there is no workspace directory under target/checkout. Who is supposed to create an extra workspace folder under target/checkout ?

          [JENKINS-9869] Jenkins Maven Release Plug-in fails because workspace directory does not exist

          Derek Allwardt added a comment - - edited

          Downgrading to maven 2.2.1 produced a successful release. So what does that mean for Maven 3x?

          Derek Allwardt added a comment - - edited Downgrading to maven 2.2.1 produced a successful release. So what does that mean for Maven 3x?

          James Nord added a comment -

          There are differences in the Jenkins maven plugin for maven 2 and maven 3.

          I will take a look and see if I can reproduce it with a file based svn repo.

          James Nord added a comment - There are differences in the Jenkins maven plugin for maven 2 and maven 3. I will take a look and see if I can reproduce it with a file based svn repo.

          Eirik Broen added a comment -

          I have a very similar problem to the one described above. I have a multi-module project with all module POM's having one parent. The name of the module with the parent POM in it is called esa-main.

          Everything is going well up until it gets ready to execute goals 'deploy site-deploy' then gives a warning:

          [WARNING] Base directory is a file. Using base directory as POM location.

          Which results in:

          Working directory "/var/lib/jenkins/jobs/esa-release/workspace/trunk/esa-main/target/checkout/esa-main/esa-main" does not exist!

          For some reason it tags on an extra "esa-main" at the end of the path. I have tried this both from a shell (as the Jenkins user) and from Jenkins with the same result.

          The part of the main POM which sets up the release plugin:

          <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <version>2.2.1</version>
          </plugin>

          I have seen in other posts regarding similar errors that the problem might be in the project structure but I cannot see where that would be. Any help would be much appreciated!

          Eirik Broen added a comment - I have a very similar problem to the one described above. I have a multi-module project with all module POM's having one parent. The name of the module with the parent POM in it is called esa-main. Everything is going well up until it gets ready to execute goals 'deploy site-deploy' then gives a warning: [WARNING] Base directory is a file. Using base directory as POM location. Which results in: Working directory "/var/lib/jenkins/jobs/esa-release/workspace/trunk/esa-main/target/checkout/esa-main/esa-main" does not exist! For some reason it tags on an extra "esa-main" at the end of the path. I have tried this both from a shell (as the Jenkins user) and from Jenkins with the same result. The part of the main POM which sets up the release plugin: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-release-plugin</artifactId> <version>2.2.1</version> </plugin> I have seen in other posts regarding similar errors that the problem might be in the project structure but I cannot see where that would be. Any help would be much appreciated!

          Satish Vasa added a comment -

          I have exactly the same issue with Maven 3.0.2 and maven-release-plugin 2.2.1. I am using version 1.430 of Jenkins.

          Satish Vasa added a comment - I have exactly the same issue with Maven 3.0.2 and maven-release-plugin 2.2.1. I am using version 1.430 of Jenkins.

          James Nord added a comment -

          A sample project that reproduced the issue would be helpful.

          James Nord added a comment - A sample project that reproduced the issue would be helpful.

          Satish Vasa added a comment - - edited

          Attached sample projects in a zip file that contains 1 aggregator project and 2 module projects in a flattened structure.I have stubbed out SCM and Repo details.

          Satish Vasa added a comment - - edited Attached sample projects in a zip file that contains 1 aggregator project and 2 module projects in a flattened structure.I have stubbed out SCM and Repo details.

          James Nord added a comment -

          after setting the release deployment repos and configuring an svn and apache server I don't see any failures with the test project.

          I have tried Maven 3.0.2 from the command line and as a Jenkins Maven2/3 job

          Jenkins 1.433
          m2release 0.8.0
          svn 1.6.12
          ubuntu 11.04

          James Nord added a comment - after setting the release deployment repos and configuring an svn and apache server I don't see any failures with the test project. I have tried Maven 3.0.2 from the command line and as a Jenkins Maven2/3 job Jenkins 1.433 m2release 0.8.0 svn 1.6.12 ubuntu 11.04

          James Nord added a comment -

          sucessfull build result output

          James Nord added a comment - sucessfull build result output

          does this issue still exist or can we close it?

          Dominik Bartholdi added a comment - does this issue still exist or can we close it?

          evernat added a comment -

          No response from the reporter, so resolving as incomplete.
          Please reopen if needed.

          evernat added a comment - No response from the reporter, so resolving as incomplete. Please reopen if needed.

            Unassigned Unassigned
            dallwardtveeva Derek Allwardt
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: