Hi Miguel The Cobertura plugin has two parts: one that instruments the code and one that generates a report. The first part, which is the one that uses <excludes> needs to be configured in the <build> section of your POM. The reporting part is configured inside the Site Plugin, like you show in your example.
Please read the docs at the URL you supplied. On 2011-10-14 16:22, Miguel Almeida wrote: > Dear all, > With maven 2 (and according to > http://mojo.codehaus.org/cobertura-maven-plugin/usage.html ), one could > exclude certain classes from appearing in the Cobertura report by using > <exclude>com/example/dullcode/**/*.class</exclude>. > > However, when I changed to maven 3 (and maven-site-plugin 3.x), I can't > figure out how to achieve the same - my *Fake* class appears in the > report with the "clean site" goal. > Can anyone figure out if I have the wrong configuration or if this > doesn't work in m3? > > > > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-site-plugin</artifactId> > <version>3.0-beta-3</version> > <configuration> > <reportPlugins> > <plugin> > <groupId>org.apache.maven.plugins</groupId> > > <artifactId>maven-project-info-reports-plugin</artifactId> > <version>2.4</version> > <configuration> > > <dependencyDetailsEnabled>false</dependencyDetailsEnabled> > > <dependencyLocationsEnabled>false</dependencyLocationsEnabled> > </configuration> > <reports> > <report>index</report> > </reports> > </plugin> > <plugin> > <groupId>org.apache.maven.plugins</groupId> > > <artifactId>maven-surefire-report-plugin</artifactId> > </plugin> > <plugin> > <groupId>org.codehaus.mojo</groupId> > <artifactId>cobertura-maven-plugin</artifactId> > <!-- <version>2.6-SNAPSHOT</version> --> > <version>2.5.1</version> > <configuration> > <aggregate>true</aggregate> > <instrumentation> > <excludes> > <exclude>*/*</exclude> > > <exclude>com/itc/**/*Fake*.class</exclude> > </excludes> > </instrumentation> > <executions> > <execution> > <goals> > <goal>clean</goal> > </goals> > </execution> > </executions> > </configuration> > </plugin> > > Cheers, > > Miguel Almeida -- Dennis Lundberg --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
