SonarJava Checkstyle import should only warn on missing files

Sonar LTS 7.9 with latest SonarJava plugin

Multiple configured for ./target/checkstyle-result.xml and ./target/checkstyle-ktlint.xml

Running this results in ERROR message with stracktrace:

[ ERROR ] Failed to import external issues report: /home/jenkins/agent/workspace/foo/./target/checkstyle-ktlint.xml 00:26:28.385 /home/jenkins/agent/workspace/foo/./target/checkstyle-ktlint.xml (No such file or directory) 00:26:28.385 at java.base/ Method) 00:26:28.385 at java.base/ 00:26:28.385 at java.base/ 00:26:28.385 at 00:26:28.385 at$execute$1(

As not all maven modules provide all the checkstyle reports, the expected behavior would be to print only a WARNING without stacktrace as the Jacoco Plugin does.

Kind regards,


Thanks for the feedback, indeed this is an issue in the context of multimodule. This is the whole story about finding out if this is expected or a typo in the configuration.
Ticket created to handle the issue :

In the meantime, one way to work around this issue is also to configure this feature via maven profile to set up the path property and activate it only if the report file is present :