From: SourceForge.net <no...@so...> - 2006-07-30 02:59:29
|
Bugs item #1387499, was opened at 2005-12-21 14:47 Message generated for change (Settings changed) made by jeffjensen 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: cobertura Group: release >Status: Pending Resolution: None Priority: 5 Submitted By: psylence (psylence) >Assigned to: Jeff Jensen (jeffjensen) 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: Jeff Jensen (jeffjensen) Date: 2006-07-29 21:59 Message: Logged In: YES user_id=498804 1. Which cobertura version is everyone using that exhibits this problem - is everyone on 1.2? 2. Does this problem occur with version 1.1.1 of the plugin? 3. With version 1.2, set maven.cobertura.datafile to basedir and try again, like this: maven.cobertura.datafile=${basedir}/cobertura.ser Please try 1.1.1 and the property change with 1.2 and reply with your results! ---------------------------------------------------------------------- Comment By: Krystian Nowak (krystian_nowak) Date: 2006-07-05 08:14 Message: Logged In: YES user_id=1294218 could be duplicated by bug [ 1517491 ] cobertura.ser does not exis (https://sourceforge.net/tracker/index.php?func=detail&aid=1517491&group_id=61626&atid=497853) ---------------------------------------------------------------------- Comment By: stephane bouchet (le_phan) Date: 2006-03-07 09: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 |