Uploaded image for project: 'Jenkins Artifactory Plug-in'
  1. Jenkins Artifactory Plug-in
  2. HAP-1004

Maven3Builder.buildMavenCmdLine() broken on Windows since 2.13.0 (InvalidPathException)

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 2.13.0
    • Fix Version/s: 2.13.1
    • Component/s: Maven3
    • Labels:
      None

      Description

      Since plugin version 2.13.0 our builds fail with the following error:

      Jenkins Artifactory Plugin version: 2.13.0
      ERROR: Build step failed with exception
      java.nio.file.InvalidPathException: Illegal char <*> at index 90: c:\Daten\jenkins\tools\hudson.tasks.Maven_MavenInstallation\Maven_3.5.0_automatisch_\boot\*
      	at sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182)
      	at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153)
      	at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)
      	at sun.nio.fs.WindowsPath.parse(WindowsPath.java:94)
      	at sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:255)
      	at java.nio.file.Paths.get(Paths.java:84)
      	at org.jfrog.hudson.maven3.Maven3Builder.buildMavenCmdLine(Maven3Builder.java:147)
      	at org.jfrog.hudson.maven3.Maven3Builder.perform(Maven3Builder.java:98)
      	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:736)
      	at hudson.model.Build$BuildExecution.build(Build.java:206)
      	at hudson.model.Build$BuildExecution.doRun(Build.java:163)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:496)
      	at hudson.model.Run.execute(Run.java:1724)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      	at hudson.model.ResourceController.execute(ResourceController.java:97)
      	at hudson.model.Executor.run(Executor.java:421)
      Build step 'Invoke Artifactory Maven 3' marked build as failure
      

      Version 2.12.2 was not affected by this problem. The reason is in line 147:

      Path classPath = Paths.get(mavenHome.getRemote(), "boot", "*");)

      While this code works fine on Linux systems, it throws an Exception on Windows (simply to be tested with System.out.println(java.nio.file.Paths.get("/foo", "bar", "*"));).

        Attachments

          Activity

            People

            • Assignee:
              romang Roman Gurevitch (Inactive)
              Reporter:
              skoehler Stefan Köhler
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: