rpms/cobertura/devel cobertura-1.9.pom, NONE, 1.1 cobertura-build_xml.patch, NONE, 1.1 cobertura-runtime-1.9.pom, NONE, 1.1 cobertura-scripts.patch, NONE, 1.1 cobertura.spec, NONE, 1.1 import.log, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Victor G. Vasilyev victorv at fedoraproject.org
Thu Aug 13 00:23:09 UTC 2009


Author: victorv

Update of /cvs/pkgs/rpms/cobertura/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv11081/devel

Modified Files:
	.cvsignore sources 
Added Files:
	cobertura-1.9.pom cobertura-build_xml.patch 
	cobertura-runtime-1.9.pom cobertura-scripts.patch 
	cobertura.spec import.log 
Log Message:
Initial version



--- NEW FILE cobertura-1.9.pom ---
<project>
  <modelVersion>4.0.0</modelVersion>
  <groupId>JPP</groupId>
  <artifactId>cobertura</artifactId>
  <version>1.9</version>

  <dependencies>
    <dependency>
      <groupId>JPP</groupId>
      <artifactId>oro</artifactId>
      <version>2.0.8</version>
    </dependency>
    <dependency>
      <groupId>JPP/asm2</groupId>
      <artifactId>asm2</artifactId>
      <version>2.2.1</version>
    </dependency>
    <dependency>
      <groupId>JPP/asm2</groupId>
      <artifactId>asm2-tree</artifactId>
      <version>2.2.1</version>
    </dependency>
    <dependency>
      <groupId>JPP</groupId>
      <artifactId>log4j</artifactId>
      <version>1.2.9</version>
    </dependency>
  </dependencies>

</project>

cobertura-build_xml.patch:
 build.xml |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- NEW FILE cobertura-build_xml.patch ---
--- build.xml.sav	2007-07-19 18:03:37.000000000 +0200
+++ build.xml	2007-07-19 18:05:47.000000000 +0200
@@ -236,7 +236,7 @@
 			<report format="frames" todir="${build.reports.dir}/junit-html" />
 		</junitreport>
 
-		<fail message="Tests failed." if="test.failed" />
+		<echo message="Tests failed is ${test.failed}" />
 	</target>
 
 	<target name="coverage-report">


--- NEW FILE cobertura-runtime-1.9.pom ---
<?xml version="1.0" ?>
<project>
  <modelVersion>4.0.0</modelVersion>

  <groupId>net.sourceforge.cobertura</groupId>
  <artifactId>cobertura-runtime</artifactId>
  <name>Cobertura :: Limited Runtime</name>
  <version>1.9</version>
  <packaging>pom</packaging>

  <description>
    Cobertura Runtime artifact to prevent unneeded dependencies at runtime.
  </description>

  <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>net.sourceforge.cobertura</groupId>
      <artifactId>cobertura</artifactId>
      <version>1.9</version>
      <exclusions>
        <exclusion>
          <groupId>oro</groupId>
          <artifactId>oro</artifactId>
        </exclusion>
        <exclusion>
          <groupId>asm</groupId>
          <artifactId>asm</artifactId>
        </exclusion>
        <exclusion>
          <groupId>asm</groupId>
          <artifactId>asm-tree</artifactId>
        </exclusion>
        <exclusion>
          <groupId>log4j</groupId>
          <artifactId>log4j</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
  </dependencies>

</project>

cobertura-scripts.patch:
 cobertura-check.sh      |   10 +++++++++-
 cobertura-instrument.sh |   10 +++++++++-
 cobertura-merge.sh      |   10 +++++++++-
 cobertura-report.sh     |   10 +++++++++-
 4 files changed, 36 insertions(+), 4 deletions(-)

