Right now when you checkout a multi-module project, where one module is dependent on another (e.g. webapp depends on core) and the version (even SNAPSHOT) is neither installed nor deployed, execution of mvn clean verify site will always fail.
maven-javadoc-plugin's javadoc goal by default tries to render an aggregate documentation, which makes the maven-site-pluginsite goal fail in the aggregator project because it fails to get the report for ...maven-javadoc-plugin which fails because it Could not resolve dependencies on the not yet installed modules.
Even worse, the maven-javadoc-plugin:2.9:aggregate (report:aggregate) invocation (or maybe test-aggregate will - by forking a new lifecycle up to generate-sources- start at least execution of enforcer's enforce goal which leads to longer run times (e.g. disabling javadoc's aggregation will reduce the time for mvn clean verify site site:stage from 2 minutes to 1 minute 30 seconds, i.e. a reduction of 25%.
There are two solutions:
when modifying the version, always run mvn install on your machine or mvn deploy when you are not on your own (even you got a Jenkins build around the corner which invokes mvn clean verify site, otherwise the job will fail).
do without an aggregate javadoc report (for libraries most of the time you want the sources or javadoc jar anyway, so this sacrifice should be acceptable.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.2:site (default-site) on project tljunit-parent: failed to get report for org.apache.maven.plugins:maven-javadoc-plugin: Failed to execute goal on project tljunit-eclipse: Could not resolve dependencies for project net.oneandone.testlinkjunit:tljunit-eclipse:jar:3.0.3-SNAPSHOT: Could not find artifact net.oneandone.testlinkjunit:tljunit-surefire:jar:3.0.3-SNAPSHOT in libs-snapshots (http://mamrepo.united.domain/artifactory/libs-snapshot) -> [Help 1]
webapp
depends oncore
) and the version (even SNAPSHOT) is neither installed nor deployed, execution ofmvn clean verify site
will always fail.maven-site-plugin
site
goal fail in the aggregator project because it fails toget the report for ...maven-javadoc-plugin
which fails because itCould not resolve dependencies
on the not yet installed modules.maven-javadoc-plugin:2.9:aggregate (report:aggregate)
invocation (or maybetest-aggregate
will - by forking a new lifecycle up togenerate-sources
- start at least execution ofenforcer
'senforce
goal which leads to longer run times (e.g. disabling javadoc's aggregation will reduce the time formvn clean verify site site:stage
from 2 minutes to 1 minute 30 seconds, i.e. a reduction of 25%.mvn install
on your machine ormvn deploy
when you are not on your own (even you got a Jenkins build around the corner which invokesmvn clean verify site
, otherwise the job will fail).