From: SourceForge.net <no...@so...> - 2006-06-08 14:28:08
|
Bugs item #1387499, was opened at 2005-12-21 21:47 Message generated for change (Settings changed) made by carlossg You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=497853&aid=1387499&group_id=61626 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: corbetura Group: release Status: Open Resolution: None Priority: 5 Submitted By: psylence (psylence) >Assigned to: Nobody/Anonymous (nobody) Summary: Using aspectj maven plugin confuses cobertura plugin Initial Comment: When compiling sources with an overridden java:compile goal like so: <preGoal name="java:compile"> <attainGoal name="aspectj:compile"/> </preGoal> (as recommended from: http://maven.apache.org/maven-1.x/reference/plugins/aspectj/index.html The cobertura plugin compiles the source twice, once correctly, then instruments it. It then gets to the test:test goal, at which time it compiles the source again, and copies it over the already instrumented code. The result is 0 coverage. The JCoverage maven plugin handles this without issue. The major difference I can see is the following from the reporting goals of the two plugins: cobertura:report <goal name="cobertura:report"> .. snip .. <attainGoal name="cobertura:on"/> <attainGoal name="test:test"/> jcoverage:report-html <goal name="jcoverage:report-html" prereqs="jcoverage:on,test:test"> Apparently maven considers java:compile as having been run when jcoverage:on is ran as a prereq? Not sure, but moving the cobertura:on,test:test into a prereq for cobertura:report ends in an error. ---------------------------------------------------------------------- Comment By: stephane bouchet (le_phan) Date: 2006-03-07 16:22 Message: Logged In: YES user_id=572945 hi, having the same issue. Using maven 1.1-beta2, jdk 1.5, aspectj-plugin 3.3 SNAPSHOT and cobertura 1.2 SNAPSHOT. I had all my reports to 0% modified the cobertura:report has mantionned ( add prereqs ) and everything worked. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=497853&aid=1387499&group_id=61626 |