--- NEW FILE cobertura-scripts.patch ---
--- cobertura-check.sh.sav	2007-06-05 20:39:54.000000000 +0200
+++ cobertura-check.sh	2007-07-20 15:12:12.000000000 +0200
@@ -1 +1,9 @@
-java -cp `dirname $0`/cobertura.jar:`dirname $0`/lib/asm-2.2.1.jar:`dirname $0`/lib/asm-tree-2.2.1.jar:`dirname $0`/lib/log4j-1.2.9.jar:`dirname $0`/lib/jakarta-oro-2.0.8.jar net.sourceforge.cobertura.check.Main $*
+#!/bin/sh
+export CLASSPATH=$(build-classpath \
+cobertura \
+asm2/asm2 \
+asm2/asm2-tree \
+log4j \
+oro \
+)
+java net.sourceforge.cobertura.check.Main $*
--- cobertura-instrument.sh.sav	2007-06-05 20:39:53.000000000 +0200
+++ cobertura-instrument.sh	2007-07-20 15:12:19.000000000 +0200
@@ -1 +1,9 @@
-java -cp `dirname $0`/cobertura.jar:`dirname $0`/lib/asm-2.2.1.jar:`dirname $0`/lib/asm-tree-2.2.1.jar:`dirname $0`/lib/log4j-1.2.9.jar:`dirname $0`/lib/jakarta-oro-2.0.8.jar net.sourceforge.cobertura.instrument.Main $*
+#!/bin/sh
+export CLASSPATH=$(build-classpath \
+cobertura \
+asm2/asm2 \
+asm2/asm2-tree \
+log4j \
+oro \
+)
+java net.sourceforge.cobertura.instrument.Main $*
--- cobertura-merge.sh.sav	2007-06-05 20:39:54.000000000 +0200
+++ cobertura-merge.sh	2007-07-20 15:12:28.000000000 +0200
@@ -1 +1,9 @@
-java -cp `dirname $0`/cobertura.jar:`dirname $0`/lib/asm-2.2.1.jar:`dirname $0`/lib/asm-tree-2.2.1.jar:`dirname $0`/lib/log4j-1.2.9.jar:`dirname $0`/lib/jakarta-oro-2.0.8.jar net.sourceforge.cobertura.merge.Main $*
+#!/bin/sh
+export CLASSPATH=$(build-classpath \
+cobertura \
+asm2/asm2 \
+asm2/asm2-tree \
+log4j \
+oro \
+)
+java net.sourceforge.cobertura.merge.Main $*
--- cobertura-report.sh.sav	2007-06-05 20:39:53.000000000 +0200
+++ cobertura-report.sh	2007-07-20 15:12:34.000000000 +0200
@@ -1 +1,9 @@
-java -cp `dirname $0`/cobertura.jar:`dirname $0`/lib/asm-2.2.1.jar:`dirname $0`/lib/asm-tree-2.2.1.jar:`dirname $0`/lib/log4j-1.2.9.jar:`dirname $0`/lib/jakarta-oro-2.0.8.jar net.sourceforge.cobertura.reporting.Main $*
+#!/bin/sh
+export CLASSPATH=$(build-classpath \
+cobertura \
+asm2/asm2 \
+asm2/asm2-tree \
+log4j \
+oro \
+)
+java net.sourceforge.cobertura.reporting.Main $*


--- NEW FILE cobertura.spec ---
Name:           cobertura
Version:        1.9
Release:        2%{?dist}
Summary:        Free Java tool that calculates the percentage of code accessed by tests

Group:          Development/Libraries
License:        ASL 1.1 and GPLv2+
URL:            http://cobertura.sourceforge.net/

Source0:        http://prdownloads.sourceforge.net/cobertura/cobertura-1.9-src.tar.gz
Source1:        %{name}-%{version}.pom
Source2:        %{name}-runtime-%{version}.pom
Patch0:         cobertura-build_xml.patch
Patch1:         cobertura-scripts.patch

BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  ant >= 0:1.6.5
BuildRequires:  ant-junit
BuildRequires:  ant-trax
BuildRequires:  asm2
BuildRequires:  dos2unix
BuildRequires:  jpackage-utils >= 0:1.7.3
BuildRequires:  java-devel
BuildRequires:  jakarta-oro
BuildRequires:  jaxen
BuildRequires:  jdom
BuildRequires:  junit
BuildRequires:  log4j
BuildRequires:  xalan-j2
BuildRequires:  xerces-j2
BuildRequires:  xml-commons-jaxp-1.3-apis

Requires:       ant >= 0:1.6.5
Requires:       asm2
Requires:       jpackage-utils >= 0:1.7.3
Requires:       java
Requires:       jakarta-oro
Requires:       junit
Requires:       log4j

Requires(post): jpackage-utils >= 0:1.7.3
Requires(postun): jpackage-utils >= 0:1.7.3

BuildArch:      noarch

%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.

Features

    * Can be executed from ant or from the command line.
    * Instruments Java bytecode after it has been compiled.
    * Can generate reports in HTML or XML.
    * Shows percent of lines coveraged and branches coveraged for each
      class, package, and for the overall project.
    * Shows the McCabe cyclomatic code complexity of each class, and
      the average cyclomatic code complexity for each package, and for
      the overall product.
    * Can sort HTML results by class name, percent of lines covered,
      percent of branches covered, etc. And can sort in ascending or
      decending order.

NOTE: Due to asm version conflicts, if you use Cobertura as an ant
      task you MUST add manually a classpath element 

        <classpath location="/usr/share/java/asm2/asm2.jar"/>

      to all Cobertura tasks requiring bytecode manipulation.

%package        javadoc
Summary:        Javadoc for %{name}
Group:          Documentation
Requires:       %{name}-%{version}-%{release}

%description    javadoc
This package contains the API documentation for %{name}.

