views:

613

answers:

2

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.

FYI:

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.

A: 

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:

<project>
  ...
  <reporting>
    <plugins>
      ...
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jxr-plugin</artifactId>
        <configuration>
          ...
          <includes>
            <include>src/main/java/**/*.java</include>
            <include>src/main/java2/**/*.java</include>
          <includes>
          ...
        </configuration>
      </plugin>
    </plugins>
  ...
  </reporting>
  ...
</project>
John Stauffer
This didn't seem to work. It looks like this is a way of including files already within the src/main/java directory. Am I missing something?
ScArcher2
A: 

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.

ScArcher2