I have a large multi-module maven project that needs to be built offline so it can't just download its dependencies. The project builds successfully, but I am having issues getting the maven-site-pugin/maven-javadoc-plugin to generate the javadocs. The structure looks roughly like this:
grandparent pom
\-parent pom
|-module1
| \-third party dependency1
| \-slf4j 1.4.9
|-module2
| \-third party dependency2
| \-slf4j 1.4.7
\-module3
\-slf4j 1.4.5
I have defined dependencyManagement tags in the grandparent pom that set the slf4j version which allows it to be handled properly at build time. Unfortunately when I try to do an aggregate javadoc report from the grandparent, it seems to ignore the dependencyManagement and look for the 1.4.7 and 1.4.9 versions of slf4j.
The only way that I have been able to get it to not do this is to explicitly exclude slf4j from the third party dependencies in module1 and module2, but this is impractical since my actual build has hundreds of modules.
Is there a way to tell the javadoc plugin to not attempt to look up dependencies that are not also included as modules in the current build? I am honestly not sure why it is looking them up in the first place.
I am using maven-javadoc-plugin:3.0.1 and maven-site-plugin:3.6