%prep
%setup -q
%patch0 -b .sav
%patch1 -b .sav
find . -type f -name '*.jar' | xargs -t rm

dos2unix -k ChangeLog COPYING COPYRIGHT README

%build
pushd lib
%__ln_s -f %{_javadir}/asm2/asm2.jar
%__ln_s -f %{_javadir}/asm2/asm2-tree.jar
%__ln_s -f %{_javadir}/jaxen.jar
%__ln_s -f %{_javadir}/jdom.jar
%__ln_s -f %{_javadir}/junit.jar
%__ln_s -f %{_javadir}/oro.jar
%__ln_s -f %{_javadir}/log4j.jar
%__ln_s -f %{_javadir}/xalan-j2.jar
pushd xerces
%__ln_s -f %{_javadir}/xerces-j2.jar
%__ln_s -f %{_javadir}/xml-commons-jaxp-1.3-apis.jar
popd
popd

export CLASSPATH=
export OPT_JAR_LIST="junit ant/ant-junit jaxp_transform_impl ant/ant-trax xalan-j2-serializer"
%ant compile test jar javadoc

%install
%__rm -rf %{buildroot}

# jar
%__mkdir_p %{buildroot}%{_javadir}
%__cp -a %{name}.jar %{buildroot}%{_javadir}/%{name}-%{version}.jar
(cd %{buildroot}%{_javadir} && for jar in *-%{version}*; do \
%__ln_s ${jar} ${jar/-%{version}/}; done)
%add_to_maven_depmap cobertura cobertura %{version} JPP %{name}
%add_to_maven_depmap cobertura cobertura-runtime %{version} JPP %{name}
%add_to_maven_depmap net.sourceforge.cobertura cobertura %{version} JPP %{name}
%add_to_maven_depmap net.sourceforge.cobertura cobertura-runtime %{version} JPP %{name}

# pom
%__mkdir_p %{buildroot}%{_datadir}/maven2/poms
%__cp -a %{SOURCE1} %{buildroot}%{_datadir}/maven2/poms/JPP-%{name}.pom
%__cp -a %{SOURCE2} %{buildroot}%{_datadir}/maven2/poms/JPP-%{name}-runtime.pom

%__mkdir_p  %{buildroot}%{_sysconfdir}/ant.d
%__cat > %{buildroot}%{_sysconfdir}/ant.d/%{name} << EOF
ant cobertura junit log4j oro xerces-j2
EOF

# bin
%__mkdir_p %{buildroot}%{_bindir}
%__install -m 755 cobertura-check.sh %{buildroot}%{_bindir}/cobertura-check
%__install -m 755 cobertura-instrument.sh %{buildroot}%{_bindir}/cobertura-instrument
%__install -m 755 cobertura-merge.sh %{buildroot}%{_bindir}/cobertura-merge
%__install -m 755 cobertura-report.sh %{buildroot}%{_bindir}/cobertura-report

# javadoc
%__mkdir_p %{buildroot}%{_javadocdir}/%{name}
%__cp -a build/api/* %{buildroot}%{_javadocdir}/%{name}

%clean
%__rm -rf %{buildroot}

%post
%update_maven_depmap

%postun
%update_maven_depmap

%files
%defattr(-,root,root,-)
%doc ChangeLog COPYING COPYRIGHT README
%attr(0755,root,root) %{_bindir}/*
%{_javadir}/*.jar
%config(noreplace) %{_sysconfdir}/ant.d/%{name}
%{_datadir}/maven2/poms/JPP-%{name}*.pom
%config(noreplace) %{_mavendepmapfragdir}

%files javadoc
%defattr(-,root,root,-)
%doc %{_javadocdir}/%{name}

%changelog
* Sun Aug 09 2009  Victor Vasilyev <victor.vasilyev at sun.com> 1.9-2
- The license tag is changed according to http://cobertura.sourceforge.net/license.html
* Fri Jun 19 2009  Victor Vasilyev <victor.vasilyev at sun.com> 1.9-1
- release 1.9


--- NEW FILE import.log ---
cobertura-1_9-2_fc12:HEAD:cobertura-1.9-2.fc12.src.rpm:1250123324


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/cobertura/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- .cvsignore	13 Aug 2009 00:02:18 -0000	1.1
+++ .cvsignore	13 Aug 2009 00:23:09 -0000	1.2
@@ -0,0 +1 @@
+cobertura-1.9-src.tar.gz


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/cobertura/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- sources	13 Aug 2009 00:02:18 -0000	1.1
+++ sources	13 Aug 2009 00:23:09 -0000	1.2
@@ -0,0 +1 @@
+0b23286374edc1e0a9ed7dd592b0fed3  cobertura-1.9-src.tar.gz




More information about the fedora-extras-commits mailing list