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: 
There is:

```
<sourceFileExcludes>
        <sourceFileExclude>**/dir_name/*.java</sourceFileExclude>
</sourceFileExcludes>

```
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.