Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maven javadoc plugin how to exclude generated source

Tags:

Some maven plugin can generate additional source code e.g., jaxb2.

I want to skip generating javadocs from target/generated-sources directory.

How to configure maven-javadoc-plugin to achieve this? Maybe there is some other way?

like image 707
Slawomir Jaranowski Avatar asked Jun 03 '16 22:06

Slawomir Jaranowski


People also ask

How do I disable javadoc in Maven?

The Javadoc generation can be skipped by setting the property maven. javadoc. skip to true [1], i.e. Save this answer.

How do I fix javadoc errors?

You need to call mvn javadoc:fix to fix main Java source files (i.e. inside src/main/java directory) or mvn javadoc:test-fix to fix test Java source files (i.e. inside src/test/java directory).

What is Maven javadoc plugin?

The Javadoc Plugin uses the Javadoc tool to generate javadocs for the specified project. For more information about the standard Javadoc tool, please refer to Reference Guide. The Javadoc Plugin gets the parameter values that will be used from the plugin configuration specified in the pom.

Which goal is used to generate the path for publishing javadoc after every successful build?

In the Goals field, place javadoc:javadoc —this will tell Maven to generate the Javadoc documentation. Now go to the “Post-build Action” and tick the “Publish Javadoc” checkbox.


1 Answers

There is:

<sourceFileExcludes>
        <sourceFileExclude>**/dir_name/*.java</sourceFileExclude>
</sourceFileExcludes>
like image 57
Isabella Almeida Avatar answered Sep 21 '22 09:09

Isabella Almeida