Jenkins warnings-ng-plugin custom folder structure AKA multiple "Source Directory"

228 views Asked by At

I migrated from the old obsolete FindBugs plugin to the warnings-ng-plugin Sprotbugs tool. Everything works great except sources. The plugin doesn't show the source code of Java files (my workspace structure is: Project1/src; Project2/src + Ant freestyle build).

I can point warnings-ng-plugin to any of these projects using a relative path (i.e. provide it in "Advance" -> "Source Directory" as let's say "Project1/src").

The path "Project1/src:Project2/src" leads to error "No such directory: Project1/src:Project2/src".

The path "/prefix/Project1/src:/prefix/Project2/src" leads to errors:

  1. Additional source directory '/prefix/Project1/src' must be registered in Jenkins system configuration
  2. Additional source directory '/prefix/Project2/src' must be registered in Jenkins system configuration

The path "*/src" leads to the error "Wildcard is not allowed here"

Any ideas on how to fix that situation?

1

There are 1 answers

0
FoxyBOA On BEST ANSWER

Fixed. It was an error on our side - incorrect path in <SrcDir/> tags in spotbugsXml.xml files in both projects.