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

Maven3 with 'builds' directory in a separate location tries to create folders with colons in the module name which is not allowed on windows.

      We are using Jenkins on windows and set our workspaces and builds to be a separate directory to the standard jenkins install directory on windows.

      This all works fine for our ant builds with our build artefacts stored in U:\jenkins\builds

      However we have recently added some maven3 builds.
      These work fine if you have the Build Record Root Directory set to the default as: ${ITEM_ROOTDIR}/builds
      And the build folders exists as: C:\Program Files (x86)\Jenkins\jobs\<job name>\modules\<groupId>$<artifactId>

      However changing the Build Record Root Directory to u:/jenkins/builds/${ITEM_FULLNAME} it then tries to create the directory with a colon rather than a dollar in the directory name, this fails on windows.
      e.g.
      u:\jenkins\builds\<job name>\<groupId>:<artifactId>

      I can confirm running jenkins on linux the same occurs, however the colon is not a problem (as its an allowed character).

      Started by user Sam Webber
      Building on master
      Updating http://svnserver/svn/ss/platform/branches/wc/wc_maven_migration/core/ss-core
      At revision 181408
      no revision recorded for http://svnserver/svn/ss/platform/branches/wc/wc_maven_migration/core/ss-core in the previous build
      Parsing POMs
      Modules changed, recalculating dependency graph
      ERROR: Failed to parse POMs
      java.io.FileNotFoundException: u:\jenkins\builds\wc.ss-core\com.ss:ss-core\2011-12-23_19-09-32\log (The filename, directory name, or volume label syntax is incorrect)
      at java.io.FileOutputStream.open(Native Method)
      at java.io.FileOutputStream.<init>(Unknown Source)
      at java.io.FileOutputStream.<init>(Unknown Source)
      at hudson.maven.MavenBuild$ProxyImpl2.<init>(MavenBuild.java:474)
      at hudson.maven.MavenModuleSetBuild$RunnerImpl.doRun(MavenModuleSetBuild.java:686)
      at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:462)
      at hudson.model.Run.run(Run.java:1404)
      at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:481)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:238)
      FATAL: Failed to create a temporary file in u:\jenkins\builds\wc.ss-core\com.ss:ss-core\2011-12-23_19-09-32
      hudson.util.IOException2: Failed to create a temporary file in u:\jenkins\builds\wc.ss-core\com.ss:ss-core\2011-12-23_19-09-32
      at hudson.util.AtomicFileWriter.<init>(AtomicFileWriter.java:67)
      at hudson.util.AtomicFileWriter.<init>(AtomicFileWriter.java:54)
      at hudson.XmlFile.write(XmlFile.java:170)
      at hudson.model.Run.save(Run.java:1540)
      at hudson.maven.MavenModuleSetBuild$RunnerImpl.post2(MavenModuleSetBuild.java:1011)
      at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:614)
      at hudson.model.Run.run(Run.java:1429)
      at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:481)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:238)
      Caused by: java.io.IOException: The filename, directory name, or volume label syntax is incorrect
      at java.io.WinNTFileSystem.createFileExclusively(Native Method)
      at java.io.File.checkAndCreate(Unknown Source)
      at java.io.File.createTempFile(Unknown Source)
      at hudson.util.AtomicFileWriter.<init>(AtomicFileWriter.java:65)
      ... 9 more

          [JENKINS-12251] Maven3 with 'builds' directory in a separate location tries to create folders with colons in the module name which is not allowed on windows.

          Hello,

          This means that Maven 3 is unusable in any kind of Jenkins install on Windows. Without this setting we'd have to hold the builds in the same folder as the configs - this is not feasible for lots of builds

          So - bump!

          Costin Caraivan added a comment - Hello, This means that Maven 3 is unusable in any kind of Jenkins install on Windows. Without this setting we'd have to hold the builds in the same folder as the configs - this is not feasible for lots of builds So - bump!

          sweetfa added a comment -

          This issue is still current as of release 1.494.

          sweetfa added a comment - This issue is still current as of release 1.494.

          Zoltán Buza added a comment -

          I have created a pull request which fixes this issue: https://github.com/jenkinsci/jenkins/pull/709

          Zoltán Buza added a comment - I have created a pull request which fixes this issue: https://github.com/jenkinsci/jenkins/pull/709

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          changelog.html
          core/src/main/java/jenkins/model/Jenkins.java
          core/src/main/resources/jenkins/model/Jenkins/help-rawBuildsDir.html
          core/src/main/resources/jenkins/model/Jenkins/help-rawBuildsDir_ja.html
          core/src/main/resources/jenkins/model/Jenkins/help-rawWorkspaceDir.html
          core/src/main/resources/jenkins/model/Jenkins/help-rawWorkspaceDir_ja.html
          test/src/test/java/jenkins/model/JenkinsTest.java
          http://jenkins-ci.org/commit/jenkins/61a83bd657ec93bed6278a3abf3a91c77826ec46
          Log:
          [FIXED JENKINS-12251]

          Introduced ${ITEM_FULL_NAME} to address the ticket without causing the
          backward compatibility problem.


          You received this message because you are subscribed to the Google Groups "Jenkins Commits" group.
          To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-commits+unsubscribe@googlegroups.com.
          For more options, visit https://groups.google.com/groups/opt_out.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: changelog.html core/src/main/java/jenkins/model/Jenkins.java core/src/main/resources/jenkins/model/Jenkins/help-rawBuildsDir.html core/src/main/resources/jenkins/model/Jenkins/help-rawBuildsDir_ja.html core/src/main/resources/jenkins/model/Jenkins/help-rawWorkspaceDir.html core/src/main/resources/jenkins/model/Jenkins/help-rawWorkspaceDir_ja.html test/src/test/java/jenkins/model/JenkinsTest.java http://jenkins-ci.org/commit/jenkins/61a83bd657ec93bed6278a3abf3a91c77826ec46 Log: [FIXED JENKINS-12251] Introduced ${ITEM_FULL_NAME} to address the ticket without causing the backward compatibility problem. – You received this message because you are subscribed to the Google Groups "Jenkins Commits" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-commits+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out .

          dogfood added a comment -

          Integrated in jenkins_main_trunk #2281
          [FIXED JENKINS-12251] (Revision 61a83bd657ec93bed6278a3abf3a91c77826ec46)

          Result = SUCCESS
          kohsuke : 61a83bd657ec93bed6278a3abf3a91c77826ec46
          Files :

          • core/src/main/resources/jenkins/model/Jenkins/help-rawWorkspaceDir.html
          • core/src/main/resources/jenkins/model/Jenkins/help-rawBuildsDir_ja.html
          • core/src/main/resources/jenkins/model/Jenkins/help-rawBuildsDir.html
          • core/src/main/resources/jenkins/model/Jenkins/help-rawWorkspaceDir_ja.html
          • test/src/test/java/jenkins/model/JenkinsTest.java
          • core/src/main/java/jenkins/model/Jenkins.java
          • changelog.html

          dogfood added a comment - Integrated in jenkins_main_trunk #2281 [FIXED JENKINS-12251] (Revision 61a83bd657ec93bed6278a3abf3a91c77826ec46) Result = SUCCESS kohsuke : 61a83bd657ec93bed6278a3abf3a91c77826ec46 Files : core/src/main/resources/jenkins/model/Jenkins/help-rawWorkspaceDir.html core/src/main/resources/jenkins/model/Jenkins/help-rawBuildsDir_ja.html core/src/main/resources/jenkins/model/Jenkins/help-rawBuildsDir.html core/src/main/resources/jenkins/model/Jenkins/help-rawWorkspaceDir_ja.html test/src/test/java/jenkins/model/JenkinsTest.java core/src/main/java/jenkins/model/Jenkins.java changelog.html

          Björn Pollex added a comment -

          I am currently experiencing this issue with Jenkins 1.529 on Windows 7 running on Java 1.6.0_26. We had installed Jenkins to store data in the working directory and everything worked fine. Now we wanted to migrate the build archives to a different drive and all Maven builds are failing with the exact error message as given in the OP.

          Björn Pollex added a comment - I am currently experiencing this issue with Jenkins 1.529 on Windows 7 running on Java 1.6.0_26. We had installed Jenkins to store data in the working directory and everything worked fine. Now we wanted to migrate the build archives to a different drive and all Maven builds are failing with the exact error message as given in the OP.

          Brenden Conte added a comment - - edited

          Edit: Non-issue; turns out ITEM_FULLNAME was being used in the system-wide configuration. Changed to ITEM_FULL_NAME and it now works properly.

          Brenden Conte added a comment - - edited Edit: Non-issue; turns out ITEM_FULLNAME was being used in the system-wide configuration. Changed to ITEM_FULL_NAME and it now works properly.

          Code changed in jenkins
          User: Stephen Connolly
          Path:
          core/src/main/java/jenkins/model/Jenkins.java
          http://jenkins-ci.org/commit/jenkins/ee47034c9646d4c0dff31dd34727823165c22343
          Log:
          Switch to the non-deprecated variable

          JENKINS-12251 deprecated `ITEM_FULLNAME` in favour of `ITEM_FULL_NAME`.. for new installs we should default to the correct variable

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: core/src/main/java/jenkins/model/Jenkins.java http://jenkins-ci.org/commit/jenkins/ee47034c9646d4c0dff31dd34727823165c22343 Log: Switch to the non-deprecated variable JENKINS-12251 deprecated `ITEM_FULLNAME` in favour of `ITEM_FULL_NAME`.. for new installs we should default to the correct variable

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          core/src/main/java/jenkins/model/Jenkins.java
          http://jenkins-ci.org/commit/jenkins/4c11a0ffad4ff4941287ce2eb3f7aba52c214f77
          Log:
          Merge pull request #3124 from jenkinsci/stephenc-patch-1

          [JENKINS-12251 follow up] Switch to the non-deprecated variable

          Compare: https://github.com/jenkinsci/jenkins/compare/95db56e850f1...4c11a0ffad4f

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: core/src/main/java/jenkins/model/Jenkins.java http://jenkins-ci.org/commit/jenkins/4c11a0ffad4ff4941287ce2eb3f7aba52c214f77 Log: Merge pull request #3124 from jenkinsci/stephenc-patch-1 [JENKINS-12251 follow up] Switch to the non-deprecated variable Compare: https://github.com/jenkinsci/jenkins/compare/95db56e850f1...4c11a0ffad4f

          Oleg Nenashev added a comment -

          The second part of the fix has been integrated towards 2.90

          Oleg Nenashev added a comment - The second part of the fix has been integrated towards 2.90

            Unassigned Unassigned
            samwebber Samuel Webber
            Votes:
            10 Vote for this issue
            Watchers:
            15 Start watching this issue

              Created:
              Updated:
              Resolved: