Please deploy Cobertura 1.9.1 release on Maven central repository. It would be nice to have this task as part of the Cobertura release process in future too.
<description>
Cobertura is a free Java tool that calculates the percentage of code accessed by tests.
It can be used to identify which parts of your Java program are lacking test coverage. It is based on jcoverage.
</description>
<url>http://cobertura.sourceforge.net</url>
<licenses>
<license>
<name>The GNU General Public License, Version 2</name>
<url>http://www.gnu.org/licenses/gpl.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
Checked, main artifact works fine. cobertura-runtime artifact doesn't work from the cobertura repo as its pom doesn't define any repositories but depends on main cobertura artifact which is not yet in central - by the looks of cobertura-runtime pom (same as in prev version, except for the version of course) it should work well too once cobertura repo is synchronized to central.
+1 go ahead, make a sync request
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Are you able to get it to work? I am having trouble, but I am new to maven.
When I do mvn:site with a simple project, I get:
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building mymavenproject
[INFO] task-segment: [site]
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] The plugin 'net.sourceforge.cobertura:cobertura' does not exist or no 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: Mon May 11 09:19:03 EDT 2009
[INFO] Final Memory: 2M/5M
[INFO] ------------------------------------------------------------------------
I finally got something when I did mvn cobertura:cobertura. However, the local repository has 1.9 in it, and the report that was generated was done with 1.9. But the maven-metadata-central.xml file has 1.9.1 in it.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
With cobertura:cobertura you are running maven cobertura plugin, its cobertura report mojo, and latest version of that plugin declares dependency to cobertura 1.9. A request has been made to update plugin to use cobertura 1.9.1 ( http://jira.codehaus.org/browse/MCOBERTURA-94 ) in next release.
What you can do to test if cobertura and cobertura-runtime 1.9.1 is accessible to a maven project like cobertura maven plugin is, is to create an empty maven 2 project and declare a dependency to cobertura or cobertura-runtime 1.9.1, then try e.g. packaging a project. If your project has war packaging then cobertura artifact (with or without it's transitive dependencies depending if cobertura or cobertura-runtime has been declared as dependency) will be included in war's lib folder.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I will be surprised if the change makes it to the maven central repo though. I think I remember reading something about the files being unmodifiable once they are there. We might need to do a 1.9.2.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've added 1.9.1 in my enterprise repository. I've used the following pom :
<?xml version="1.0" ?>
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>net.sourceforge.cobertura</groupId>
<artifactId>cobertura</artifactId>
<version>1.9.1</version>
<name>Cobertura</name>
<description>
Cobertura is a free Java tool that calculates the percentage of code accessed by tests.
It can be used to identify which parts of your Java program are lacking test coverage. It is based on jcoverage.
</description>
<url>http://cobertura.sourceforge.net</url>
<licenses>
<license>
<name>The GNU General Public License, Version 2</name>
<url>http://www.gnu.org/licenses/gpl.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
<dependencies>
<dependency>
<groupId>oro</groupId>
<artifactId>oro</artifactId>
<version>2.0.8</version>
</dependency>
<dependency>
<groupId>asm</groupId>
<artifactId>asm</artifactId>
<version>3.0</version>
</dependency>
<dependency>
<groupId>asm</groupId>
<artifactId>asm-tree</artifactId>
<version>3.0</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.9</version>
</dependency>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
<version>1.7.0</version>
</dependency>
</dependencies>
</project>
I have added a process to the build that will deploy a cobertura release to a maven repo on sourceforge. The intention is to have that repo synched with the central maven repository automatically (see http://maven.apache.org/guides/mini/guide-central-repository-upload.html\).
Before I make the synch request, is it possible for you to try it out? I am assuming you know more about Maven than I do. The maven repo is at:
http://cobertura.sourceforge.net/m2repo/net/sourceforge/cobertura/cobertura/maven-metadata.xml
The pom is at:
http://cobertura.sourceforge.net/m2repo/net/sourceforge/cobertura/cobertura/1.9.1/cobertura-1.9.1.pom
It looks identical to the one in mustaghattack's comment.
Checked, main artifact works fine. cobertura-runtime artifact doesn't work from the cobertura repo as its pom doesn't define any repositories but depends on main cobertura artifact which is not yet in central - by the looks of cobertura-runtime pom (same as in prev version, except for the version of course) it should work well too once cobertura repo is synchronized to central.
+1 go ahead, make a sync request
Thanks for your help.
Synch request made:
http://jira.codehaus.org/browse/MAVENUPLOAD-2453
Since last night, cobertura 1.9.1 is available at maven central repo ( http://mirrors.ibiblio.org/pub/mirrors/maven2/net/sourceforge/cobertura/cobertura/1.9.1/ )
Are you able to get it to work? I am having trouble, but I am new to maven.
When I do mvn:site with a simple project, I get:
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building mymavenproject
[INFO] task-segment: [site]
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] The plugin 'net.sourceforge.cobertura:cobertura' does not exist or no 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: Mon May 11 09:19:03 EDT 2009
[INFO] Final Memory: 2M/5M
[INFO] ------------------------------------------------------------------------
Here is the project pom:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany.app</groupId>
<artifactId>mymavenproject</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>mymavenproject</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<reporting>
<plugins>
<plugin>
<groupId>net.sourceforge.cobertura</groupId>
<artifactId>cobertura</artifactId>
</plugin>
</plugins>
</reporting>
</project>
I tried deleting my local maven repository.
I finally got something when I did mvn cobertura:cobertura. However, the local repository has 1.9 in it, and the report that was generated was done with 1.9. But the maven-metadata-central.xml file has 1.9.1 in it.
With cobertura:cobertura you are running maven cobertura plugin, its cobertura report mojo, and latest version of that plugin declares dependency to cobertura 1.9. A request has been made to update plugin to use cobertura 1.9.1 ( http://jira.codehaus.org/browse/MCOBERTURA-94 ) in next release.
What you can do to test if cobertura and cobertura-runtime 1.9.1 is accessible to a maven project like cobertura maven plugin is, is to create an empty maven 2 project and declare a dependency to cobertura or cobertura-runtime 1.9.1, then try e.g. packaging a project. If your project has war packaging then cobertura artifact (with or without it's transitive dependencies depending if cobertura or cobertura-runtime has been declared as dependency) will be included in war's lib folder.
Apparently, there is error in cobertura-runtime 1.9.1 pom file, groupId element is missing.
John, please add following groupId before artifactId element:
<groupId>net.sourceforge.cobertura</groupId>
It has been added.
http://cobertura.sourceforge.net/m2repo/net/sourceforge/cobertura/cobertura-runtime/1.9.1/cobertura-runtime-1.9.1.pom
I will be surprised if the change makes it to the maven central repo though. I think I remember reading something about the files being unmodifiable once they are there. We might need to do a 1.9.2.
Yes, unfortunately new release is needed. Isn't 1.9.1.1 or 1.9.1.A better?
Hi Stevo,
Version 1.9.1.1 is now on the cobertura repo.
http://cobertura.sourceforge.net/m2repo/net/sourceforge/cobertura/cobertura/1.9.1.1/cobertura-1.9.1.1.pom
Thanks for your help.