Menu

#69 Deploy Cobertura 1.9.1 release on Maven central repository

closed-fixed
None
5
2009-05-10
2009-03-25
No

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.

Discussion

  • Bruno Bieth

    Bruno Bieth - 2009-03-31

    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>

     
  • John Lewis

    John Lewis - 2009-05-07
    • assigned_to: nobody --> lewijw
     
  • Stevo Slavic

    Stevo Slavic - 2009-05-07

    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

     
  • John Lewis

    John Lewis - 2009-05-08

    Thanks for your help.

    Synch request made:

    http://jira.codehaus.org/browse/MAVENUPLOAD-2453

     
  • Stevo Slavic

    Stevo Slavic - 2009-05-10
    • status: open --> closed-fixed
     
  • John Lewis

    John Lewis - 2009-05-11

    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.

     
  • John Lewis

    John Lewis - 2009-05-11

    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.

     
  • Stevo Slavic

    Stevo Slavic - 2009-05-11

    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.

     
  • Stevo Slavic

    Stevo Slavic - 2009-05-17

    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>

     
  • Stevo Slavic

    Stevo Slavic - 2009-05-18

    Yes, unfortunately new release is needed. Isn't 1.9.1.1 or 1.9.1.A better?