-
Bug
-
Resolution: Fixed
-
Major
-
Jenkins 2.303.1
Warnings NG 9.5.0
Maven 3.5.2
Java 8
Windows 10
I am trying to record the Java lint warnings from a Maven build using the Warnings NG plugin. Both the job (with Maven) und the Jenkins are running on Windows. Here is the pipeline step:
recordIssues aggregatingResults: true, enabledForFailure: true, skipPublishingChecks: true, sourceCodeEncoding: 'UTF-8', tools: [java()]
Unfortunately the recording fails with the following exception:
java.nio.file.InvalidPathException: Illegal char <:> at index 2: /D:/jenkins/home/workspace/test-job/build/test-project/src/test/java/com/test/DummyClass.java at java.base/sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182) at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153) at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77) at java.base/sun.nio.fs.WindowsPath.parse(WindowsPath.java:92) at java.base/sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:229) at java.base/java.nio.file.Path.of(Path.java:147) at java.base/java.nio.file.Paths.get(Paths.java:69) at io.jenkins.plugins.analysis.core.util.AffectedFilesResolver$RemoteFacade.isInWorkspace(AffectedFilesResolver.java:188) at io.jenkins.plugins.analysis.core.util.AffectedFilesResolver$RemoteFacade.isInWorkspace(AffectedFilesResolver.java:184) at io.jenkins.plugins.analysis.core.util.AffectedFilesResolver.copyAffectedFilesToBuildFolder(AffectedFilesResolver.java:122) at io.jenkins.plugins.analysis.core.util.AffectedFilesResolver.copyAffectedFilesToBuildFolder(AffectedFilesResolver.java:106) at io.jenkins.plugins.analysis.core.steps.IssuesScanner.copyAffectedFiles(IssuesScanner.java:170) at io.jenkins.plugins.analysis.core.steps.IssuesScanner.postProcessReport(IssuesScanner.java:121) at io.jenkins.plugins.analysis.core.steps.IssuesScanner.scan(IssuesScanner.java:97) at io.jenkins.plugins.analysis.core.steps.IssuesRecorder.scanWithTool(IssuesRecorder.java:765) at io.jenkins.plugins.analysis.core.steps.IssuesRecorder.record(IssuesRecorder.java:716) at io.jenkins.plugins.analysis.core.steps.IssuesRecorder.perform(IssuesRecorder.java:697) at io.jenkins.plugins.analysis.core.steps.RecordIssuesStep$Execution.run(RecordIssuesStep.java:1109) at io.jenkins.plugins.analysis.core.steps.RecordIssuesStep$Execution.run(RecordIssuesStep.java:1067) at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:829)
It seems the leading slash in the filename is causing this exception but this is the way the Maven compiler plugin reports the warning:
[WARNING] /D:/jenkins/home/workspace/test-job/build/test-project/src/test/java/com/test/DummyClass.java:[58,27] DeprClass() in com.test.DeprClass has been deprecated
Am I doing something wrong? As this is the way the Maven compiler plugin currently behaves the Warnings NG plugin should be able to work with it, should it not?
- is duplicated by
-
JENKINS-66815 Error running the java format
-
- Closed
-