-
Bug
-
Resolution: Fixed
-
Major
-
None
-
pipeline-maven-plugin 2.0.2
The o.j.p.pipeline.maven.reporters.GeneratedArtifactsReporter doesn't work on Windows agents.
org.jenkinsci.plugins.pipeline.maven.util.XmlUtils#getPathInWorkspace() uses an hardcoded file separator "/" that works on Linux and MacOS but NOT on Windows.
/** * @return empty string if not matching */ @Nonnull public static String getPathInWorkspace(@Nonnull String absoluteFilePath, @Nonnull FilePath workspace) { String workspaceRemote = workspace.getRemote(); if (!workspaceRemote.endsWith("/")) { workspaceRemote = workspaceRemote + "/"; } if (absoluteFilePath.startsWith(workspaceRemote)) { return StringUtils.substringAfter(absoluteFilePath, workspaceRemote); } else { return absoluteFilePath; } }
- blocks
-
JENKINS-43617 Pipeline maven error: java.nio.file.InvalidPathException: Illegal char <:>
-
- Closed
-
Code changed in jenkins
User: Cyrille Le Clerc
Path:
jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/util/XmlUtils.java
jenkins-plugin/src/test/java/org/jenkinsci/plugins/pipeline/maven/reporters/GeneratedArtifactsReporterTest.java
jenkins-plugin/src/test/resources/org/jenkinsci/plugins/pipeline/maven/maven-spy-windows.xml
http://jenkins-ci.org/commit/pipeline-maven-plugin/3fb342b2ab05bd23e7521672a333a7dcbdb28d11
Log:
JENKINS-43624Fix file separator on windows build agents