mvn verify site vs: mvn verify site:site

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

mvn verify site vs: mvn verify site:site

Mirko Friedenhagen-5
Hello,

I started to try to improve the total runtime for our inhouse projects
by eliminating "unneeded" aggregation goals or duplicate invocations
of mojos in general. Most of our projects consume a lot of time during
tests, so by declaring report-only and failsafe-report-only in the
reporting section for the maven-surefire-report-plugin I could already
halve the building time. Further on I removed the aggregation of
javadoc as well.

Now I started to investigate whether I could further improve stuff and
detected the following (sample project[1]). This is a pom project with
some invoker integration tests. While executing "mvn clean verify
-Dinvoker.test=check-site-jacoco" [2] invoker executes "verify site".
The executed mojos are as follows:
--- snip ---
[INFO] --- maven-enforcer-plugin:1.2:enforce
(foss-parent-junit-enforcer) @ sample-project-jacoco ---
[INFO] --- buildnumber-maven-plugin:1.2:create (default) @
sample-project-jacoco ---
[INFO] --- jacoco-maven-plugin:0.6.2.201302030002:prepare-agent
(default-prepare-agent) @ sample-project-jacoco ---
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @
sample-project-jacoco ---
[INFO] --- maven-compiler-plugin:3.0:compile (default-compile) @
sample-project-jacoco ---
[INFO] --- maven-resources-plugin:2.6:testResources
(default-testResources) @ sample-project-jacoco ---
[INFO] --- maven-compiler-plugin:3.0:testCompile (default-testCompile)
@ sample-project-jacoco ---
[INFO] --- maven-surefire-plugin:2.13:test (default-test) @
sample-project-jacoco ---
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ sample-project-jacoco ---
[INFO] --- maven-javadoc-plugin:2.9:jar (attach-javadoc) @
sample-project-jacoco ---
[INFO] --- maven-source-plugin:2.2.1:jar-no-fork (attach-sources) @
sample-project-jacoco ---
[INFO] --- maven-source-plugin:2.2.1:test-jar-no-fork (attach-sources)
@ sample-project-jacoco ---
[INFO] --- maven-site-plugin:3.2:attach-descriptor (attach-descriptor)
@ sample-project-jacoco ---
[INFO] --- maven-failsafe-plugin:2.13:integration-test
(foss-parent-integration-test) @ sample-project-jacoco ---
[INFO] --- velocity-maven-plugin:0.3.0:velocity
(foss-parent-create-jenkins-description) @ sample-project-jacoco ---
[INFO] --- maven-dependency-plugin:2.6:analyze-only
(foss-parent-analyze-only) @ sample-project-jacoco ---
[INFO] --- maven-failsafe-plugin:2.13:verify
(foss-parent-integration-test) @ sample-project-jacoco ---
[INFO] --- jacoco-maven-plugin:0.6.2.201302030002:report
(default-report) @ sample-project-jacoco ---
**** site starts here [INFO] --- maven-site-plugin:3.2:site
(default-cli) @ sample-project-jacoco ---
[INFO] --- maven-enforcer-plugin:1.2:enforce
(foss-parent-junit-enforcer) @ sample-project-jacoco ---
[INFO] --- buildnumber-maven-plugin:1.2:create (default) @
sample-project-jacoco ---
[INFO] --- jacoco-maven-plugin:0.6.2.201302030002:prepare-agent
(default-prepare-agent) @ sample-project-jacoco ---
[INFO] --- maven-enforcer-plugin:1.2:enforce
(foss-parent-junit-enforcer) @ sample-project-jacoco ---
[INFO] --- buildnumber-maven-plugin:1.2:create (default) @
sample-project-jacoco ---
[INFO] --- jacoco-maven-plugin:0.6.2.201302030002:prepare-agent
(default-prepare-agent) @ sample-project-jacoco ---
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @
sample-project-jacoco ---
[INFO] --- maven-compiler-plugin:3.0:compile (default-compile) @
sample-project-jacoco ---
[INFO] --- maven-enforcer-plugin:1.2:enforce
(foss-parent-junit-enforcer) @ sample-project-jacoco ---
[INFO] --- buildnumber-maven-plugin:1.2:create (default) @
sample-project-jacoco ---
[INFO] --- maven-enforcer-plugin:1.2:enforce
(foss-parent-junit-enforcer) @ sample-project-jacoco ---
[INFO] --- buildnumber-maven-plugin:1.2:create (default) @
sample-project-jacoco ---
[INFO] --- maven-enforcer-plugin:1.2:enforce
(foss-parent-junit-enforcer) @ sample-project-jacoco ---
[INFO] --- buildnumber-maven-plugin:1.2:create (default) @
sample-project-jacoco ---
[INFO] --- jacoco-maven-plugin:0.6.2.201302030002:prepare-agent
(default-prepare-agent) @ sample-project-jacoco ---
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @
sample-project-jacoco ---
[INFO] --- maven-compiler-plugin:3.0:compile (default-compile) @
sample-project-jacoco ---
--- snap ---

As can be seen some mojos are executed repeatedly during the site
lifecycle. I now tried "verify site:site" as well, but this did not
help. Could anyone shed a light why this happens? In this parent-pom I
only have quick mojos, but in our inhouse version, some of them are
taking 20 seconds, which results in much prolonged building times.

Regards Mirko
[1] https://github.com/1and1/foss-parent/tree/foss-parent-1.3.6
[2] https://github.com/1and1/foss-parent/tree/foss-parent-1.3.6/src/it/check-site-jacoco/invoker.properties

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email