Cobertura code coverage.
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..
Here is the list of declaration for cobertura. If you use Maven you can use the following code to add the dependency for this POM file.
<dependency> <groupId>net.sourceforge.cobertura</groupId> <artifactId>cobertura</artifactId> <version>2.0.2</version> </dependency>
If you think this Maven repository POM file listing for cobertura is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
The cobertura-2.0.2 has 21 dependencies.The most popular ones are listed in the following table along with their categories and number of artifacts depending on them.
Category | Artifact | Depended By Count |
---|---|---|
XPath | jaxen 1.1-beta-8 Jaxen is a universal Java XPath engine. | 15 |
File | commons-io 2.4 The Commons IO library contains utility classes, stream implementations, file filters, file comparators, endian transformation classes, and much more. | 852 |
JUnit | ant-junit 1.8.3 contains the junit and junirreport tasks | 9 |
Servlet | servlet-api-2.5 6.1.14 Servlet Specification 2.5 API | 37 |
Jetty | jetty 6.1.14 Jetty server core | 11 |
Jetty | jetty-util 6.1.14 Utility classes for Jetty | 7 |
Development | javacc 5.0 JavaCC is a parser/scanner generator for Java. | 15 |
JUnit | junit 4.11 JUnit is a regression testing framework written by Erich Gamma and Kent Beck. It is used by the developer who implements unit tests in Java. | 2031 |
The following plugins are used in the cobertura-2.0.2.jar
The following packages are defined in the cobertura-2.0.2.jar
net.sourceforge.cobertura net.sourceforge.cobertura.ant net.sourceforge.cobertura.check net.sourceforge.cobertura.coveragedata net.sourceforge.cobertura.instrument net.sourceforge.cobertura.instrument.pass1 net.sourceforge.cobertura.instrument.pass2 net.sourceforge.cobertura.instrument.pass3 net.sourceforge.cobertura.instrument.tp net.sourceforge.cobertura.javancss net.sourceforge.cobertura.javancss.ccl net.sourceforge.cobertura.javancss.parser net.sourceforge.cobertura.javancss.parser.debug net.sourceforge.cobertura.javancss.parser.java15 net.sourceforge.cobertura.javancss.parser.java15.debug net.sourceforge.cobertura.merge net.sourceforge.cobertura.reporting net.sourceforge.cobertura.reporting.html net.sourceforge.cobertura.reporting.html.files net.sourceforge.cobertura.reporting.xml net.sourceforge.cobertura.util net.sourceforge.cobertura.webapp
Here is the content of the POM file.
<?xml version="1.0" encoding="UTF-8"?> <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>net.sourceforge.cobertura</groupId> <artifactId>cobertura</artifactId> <version>2.0.2</version> <packaging>jar</packaging> <name>Cobertura code coverage</name> <parent> <groupId>org.sonatype.oss</groupId> <artifactId>oss-parent</artifactId> <version>7</version> </parent> <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> <pluginRepositories> <pluginRepository> <id>sonatype-releases</id> <url>http://oss.sonatype.org/content/repositories/releases</url> </pluginRepository> <pluginRepository> <id>clojars.org</id> <url>http://clojars.org/repo</url> </pluginRepository> </pluginRepositories> <properties> <asmVersion>4.1</asmVersion> <xercesVersion>2.6.2</xercesVersion> <xalanVersion>2.6.0</xalanVersion> <oroVersion>2.0.8</oroVersion> <jaxenVersion>1.1-beta-8</jaxenVersion> <commonsioVersion>2.4</commonsioVersion> <antVersion>1.8.3</antVersion> <jettyVersion>6.1.14</jettyVersion> <simplexmlVersion>2.6.2</simplexmlVersion> <guavaVersion>13.0.1</guavaVersion> <groovyVersion>1.6-RC-1</groovyVersion> <jsr305Version>1.3.2</jsr305Version> <javaccVersion>5.0</javaccVersion> <log4jVersion>1.2.9</log4jVersion> <junitVersion>4.11</junitVersion> <jdkVersion>1.5</jdkVersion> <surefireVersion>2.12.3</surefireVersion> <plugin.java.formatter.version>0.3.1</plugin.java.formatter.version> <plugin.mvn.compiler.version>2.3.2</plugin.mvn.compiler.version> <plugin.mvn.jar.version>2.3.2</plugin.mvn.jar.version> <plugin.pmd.version>3.0.1</plugin.pmd.version> <plugin.jdoc.version>2.9</plugin.jdoc.version> <plugin.findbugs.version>2.5.2</plugin.findbugs.version> </properties> <dependencies> <dependency> <groupId>org.ow2.asm</groupId> <artifactId>asm</artifactId> <version>${asmVersion}</version> </dependency> <dependency> <groupId>org.ow2.asm</groupId> <artifactId>asm-tree</artifactId> <version>${asmVersion}</version> </dependency> <dependency> <groupId>org.ow2.asm</groupId> <artifactId>asm-commons</artifactId> <version>${asmVersion}</version> </dependency> <dependency> <groupId>org.ow2.asm</groupId> <artifactId>asm-util</artifactId> <version>${asmVersion}</version> </dependency> <dependency> <groupId>org.ow2.asm</groupId> <artifactId>asm-analysis</artifactId> <version>${asmVersion}</version> </dependency> <dependency> <groupId>xerces</groupId> <artifactId>xercesImpl</artifactId> <version>${xercesVersion}</version> <scope>test</scope> </dependency> <dependency> <groupId>xalan</groupId> <artifactId>xalan</artifactId> <version>${xalanVersion}</version> <scope>test</scope> </dependency> <dependency> <groupId>oro</groupId> <artifactId>oro</artifactId> <version>${oroVersion}</version> </dependency> <dependency> <groupId>jaxen</groupId> <artifactId>jaxen</artifactId> <version>${jaxenVersion}</version> </dependency> <dependency> <groupId>commons-io</groupId> <artifactId>commons-io</artifactId> <version>${commonsioVersion}</version> <scope>test</scope> </dependency> <dependency> <groupId>org.apache.ant</groupId> <artifactId>ant</artifactId> <version>${antVersion}</version> </dependency> <dependency> <groupId>org.apache.ant</groupId> <artifactId>ant-junit</artifactId> <version>${antVersion}</version> <scope>test</scope> </dependency> <dependency> <groupId>org.mortbay.jetty</groupId> <artifactId>servlet-api-2.5</artifactId> <version>${jettyVersion}</version> </dependency> <dependency> <groupId>org.mortbay.jetty</groupId> <artifactId>jetty</artifactId> <version>${jettyVersion}</version> </dependency> <dependency> <groupId>org.mortbay.jetty</groupId> <artifactId>jetty-util</artifactId> <version>${jettyVersion}</version> </dependency> <dependency> <groupId>org.mortbay.jetty</groupId> <artifactId>jetty-servlet-tester</artifactId> <version>${jettyVersion}</version> <scope>test</scope> </dependency> <dependency> <groupId>org.codehaus.groovy</groupId> <artifactId>groovy-all</artifactId> <version>${groovyVersion}</version> <scope>test</scope> </dependency> <dependency> <groupId>net.java.dev.javacc</groupId> <artifactId>javacc</artifactId> <version>${javaccVersion}</version> <scope>test</scope> </dependency> <dependency> <groupId>com.sun</groupId> <artifactId>tools</artifactId> <version>0</version> <scope>system</scope> <systemPath>${toolsjar}</systemPath> </dependency> <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <version>${log4jVersion}</version> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>${junitVersion}</version> <scope>test</scope> </dependency> </dependencies> <profiles> <profile> <id>WindowsProfile</id> <activation> <os> <family>Windows</family> </os> </activation> <properties> <toolsjar>${java.home}/../lib/tools.jar</toolsjar> </properties> </profile> <profile> <id>UnixProfile</id> <activation> <os> <family>unix</family> <name>Linux</name> </os> </activation> <properties> <toolsjar>${java.home}/../lib/tools.jar</toolsjar> </properties> </profile> <profile> <id>OSXProfile</id> <activation> <os> <family>mac</family> </os> </activation> <properties> <toolsjar>${java.home}/../lib/tools.jar</toolsjar> </properties> </profile> </profiles> <build> <plugins> <!-- https://code.google.com/p/maven-java-formatter-plugin/ https://github.com/treymarc/maven-java-formatter-plugin --> <plugin> <groupId>com.googlecode.maven-java-formatter-plugin</groupId> <artifactId>maven-java-formatter-plugin</artifactId> <version>${plugin.java.formatter.version}</version> <executions> <execution> <goals> <goal>format</goal> </goals> </execution> </executions> </plugin> <!-- Cobertura requires custom jdk version for providing the support for the latest jdk. --> <plugin> <groupId>com.code54.mojo</groupId> <artifactId>buildversion-plugin</artifactId> <version>1.0.2</version> <executions> <execution> <goals><goal>set-properties</goal></goals> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>${plugin.mvn.compiler.version}</version> <configuration> <fork>true</fork> <source>${jdkVersion}</source> <target>${jdkVersion}</target> <excludes> <exclude>**/test/*.java</exclude> </excludes> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <version>${plugin.mvn.jar.version}</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>${surefireVersion}</version> <configuration> <redirectTestOutputToFile>true</redirectTestOutputToFile> <excludes> <exclude>**/test/condition/**</exclude> <exclude>**/examples/functionaltest1/**</exclude> </excludes> </configuration> </plugin> <!-- This is required to assemble all of the binary files. --> <!-- The descriptor has more detailed information about what is included/excluded. --> <plugin> <artifactId>maven-assembly-plugin</artifactId> <version>2.2.1</version> <configuration> <descriptors> <descriptor>src/main/assembly/assembly.xml</descriptor> </descriptors> </configuration> <executions> <execution> <id>packageBins</id> <phase>package</phase> <goals> <goal>single</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-pmd-plugin</artifactId> <version>${plugin.pmd.version}</version> <configuration> <failOnViolation>false</failOnViolation> </configuration> <executions> <execution> <goals> <goal>check</goal> <goal>cpd-check</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>findbugs-maven-plugin</artifactId> <version>${plugin.findbugs.version}</version> <configuration> <failOnError>false</failOnError> </configuration> <executions> <execution> <goals> <goal>check</goal> </goals> </execution> </executions> </plugin> <!-- This is to build the coberturaFlush.war file necessary for servlets. --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <version>2.3</version> <configuration> <warName>coberturaFlush</warName> <webXml>src/main/resources/net/sourceforge/cobertura/webapp/web.xml</webXml> <packagingIncludes>WEB-INF/classes/net/sourceforge/cobertura/webapp/FlushCoberturaServlet.class</packagingIncludes> <archive> <manifest> <addClasspath>true</addClasspath> <classpathPrefix>lib/</classpathPrefix> </manifest> </archive> </configuration> <executions> <execution> <id>prepare-war</id> <phase>prepare-package</phase> <goals> <goal>war</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-release-plugin</artifactId> <version>2.4.1</version> <configuration> <localCheckout>true</localCheckout> <pushChanges>false</pushChanges> </configuration> </plugin> </plugins> </build> <reporting> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> <version>${plugin.jdoc.version}</version> </plugin> </plugins> </reporting> <scm> <connection>scm:git:git://github.com/cobertura/cobertura</connection> <developerConnection>scm:git:git@github.com:cobertura/cobertura.git</developerConnection> <url>http://github.com/cobertura/cobertura</url> <tag>cobertura-runtime-2.0.2</tag> </scm> <distributionManagement> <snapshotRepository> <id>sonatype-nexus-snapshots</id> <name>Sonatype Nexus Snapshots</name> <url>https://oss.sonatype.org/content/repositories/snapshots/</url> </snapshotRepository> <repository> <id>sonatype-nexus-staging</id> <name>Nexus Release Repository</name> <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url> </repository> </distributionManagement> </project>