I followed the instructions here:
http://mojo.codehaus.org/cobertura-maven-plugin/usage.html
and it works.
My configuration:
<reporting>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<configuration>
<instrumentation>
<ignores>
<ignore>my.package.to.ignore.*</ignore>
</ignores>
<excludes>
<exclude>my/package/to/ignore/*.class</exclude>
</excludes>
</instrumentation>
</configuration>
</plugin>
</plugins>
</reporting>
The "ignores" must contain dots, and the "excludes" - slashes.
Greetings to all.
Grzegorz Slowikowski
2009/6/2 Ulrich Wolf <[email protected]>
> You are right, this problem was never solved...
>
> Still looking for a solution, but haven't found one yet.
>
> Uli
>
> -----Ursprüngliche Nachricht-----
> Von: Martin777 [mailto:[email protected]]
> Gesendet: Dienstag, 2. Juni 2009 14:06
> An: [email protected]
> Betreff: Re: AW: [mojo-user] Problems with exclusions in
> cobertura-maven-plugin
>
>
> I've checked the plugin sources available online and it looks to me, that
> it
> never uses the ignores or exludes, just includes everything... Could I be
> right? :)
>
>
> Martin777 wrote:
> >
> > Have you solved the problem? I have the same issue with Cobertura, I want
> > to ignore my data classes package. I've tried many combinations of
> > ignore/exclude, but no luck :)
> >
> >
> > Ulrich Wolf-2 wrote:
> >>
> >> Benjamin Bentmann wrote:
> >>>
> >>> Try moving the <configuration> from the <build> section to the
> >>> <reporting> section. As mentioned in [0], a build config does not
> >>> affect
> >>> a reporting plugin execution.
> >>>
> >>> Benjamin
> >>>
> >>> [0] http://maven.apache.org/pom.html#Reporting
> >>
> >> Thanks for your reply, nice to know that! I thought that it would be the
> >> other way round.
> >>
> >> Now I've also tested that, but this doesn't change anything. I also
> tried
> >> running cobertura separately from "site" as cobertura:cobertura, which
> >> probably should use the <configuration> from the <build>-Section but the
> >> output didn't change.
> >>
> >> I also tried to exchange the notation of includes and excludes (dots &
> >> slashes) and defining every sourcefile on its own, but all that didn't
> >> help.
> >>
> >> Really odd behavior, I can't really see why this is happening...
> >>
> >> Uli
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe from this list, please visit:
> >>
> >> http://xircles.codehaus.org/manage_email
> >>
> >>
> >>
> >>
> >
> >
>
> --
> View this message in context:
>
> http://www.nabble.com/Problems-with-exclusions-in-cobertura-maven-plugin-tp2
> 3011559p23831281.html
> Sent from the mojo - user mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
> http://xircles.codehaus.org/manage_email
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
> http://xircles.codehaus.org/manage_email
>
>
>