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.

    XMLWordPrintable

Details

    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

            samwebber Samuel Webber created issue -
            samwebber Samuel Webber made changes -
            Field Original Value New Value
            Link This issue is related to JENKINS-8446 [ JENKINS-8446 ]
            samwebber Samuel Webber added a comment -

            Builds Record Root Directory was made configurable by this JIRA

            samwebber Samuel Webber added a comment - Builds Record Root Directory was made configurable by this JIRA
            samwebber Samuel Webber made changes -
            Labels build exception jenkins maven windows
            samwebber Samuel Webber made changes -
            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 it then tries to create the directory with a colon rather than a dollar in the directory name, this fails on windows.

            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





            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





            samwebber Samuel Webber made changes -
            Summary Maven3 with 'builds' directory in a separate location tries to create folders with colons in the module names which is not allowed on windows. Maven3 with 'builds' directory in a separate location tries to create folders with colons in the module name which is not allowed on windows.

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

            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
            hysterio Roel De Nijs added a comment -

            Any work-around for this issue?

            Environment: Windows Server 2008 R2 64bit, Jenkins 1.478

            hysterio Roel De Nijs added a comment - Any work-around for this issue? Environment: Windows Server 2008 R2 64bit, Jenkins 1.478
            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!

            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!

            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!

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

            This issue is still current as of release 1.494.

            sweetfa sweetfa added a comment - This issue is still current as of release 1.494.
            kutzi kutzi made changes -
            Component/s maven2 [ 15487 ]
            zbuza Zoltán Buza added a comment -

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

            zbuza 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_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 .
            scm_issue_link SCM/JIRA link daemon made changes -
            Resolution Fixed [ 1 ]
            Status Open [ 1 ] Resolved [ 5 ]
            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
            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
            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.

            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.
            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.

            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.
            ircbot Jenkins IRC Bot made changes -
            Component/s maven-plugin [ 16033 ]
            Component/s maven2 [ 15487 ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 142573 ] JNJira + In-Review [ 190176 ]

            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_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

            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_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
            oleg_nenashev Oleg Nenashev added a comment -

            The second part of the fix has been integrated towards 2.90

            oleg_nenashev Oleg Nenashev added a comment - The second part of the fix has been integrated towards 2.90
            tadek Tadeusz Kosciuszko made changes -
            Link This issue is related to JENKINS-48188 [ JENKINS-48188 ]

            People

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

              Dates

                Created:
                Updated:
                Resolved: