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.

    Details

    • Similar Issues:

      Description

      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

        Attachments

          Issue Links

            Activity

            Hide
            samwebber Samuel Webber added a comment -

            Builds Record Root Directory was made configurable by this JIRA

            Show
            samwebber Samuel Webber added a comment - Builds Record Root Directory was made configurable by this JIRA
            Hide
            jibe77 jean-baptiste renaux added a comment -

            Hi,
            I also have this problem on Windows 7 with Jenkins 1.466.
            Is there a solution or any way to bypass it ?
            Thanks

            Show
            jibe77 jean-baptiste renaux added a comment - Hi, I also have this problem on Windows 7 with Jenkins 1.466. Is there a solution or any way to bypass it ? Thanks
            Hide
            hysterio Roel De Nijs added a comment -

            Any work-around for this issue?

            Environment: Windows Server 2008 R2 64bit, Jenkins 1.478

            Show
            hysterio Roel De Nijs added a comment - Any work-around for this issue? Environment: Windows Server 2008 R2 64bit, Jenkins 1.478
            Hide
            jamie_cramb Jamie Cramb added a comment -

            Any work-around for this yet? Are there any variables we can use instead of ITEM_FULLNAME that would still give a unique name per-job?

            Environment: Windows Server 2008 R2 64bit, Jenkins 1.466.2.

            Thanks in advance!

            Show
            jamie_cramb Jamie Cramb added a comment - Any work-around for this yet? Are there any variables we can use instead of ITEM_FULLNAME that would still give a unique name per-job? Environment: Windows Server 2008 R2 64bit, Jenkins 1.466.2. Thanks in advance!
            Hide
            ccaraivan 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!

            Show
            ccaraivan 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!
            Hide
            sweetfa sweetfa added a comment -

            This issue is still current as of release 1.494.

            Show
            sweetfa sweetfa added a comment - This issue is still current as of release 1.494.
            Hide
            zbuza Zoltán Buza added a comment -

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

            Show
            zbuza Zoltán Buza added a comment - I have created a pull request which fixes this issue: https://github.com/jenkinsci/jenkins/pull/709
            Hide
            scm_issue_link 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.

            Show
            scm_issue_link 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 .
            Hide
            dogfood 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
            Show
            dogfood 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
            Hide
            bjoernpollex 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.

            Show
            bjoernpollex 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.
            Hide
            contewits 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.

            Show
            contewits 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.
            Hide
            scm_issue_link 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

            Show
            scm_issue_link 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
            Hide
            scm_issue_link 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

            Show
            scm_issue_link 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
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            The second part of the fix has been integrated towards 2.90

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

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: