[ 
http://jira.codehaus.org/browse/MCOBERTURA-44?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_99188
 ] 

D.M.A. Gunawardana commented on MCOBERTURA-44:
----------------------------------------------

Still got this bug on 2.1(Snapshot versions too) version of the plugin in a 
Linux enviroment with JDK 1.5 installed. (Maven version is 2.0.6.)

[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] net/sourceforge/cobertura/ant/Regex
[INFO] ------------------------------------------------------------------------
[INFO] Trace
java.lang.NoClassDefFoundError: net/sourceforge/cobertura/ant/Regex
        at java.lang.Class.getDeclaredMethods0(Native Method)
        at java.lang.Class.privateGetDeclaredMethods(Class.java:2395)
        at java.lang.Class.privateGetPublicMethods(Class.java:2519)
        at java.lang.Class.getMethods(Class.java:1406)
        at 
hidden.org.codehaus.plexus.util.ReflectionUtils.getSetter(ReflectionUtils.java:74)
        at 
org.codehaus.plexus.component.configurator.converters.ComponentValueSetter.initSetter(ComponentValueSetter.java:81)
        at 
org.codehaus.plexus.component.configurator.converters.ComponentValueSetter.<init>(ComponentValueSetter.java:62)
        at 
org.codehaus.plexus.component.configurator.converters.composite.ObjectWithFieldsConverter.processConfiguration(ObjectWithFieldsConverter.java:134)
        at 
org.codehaus.plexus.component.configurator.converters.composite.ObjectWithFieldsConverter.fromConfiguration(ObjectWithFieldsConverter.java:90)
        at 
org.codehaus.plexus.component.configurator.converters.ComponentValueSetter.configure(ComponentValueSetter.java:247)
        at 
org.codehaus.plexus.component.configurator.converters.composite.ObjectWithFieldsConverter.processConfiguration(ObjectWithFieldsConverter.java:137)
        at 
org.codehaus.plexus.component.configurator.BasicComponentConfigurator.configureComponent(BasicComponentConfigurator.java:56)
        at 
org.apache.maven.plugin.DefaultPluginManager.populatePluginFields(DefaultPluginManager.java:1147)
        at 
org.apache.maven.plugin.DefaultPluginManager.getConfiguredMojo(DefaultPluginManager.java:614)
        at 
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:421)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:480)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkProjectLifecycle(DefaultLifecycleExecutor.java:896)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkLifecycle(DefaultLifecycleExecutor.java:739)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:530)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:493)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:463)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:272)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
[INFO] ------------------------------------------------------------------------

plugin part of the root .pom file is given below.

<plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>cobertura-maven-plugin</artifactId>
                        <version>2.1</version>
                        
                        <dependencies>
                                <dependency>
                                        <groupId>cobertura</groupId>
                                        
<artifactId>cobertura-runtime</artifactId>
                                        <version>1.9rc1</version>
                                        <type>pom</type>
                                        <scope>runtime</scope>
                                </dependency>
                                <dependency>
                                        <groupId>cobertura</groupId>
                                        <artifactId>cobertura</artifactId>
                                        <version>[1.9rc1,)</version>
                                        <type>jar</type>
                                        <scope>runtime</scope>
                                </dependency>
                        </dependencies>
                        
                        <configuration>
                                <instrumentation>
                                        <ignores>
                                                
<ignore>com.mycompany.myapp.module1.*</ignore>
                                        </ignores>
                                        <excludes>
                                                
<exclude>com/mycompany/myapp/**/**/*Test.class</exclude>
                                        </excludes>
                                </instrumentation>
                                
                                <check>
                                <branchRate>85</branchRate>
                                <lineRate>85</lineRate>
                                <haltOnFailure>true</haltOnFailure>
                                <totalBranchRate>85</totalBranchRate>
                                <totalLineRate>85</totalLineRate>
                                <packageLineRate>85</packageLineRate>
                                <packageBranchRate>85</packageBranchRate>
                                
                                <regexes>
                                        
                                        <regex>
                                                <pattern>*.dao.*</pattern>
                                                <branchRate>90</branchRate>
                                                <lineRate>80</lineRate>
                                        </regex>
                                        
                                        <regex>
                                                <pattern>*.services.*</pattern>
                                                <branchRate>40</branchRate>
                                                <lineRate>30</lineRate>
                                        </regex>
                                </regexes>
                                
                              </check>
                        </configuration>
                        <executions>
                                <execution>
                                        <id>clean</id>
                                        <goals>
                                                <goal>clean</goal>
                                        </goals>
                                </execution>
                                <!-- Optional - only if user wants coverage 
checking -->
                                <execution>
                                        <id>build</id>
                                        <phase>verify</phase>
                                        <goals>
                                                <goal>instrument</goal>
                                                <goal>check</goal>
                                        </goals>
                                </execution>
                                <!-- End optional -->        
                        </executions>
</plugin> 



> Regex configuration cannot be set
> ---------------------------------
>
>                 Key: MCOBERTURA-44
>                 URL: http://jira.codehaus.org/browse/MCOBERTURA-44
>             Project: Maven 2.x Cobertura Plugin
>          Issue Type: Bug
>    Affects Versions: 2.0
>         Environment: Windows 2000 JDK 1.5
>            Reporter: Todd Nine
>            Priority: Blocker
>         Attachments: error1.txt
>
>
> I cannot set the regex patter for our coverage testing.  For instance the 
> following configuration 
> <plugin>
>                               <groupId>org.codehaus.mojo</groupId>
>                               <artifactId>cobertura-maven-plugin</artifactId>
>                               <configuration>
>                                       <check branchrate="100" linerate="100"
>                                               haltonerror="true" 
> totalbranchrate="100" totallinerate="80">
>                                               <regex 
> pattern="com.ata.encryption.*"
>                                                       branchrate="80" 
> linerate="90" />
>                                               <regex 
> pattern="com.ata.encryption.util.*"
>                                                       branchrate="40" 
> linerate="30" />
>                                       </check>
>                               </configuration>
>                               <executions>
>                                       <execution>
>                                               <goals>
>                                                       <goal>clean</goal>
>                                                       <goal>check</goal>
>                                               </goals>
>                                       </execution>
>                               </executions>
>                       </plugin>
> Produces the attachec stacktrace.  I cannot individually set packages.  Note 
> that this is from the current documentation located at 
> http://mojo.codehaus.org/cobertura-maven-plugin/usage.html#Check

-- 
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

Reply via email to