you will need to enable snapshots to get the cobertura plugin as it has not actually ever been released.

then try

   <plugins>
            <plugin>
               <groupId>org.codehaus.mojo</groupId>
               <artifactId>cobertura-maven-plugin</artifactId>

                <version>2.0-SNAPSHOT</version>
               <executions>
                 <execution>

                    <phase>process-classes</phase>
                   <goals>
                     <goal>instrument</goal>
                   </goals>
                 </execution>
               </executions>
            </plugin>

 <plugins>

the 2.0 snapshot breaks in reporting however as it tries to instrument the classes again and this time it generates 0 byte class files.

Kind regards,
Dave Sag




 



javed mandary <[EMAIL PROTECTED]>

03-02-2006 08:31

Please respond to
"Maven Users List" <users@maven.apache.org>

To
Maven Users List <users@maven.apache.org>
cc
Subject
Using cobertura with Maven 2





Hi Guys,
            i'd like to know some information about the cobertura plugin in
general:

1. On which repo is the cobertura-maven-plugin hosted ?
2. How to configure it in your POM ?

I tried the following 2 configurations in my POM:
-----------------------------------EXTRACT OF MY POM
------------------------------------------
<build>
 ....
  <plugins>
            <plugin>
               <groupId>org.codehaus.mojo</groupId>
               <artifactId>cobertura-maven-plugin</artifactId>
               <executions>
                 <execution>
                   <goals>
                     <goal>clean</goal>
                   </goals>
                 </execution>
               </executions>
            </plugin>

 <plugins>
...
<reporting>
     <plugins>
          <plugin>
                   <groupId>org.codehaus.mojo</groupId>
                   <artifactId>cobertura-maven-plugin</artifactId>
             </plugin>
       </plugins>
   </reporting>
</build>
---------------------------------------------------------END-------------------------------------

I get the following error:

---
[ERROR] BUILD ERROR
[INFO]
-------------------------------------------------------------------------
---
[INFO] The plugin 'org.codehaus.mojo:cobertura-maven-plugin' does not exist
or n
o valid version could be found
[INFO]
-------------------------------------------------------------------------
---
[INFO] For more information, run Maven with the -e switch
[INFO]
-------------------------------------------------------------------------
---
[INFO] Total time: 1 second
[INFO] Finished at: Fri Feb 03 11:34:19 GST 2006
[INFO] Final Memory: 2M/4M
[INFO] --------------------------
-----------------------------------------------

Is there any other configurations that is required ? I am using Maven 2.0.2.

kind regards,
         Javed

Reply via email to