I need to exclude specific source files (NOT just packages) from Javadoc using Maven. The
And what about this?
<sourceFileExcludes>
<exclude>net/my/packagename/mock/*.java</exclude>
<exclude>net/my/packagename/samples/*.java</exclude>
<exclude>**Mock*.java</exclude>
</sourceFileExcludes>
You need to specify sourcepath also. Then sourceFileExcludes will work.
<sourceFileExcludes>
<exclude>CryptoUtils.java</exclude>
</sourceFileExcludes>
<sourcepath>${basedir}/src/main/java/com/sdk/entity;${basedir}/src/main/java/com/sdk/main;${basedir}/src/main/java/com/sdk/util</sourcepath>
CryptoUtils is inside "/src/main/java/com/sdk/util"
It might just not be working at the moment. There is bug logged in the plugin issue tracker - MJAVADOC-365
<sourceFileIncludes>
<includes>com/cod/user/**</includes>
</sourceFileIncludes>
<sourceFileExcludes>
<exclude>com/cod/user/impl/**</exclude>
includes you want ,exclude else