How do I add an extra source directory that will be used by the maven-jxr-plugin?

I'm using the build-helper-maven-plugin to add it to my build, but I'd like to see the XREF source for this extra source directory as well.


maven-jxr-plugin - The JXR plugin produces a cross-reference of the project's sources. The generated reports make it easier for the user to reference or find specific lines of code. It is also handy when used with the PMD plugin for referencing errors found in the code.

build-helper-maven-plugin - This plugin contains various small independent goals to assist with Maven build lifecycle.

Asked by: Emily279 | Posted: 28-01-2022

Answer 1

You can tell JXR what files to index using a file pattern, following Ant guidelines. For example, to include all java files in src/main/java and all source in src/main/java2, the following configuration in your file should work:


Answered by: Tess313 | Posted: 01-03-2022

Answer 2

The problem I was having was related to the order of the plugins in the pom.xml. When I moved the jxr plugin to the top of the plugin list everything started working.

Crazy stuff.

Answered by: Rubie697 | Posted: 01-03-2022

Similar questions

Still can't find your answer? Check out these amazing Java communities for help...

Java Reddit Community | Java Help Reddit Community | Java Community | Java Discord | Java Programmers (Facebook) | Java developers (Facebook)