Question: 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?

Answer: 
A simple and effective solution is to generate the code to a new package (for example: using ANTLR, move the grammars one layer deeper, from a `your.package.here` into a new `your.package.here.antlr` package).

Then, using Andrew Rueckert's suggestion, add `<excludePackageNames>*.antlr</excludePackageNames>` in the maven javadoc plugin configuration in your pom file.
And another possible solution is to set `<sourceFileIncludes>`, e.g:

```
<sourceFileIncludes>**/com/pany/different/package/**/*.java</sourceFileIncludes>

```

Works only if your main source dirs ends differently from generated sources.