|
||||||||
This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira |
- [mojo-dev] [jira] (MCOBERTURA-127) Error with aspectj 1... Rafal Figas (JIRA)
- [mojo-dev] [jira] (MCOBERTURA-127) Error with aspe... Rafal Figas (JIRA)
- [mojo-dev] [jira] (MCOBERTURA-127) Error with aspe... Rafal Figas (JIRA)
IMHO this is due to wrong moment when cobertura performs instrumentation (after compile not after test-compile). Look at following log from maven execution (mvn clean instal site:site):
As you can see execution of aspectj:test-compile gets confused, because test classes are already instrumented.
IMHO there are two solutions - classes must be instrumented separately for main and for test AFTER compilation (may be hard to do) or instrumentation must be performed after test-compile.
Also note that there is workaround available through reconfiguration of aspectj compiler:
Also be aware that in previous versions - prior 1.3 - by default aspectj-maven-plugin was bound to process-sources phase by default. And since 1.3 it is bound to compile/test-compile phase. And now there is a discussion if this is fine:
https://jira.codehaus.org/browse/MASPECTJ-92
However IMHO both problems are related but separate and it still seems to me that cobertura plugin should perform instrumentation later, as it seems to be safer.