You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by lu...@apache.org on 2013/05/09 19:19:38 UTC

svn commit: r1480726 - in /commons/proper/commons-parent/trunk: RELEASE-NOTES.txt pom.xml

Author: luc
Date: Thu May  9 17:19:38 2013
New Revision: 1480726

URL: http://svn.apache.org/r1480726
Log:
documented how maven-surefire-plugin command line arguments can be set while still preserving JaCoCo agent settings

Modified:
    commons/proper/commons-parent/trunk/RELEASE-NOTES.txt
    commons/proper/commons-parent/trunk/pom.xml

Modified: commons/proper/commons-parent/trunk/RELEASE-NOTES.txt
URL: http://svn.apache.org/viewvc/commons/proper/commons-parent/trunk/RELEASE-NOTES.txt?rev=1480726&r1=1480725&r2=1480726&view=diff
==============================================================================
--- commons/proper/commons-parent/trunk/RELEASE-NOTES.txt (original)
+++ commons/proper/commons-parent/trunk/RELEASE-NOTES.txt Thu May  9 17:19:38 2013
@@ -1,4 +1,4 @@
-              Apache Commons Parent 28 RELEASE NOTES
+              Apache Commons Parent 29 RELEASE NOTES
 
 The Commons Parent team is pleased to announce the release of commons-parent-29
 
@@ -8,14 +8,37 @@ Update plugins
 
 Changes in this version include:
 
-
-
 Changes:
 o                   removed cobertura-maven-plugin
                     added jacoco-maven-plugin          0.6.2.201302030002
                     maven-surefire-plugin              2.13 -> 2.14.1
                     maven-surefire-report-plugin       2.13 -> 2.14.1
 
+The main change is the replacement of cobertura with JaCoCo for test coverage analysis.
+The former is not maintained anymore, has numerous bugs and is extremely slow in
+some situations (typically generating coverage reports for [math] took about 9 hours whereas
+standard tests run in about 10 minutes). One important implication is that since JaCoCo
+relies on setting an agent, then it requires at least Java 1.5 to run the tests, and it
+changes the argument line of surefire tests. If a component also needs to adapt the
+surefire command line, it must add the property ${argLine} to the argument line in order
+to preserve JaCoCo settings. An example for this is Apache Commons IO, where the maven-surefire-plugin
+setting must read as (note the use of the ${argLine} property):
+
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+          <forkMode>pertest</forkMode>
+          <!-- limit memory size see IO-161 -->
+          <!-- the ${argLine} preserves jacoco agent settings (see https://github.com/jacoco/eclemma/issues/22) -->
+          <argLine>-Xmx25M ${argLine}</argLine>
+          ...
+        </configuration>
+      </plugin>
+      ...
+    </plugins>
+ 
 
 Historical list of changes: http://commons.apache.org/changes-report.html
 

Modified: commons/proper/commons-parent/trunk/pom.xml
URL: http://svn.apache.org/viewvc/commons/proper/commons-parent/trunk/pom.xml?rev=1480726&r1=1480725&r2=1480726&view=diff
==============================================================================
--- commons/proper/commons-parent/trunk/pom.xml (original)
+++ commons/proper/commons-parent/trunk/pom.xml Thu May  9 17:19:38 2013
@@ -640,6 +640,12 @@ http://svn.apache.org/repos/asf/commons/
           <groupId>org.jacoco</groupId>
           <artifactId>jacoco-maven-plugin</artifactId>
           <version>${commons.jacoco.version}</version>
+          <!-- Note that since JaCoCo relies on an agent to perform tests,
+               it changes the surefire arguments line. If a component also
+               needs to change the argument line of maven-surefire-plugin,
+               then it must add ${argLine} property (which is set by JaCoCo)
+               in the argLine configuration element of maven-surefire-plugin
+               to preserve JaCoCo settings. -->
           <executions>
             <execution>
               <id>prepare-agent</id>