because each of the reporting plugins have no concept of how far up
the lifecycle the build has gone
in maven there are three (3) lifecycles:
1. the clean lifecycle: pre-clean, clean and post-clean phases
2: the site lifecycle: pre-site, site and site-deploy
3. the build lifecycle: validate, ... deploy
mojos have no way to find out which lifecycle they are running, what
phase they are executing in, and what phases have already executed
thus if you want to report the results of unit tests, you can either:
scan the filesystem for the results and hope that these results are
current; or you can fork a build up as far as test and then pull the
results from the filesystem
then if you want code coverage...
if you want to generate javadocs, you need to fork a build up as far
as process-sources in order to ensure that the source code has been
generated before generating the javadocs
if you are a good reporting plugin, you will fork the build non-
recursive... bad plugins are aggregator plugins that fork a build
(everything is hunky-dory until you have two forking aggregator
plugins in the same build, as they will recursively fork each other
until you get to a leaf project)
3.x might help solve some of these issues... better still is to switch
reporting plugins to report, and not to do, and use the build
lifecycle for doing
Sent from my [rhymes with tryPod] ;-)
On 24 Sep 2009, at 22:18, David Hoffer <[email protected]> wrote:
We keep having problems with our site-deploy build either hanging or
running
out of memory. I just noticed that it rebuilds everything about 11
times!
Why?
(This top level pom has 3 modules where those 3 modules each have a
few
modules. This is the only pom with a reporting section.)
Here is our top level reporting section.
<reporting>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>javancss-maven-plugin</artifactId>
<version>2.0-beta-2</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>${cobertura-maven-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>surefire-report-maven-plugin</artifactId>
<version>2.0-beta-1</version>
</plugin>
<plugin>
<!--Provides creating jar of source-->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>${maven-source-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${maven-javadoc-plugin.version}</version>
<configuration>
<aggregate>true</aggregate>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jxr-maven-plugin</artifactId>
<version>2.0-beta-1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>2.4</version>
<configuration>
<targetjdk>${jdkVersion}</targetjdk>
<rulesets>
<ruleset>/rulesets/basic.xml</ruleset>
</rulesets>
<format>xml</format>
<linkXref>true</linkXref>
<sourceEncoding>utf-8</sourceEncoding>
<minimumTokens>100</minimumTokens>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</
artifactId>
<version>2.1.1</version>
<reportSets>
<reportSet>
<reports>
<report>dependencies</report>
<report>dependency-convergence</report>
<report>project-team</report>
<report>cim</report>
<report>license</report>
<report>scm</report>
<report>index</report>
<report>summary</report>
</reports>
</reportSet>
</reportSets>
</plugin>
</plugins>
</reporting>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]