[ 
https://jira.codehaus.org/browse/MCOBERTURA-52?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=274201#comment-274201
 ] 

Dan Ox commented on MCOBERTURA-52:
----------------------------------

This appears to still be a problem 5 years later. I've been trying to exclude 
calls to common logging from instrumentation but it seems to have no effect. 
Reports and checks still pick up the log calls as relevant. The config I am 
using looks like:

{code:title=pom.xml}
<plugins>
        <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>cobertura-maven-plugin</artifactId>
                <configuration>
                        <quiet>false</quiet>
                        <instrumentation>
                                <ignores>
                                        
<ignore>org.apache.commons.logging.*</ignore>
                                </ignores>
                        </instrumentation>
                        <check>
                        ...
                        </check>
                </configuration>
        </plugin>
<plugins>
{code}

I've traced through the plugin and verified that it is sending an ignores 
parameter to the cobertura program, so I think that they plugin is not at fault 
unless it is doing something else that invalidates the ignore parameter. This 
is very frustrating.

> Ignores and Excludes do nothing
> -------------------------------
>
>                 Key: MCOBERTURA-52
>                 URL: https://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.
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


Reply via email to