You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by javed mandary <ja...@gmail.com> on 2006/02/03 08:31:26 UTC

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

Re: Using cobertura with Maven 2

Posted by javed mandary <ja...@gmail.com>.
Hi Rik,

 I did as you told me , I was able to download part of the cobertura jars
however was unable to download all required artifacts please see log:

Downloading:
http://snapshots.maven.codehaus.org/maven2//org/codehaus/mojo/cober
tura-maven-plugin/2.0-SNAPSHOT/cobertura-
maven-plugin-2.0-20060130.214008-3.pom
3K downloaded
[INFO] snapshot org.codehaus.mojo:mojo-sandbox:2-SNAPSHOT: checking for
updates
from Maven Snapshots
[INFO] snapshot org.codehaus.mojo:mojo-sandbox:2-SNAPSHOT: checking for
updates
from repo-ibiblio-mirror
[INFO] snapshot org.codehaus.mojo:mojo-sandbox:2-SNAPSHOT: checking for
updates
from repo-displaytag
[INFO] snapshot org.codehaus.mojo:mojo-sandbox:2-SNAPSHOT: checking for
updates
from repo-local
Downloading:
http://snapshots.maven.codehaus.org/maven2//org/codehaus/mojo/mojo-
sandbox/2-SNAPSHOT/mojo-sandbox-2-20060116.044847-1.pom
2K downloaded
Downloading:
http://snapshots.maven.codehaus.org/maven2//org/codehaus/mojo/cober
tura-maven-plugin/2.0-SNAPSHOT/cobertura-
maven-plugin-2.0-20060130.214008-3.jar
26K downloaded
[INFO] artifact org.codehaus.mojo:cobertura-maven-plugin: checking for
updates f
rom central
[INFO]
-------------------------------------------------------------------------
---
[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: 24 seconds
[INFO] Finished at: Fri Feb 03 16:06:03 GST 2006
[INFO] Final Memory: 7M/14M

Do you have an idea of what could be causing that?

thanks,
    Javed

On 2/3/06, Rik Bosman <g....@gmail.com> wrote:
>
> Jared,
>
> I had the same problem and solved it with the following actions:
>
> - Add the version to both the plugins: <version>2.0-SNAPSHOT</version>
> - Add the sandbox repository to the pom, see below.
>
> Hope this helps,
>
> Kindly revert for clarifications,
>
> Rik
>
> <repositories>
>   <repository>
>    <id>Maven Snapshots</id>
>    <url>http://snapshots.maven.codehaus.org/maven2/</url>
>    <snapshots>
>     <enabled>true</enabled>
>    </snapshots>
>    <releases>
>     <enabled>false</enabled>
>    </releases>
>   </repository>
> </repositories>
> <pluginRepositories>
>   <pluginRepository>
>    <id>Maven Snapshots</id>
>    <url>http://snapshots.maven.codehaus.org/maven2/</url>
>    <snapshots>
>     <enabled>true</enabled>
>    </snapshots>
>    <releases>
>     <enabled>false</enabled>
>    </releases>
>   </pluginRepository>
> </pluginRepositories>
>
>
>
> 2006/2/3, javed mandary <ja...@gmail.com>:
> >
> > 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
> >
> >
>
>

Re: Using cobertura with Maven 2

Posted by javed mandary <ja...@gmail.com>.
Hi,
    am having the same problem too with cobertura when reports are to be
generated in the build. I think the best option would be to switch to
M2.0if cobertura plugin is really required else wait for the fix.

cheers,
javed

On 2/3/06, David Sag <ds...@epo.org> wrote:
>
>
> The only solution i know right now is not to include cobertura repoorts
> and hope whoever is working on the plugin fixes whatever it is they did to
> break it between maven 2.0 and 2.0.2
>
> I had a big presentation on maven today and was luckily able to skirt
> around the cobertura issue with some quick sleight of hand.  so i have
> bought myself a week i think.
>
> Kind regards,
> Dave Sag
>
>
>
>
>
>
> Rik Bosman <g....@gmail.com> wrote on 03-02-2006 16:33:39:
>
> > David,
> >
> > I do run into (the same you had I think )
> > net.sourceforge.cobertura.instrument.Main - Unable to instrument file.
> > Do you know a solution?
> >
> > I'm using mvn 2.02.
> >
> > regards,
> >
> > Rik
> >
> >
> > 2006/2/3, David Sag <ds...@epo.org>:
> > >
> > >
> > > Hi Rik,
> > >
> > > So you have actually been able to get the 2.0-SNAPSHOT to work?  I'd
> love
> > > to see how. I have been trying all week to get the cobertura reports
> to work
> > > but since iupping to maven 2.0.2 have not been successful due to the
> > > problem of it generating 0 byte instrumented class files during the
> > > reporting phase that overwrite the originally instrumented class
> files.
> > >
> > > Kind regards,
> > > Dave Sag
> > >
> > >
> > >
> > >
> > >
> > >
> > > Rik Bosman <g....@gmail.com> wrote on 03-02-2006 10:29:45:
> > >
> > > > Jared,
> > > >
> > > > I had the same problem and solved it with the following actions:
> > > >
> > > > - Add the version to both the plugins: <version>2.0-SNAPSHOT
> </version>
> > > > - Add the sandbox repository to the pom, see below.
> > > >
> > > > Hope this helps,
> > > >
> > > > Kindly revert for clarifications,
> > > >
> > > > Rik
> > > >
> > > > <repositories>
> > > >   <repository>
> > > >    <id>Maven Snapshots</id>
> > > >    <url>http://snapshots.maven.codehaus.org/maven2/</url>
> > > >    <snapshots>
> > > >     <enabled>true</enabled>
> > > >    </snapshots>
> > > >    <releases>
> > > >     <enabled>false</enabled>
> > > >    </releases>
> > > >   </repository>
> > > >  </repositories>
> > > >  <pluginRepositories>
> > > >   <pluginRepository>
> > > >    <id>Maven Snapshots</id>
> > > >    <url>http://snapshots.maven.codehaus.org/maven2/</url>
> > > >    <snapshots>
> > > >     <enabled>true</enabled>
> > > >    </snapshots>
> > > >    <releases>
> > > >     <enabled>false</enabled>
> > > >    </releases>
> > > >   </pluginRepository>
> > > >  </pluginRepositories>
> > > >
> > > >
> > > >
> > > > 2006/2/3, javed mandary <ja...@gmail.com>:
> > > > >
> > > > > 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
> > > > >
> > > > >
> > >
>

Re: Using cobertura with Maven 2

Posted by David Sag <ds...@epo.org>.
The only solution i know right now is not to include cobertura repoorts 
and hope whoever is working on the plugin fixes whatever it is they did to 
break it between maven 2.0 and 2.0.2

I had a big presentation on maven today and was luckily able to skirt 
around the cobertura issue with some quick sleight of hand.  so i have 
bought myself a week i think.

Kind regards,
Dave Sag 




 

Rik Bosman <g....@gmail.com> wrote on 03-02-2006 16:33:39:

> David,
> 
> I do run into (the same you had I think )
> net.sourceforge.cobertura.instrument.Main - Unable to instrument file.
> Do you know a solution?
> 
> I'm using mvn 2.02.
> 
> regards,
> 
> Rik
> 
> 
> 2006/2/3, David Sag <ds...@epo.org>:
> >
> >
> > Hi Rik,
> >
> > So you have actually been able to get the 2.0-SNAPSHOT to work?  I'd 
love
> > to see how. I have been trying all week to get the cobertura reports 
to work
> > but since iupping to maven 2.0.2 have not been successful due to the
> > problem of it generating 0 byte instrumented class files during the
> > reporting phase that overwrite the originally instrumented class 
files.
> >
> > Kind regards,
> > Dave Sag
> >
> >
> >
> >
> >
> >
> > Rik Bosman <g....@gmail.com> wrote on 03-02-2006 10:29:45:
> >
> > > Jared,
> > >
> > > I had the same problem and solved it with the following actions:
> > >
> > > - Add the version to both the plugins: 
<version>2.0-SNAPSHOT</version>
> > > - Add the sandbox repository to the pom, see below.
> > >
> > > Hope this helps,
> > >
> > > Kindly revert for clarifications,
> > >
> > > Rik
> > >
> > > <repositories>
> > >   <repository>
> > >    <id>Maven Snapshots</id>
> > >    <url>http://snapshots.maven.codehaus.org/maven2/</url>
> > >    <snapshots>
> > >     <enabled>true</enabled>
> > >    </snapshots>
> > >    <releases>
> > >     <enabled>false</enabled>
> > >    </releases>
> > >   </repository>
> > >  </repositories>
> > >  <pluginRepositories>
> > >   <pluginRepository>
> > >    <id>Maven Snapshots</id>
> > >    <url>http://snapshots.maven.codehaus.org/maven2/</url>
> > >    <snapshots>
> > >     <enabled>true</enabled>
> > >    </snapshots>
> > >    <releases>
> > >     <enabled>false</enabled>
> > >    </releases>
> > >   </pluginRepository>
> > >  </pluginRepositories>
> > >
> > >
> > >
> > > 2006/2/3, javed mandary <ja...@gmail.com>:
> > > >
> > > > 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
> > > >
> > > >
> >

Re: Using cobertura with Maven 2

Posted by Rik Bosman <g....@gmail.com>.
David,

I do run into (the same you had I think )
net.sourceforge.cobertura.instrument.Main - Unable to instrument file.
Do you know a solution?

I'm using mvn 2.02.

regards,

Rik


2006/2/3, David Sag <ds...@epo.org>:
>
>
> Hi Rik,
>
> So you have actually been able to get the 2.0-SNAPSHOT to work?  I'd love
> to see how. I have been trying all week to get the cobertura reports to work
> but since iupping to maven 2.0.2 have not been successful due to the
> problem of it generating 0 byte instrumented class files during the
> reporting phase that overwrite the originally instrumented class files.
>
> Kind regards,
> Dave Sag
>
>
>
>
>
>
> Rik Bosman <g....@gmail.com> wrote on 03-02-2006 10:29:45:
>
> > Jared,
> >
> > I had the same problem and solved it with the following actions:
> >
> > - Add the version to both the plugins: <version>2.0-SNAPSHOT</version>
> > - Add the sandbox repository to the pom, see below.
> >
> > Hope this helps,
> >
> > Kindly revert for clarifications,
> >
> > Rik
> >
> > <repositories>
> >   <repository>
> >    <id>Maven Snapshots</id>
> >    <url>http://snapshots.maven.codehaus.org/maven2/</url>
> >    <snapshots>
> >     <enabled>true</enabled>
> >    </snapshots>
> >    <releases>
> >     <enabled>false</enabled>
> >    </releases>
> >   </repository>
> >  </repositories>
> >  <pluginRepositories>
> >   <pluginRepository>
> >    <id>Maven Snapshots</id>
> >    <url>http://snapshots.maven.codehaus.org/maven2/</url>
> >    <snapshots>
> >     <enabled>true</enabled>
> >    </snapshots>
> >    <releases>
> >     <enabled>false</enabled>
> >    </releases>
> >   </pluginRepository>
> >  </pluginRepositories>
> >
> >
> >
> > 2006/2/3, javed mandary <ja...@gmail.com>:
> > >
> > > 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
> > >
> > >
>

Re: Using cobertura with Maven 2

Posted by David Sag <ds...@epo.org>.
Hi Rik,

So you have actually been able to get the 2.0-SNAPSHOT to work?  I'd love 
to see how. I have been trying all week to get the cobertura reports to 
work but since iupping to maven 2.0.2 have not been successful due to the 
problem of it generating 0 byte instrumented class files during the 
reporting phase that overwrite the originally instrumented class files.

Kind regards,
Dave Sag 




 

Rik Bosman <g....@gmail.com> wrote on 03-02-2006 10:29:45:

> Jared,
> 
> I had the same problem and solved it with the following actions:
> 
> - Add the version to both the plugins: <version>2.0-SNAPSHOT</version>
> - Add the sandbox repository to the pom, see below.
> 
> Hope this helps,
> 
> Kindly revert for clarifications,
> 
> Rik
> 
> <repositories>
>   <repository>
>    <id>Maven Snapshots</id>
>    <url>http://snapshots.maven.codehaus.org/maven2/</url>
>    <snapshots>
>     <enabled>true</enabled>
>    </snapshots>
>    <releases>
>     <enabled>false</enabled>
>    </releases>
>   </repository>
>  </repositories>
>  <pluginRepositories>
>   <pluginRepository>
>    <id>Maven Snapshots</id>
>    <url>http://snapshots.maven.codehaus.org/maven2/</url>
>    <snapshots>
>     <enabled>true</enabled>
>    </snapshots>
>    <releases>
>     <enabled>false</enabled>
>    </releases>
>   </pluginRepository>
>  </pluginRepositories>
> 
> 
> 
> 2006/2/3, javed mandary <ja...@gmail.com>:
> >
> > 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
> >
> >

Re: Using cobertura with Maven 2

Posted by Rik Bosman <g....@gmail.com>.
Jared,

I had the same problem and solved it with the following actions:

- Add the version to both the plugins: <version>2.0-SNAPSHOT</version>
- Add the sandbox repository to the pom, see below.

Hope this helps,

Kindly revert for clarifications,

Rik

<repositories>
  <repository>
   <id>Maven Snapshots</id>
   <url>http://snapshots.maven.codehaus.org/maven2/</url>
   <snapshots>
    <enabled>true</enabled>
   </snapshots>
   <releases>
    <enabled>false</enabled>
   </releases>
  </repository>
 </repositories>
 <pluginRepositories>
  <pluginRepository>
   <id>Maven Snapshots</id>
   <url>http://snapshots.maven.codehaus.org/maven2/</url>
   <snapshots>
    <enabled>true</enabled>
   </snapshots>
   <releases>
    <enabled>false</enabled>
   </releases>
  </pluginRepository>
 </pluginRepositories>



2006/2/3, javed mandary <ja...@gmail.com>:
>
> 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
>
>

Re: Using cobertura with Maven 2

Posted by David Sag <ds...@epo.org>.
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 <ja...@gmail.com> 
03-02-2006 08:31
Please respond to
"Maven Users List" <us...@maven.apache.org>


To
Maven Users List <us...@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