[ http://jira.codehaus.org/browse/MCOBERTURA-52?page=comments#action_81459
]
Gary Kind commented on MCOBERTURA-52:
-------------------------------------
I believe this problem has something to do with a corrupted cobertura.ser file.
I somehow got it to work, i.e. it was excluding the proper packages and
classes. Since I had a number of exclude statements, I tried to isolate the
exclude rules that were getting it to work. It just kept working until I took
out all of the rules, then, of course nothing was excluded as expected. I then
started putting rules back in until all were back but it still didn't work! I
I figured there had to be some sort of caching optimization -- something that
was keeping track of the previous rules. I took a wild guess and blew away the
cobertura.ser file in ${basedir} and it started working again! When it was
bad, the cobertura.ser was 544K in size. When it was good, its size was only
164K.
I can only conclude that there is a bug here and that it has to do with what is
written to the cobertura.ser file.
As a workaround, I would suggest blowing away your cobertura.ser file (noting
the file's size) and then trying it again. It should work -- take a note of
the new file's size-- as long as your excludes are correct.
> Ignores and Excludes do nothing
> -------------------------------
>
> Key: MCOBERTURA-52
> URL: http://jira.codehaus.org/browse/MCOBERTURA-52
> Project: Maven 2.x Cobertura Plugin
> Issue Type: Bug
> Affects Versions: 2.0
> Environment: Windows
> Reporter: Jim Wilson
>
> After adding this to the POM:
> <build>
> <plugins>
> <plugin>
> <groupId>org.codehaus.mojo</groupId>
> <artifactId>cobertura-maven-plugin</artifactId>
> <configuration>
> <instrumentation>
> <excludes>
> <exclude>org/example/**/*Test.class</exclude>
> <exclude>${basedir}</exclude>
> </excludes>
> </instrumentation>
> <check>
> <haltOnFailure>false</haltOnFailure>
> </check>
> </configuration>
> <executions>
> <execution>
> <goals>
> <goal>clean</goal>
> </goals>
> </execution>
> </executions>
> </plugin>
> </plugins>
> </build>
> Cobertura still reports on all classes.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email