[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [metrics-base/master] Remove Cobertura from the build process.



commit 75cda35ba7375ab0f5b12fa214620c3a29917097
Author: Karsten Loesing <karsten.loesing@xxxxxxx>
Date:   Mon Aug 12 09:23:47 2019 +0200

    Remove Cobertura from the build process.
    
    We're having trouble with Cobertura and Java 8, most likely due to it
    not being maintained anymore. We're removing it now and will be
    replacing it with something else later.
    
    Resolves #31361.
---
 java/base.xml | 60 -----------------------------------------------------------
 java/ivy.xml  |  1 -
 2 files changed, 61 deletions(-)

diff --git a/java/base.xml b/java/base.xml
index fc4cc6c..8342e91 100644
--- a/java/base.xml
+++ b/java/base.xml
@@ -13,10 +13,7 @@
   <property name="testsources" value="src/test/java"/>
   <property name="testresources" value="src/test/resources/"/>
   <property name="testresult" value="${generated}/test-results"/>
-  <property name="coverageresult" value="${generated}/coverage-report/"/>
-  <property name="instrument" value="${generated}/instrument/"/>
   <property name="testclasses" value="${generated}/testclasses/"/>
-  <property name="cobertura.ser.file" value="${basedir}/cobertura.ser" />
   <property name="jarfile" value="${name}-${release.version}.jar" />
   <property name="jarthinfile"
             value="${name}-${release.version}-thin.jar" />
@@ -68,35 +65,12 @@
     </fileset>
   </path>
 
-  <path id="cobertura.classpath">
-    <fileset dir="${libs}">
-      <include name="cobertura-2.1.1.jar" />
-      <include name="slf4j-api-1.7.22.jar" />
-      <include name="commons-lang3-3.5.jar" />
-      <include name="asm-5.0.1.jar" />
-      <include name="asm-util-5.0.1.jar" />
-      <include name="asm-tree-5.0.1.jar" />
-      <include name="asm-commons-5.0.1.jar" />
-      <include name="asm-analysis-5.0.1.jar" />
-      <include name="oro-2.0.8.jar" />
-      <include name="logback-core-1.1.9.jar" />
-      <include name="logback-classic-1.1.9.jar" />
-    </fileset>
-  </path>
-
-  <path id="cobertura.test.classpath">
-    <path location="${instrument}" />
-    <path refid="test.classpath" />
-    <path refid="cobertura.classpath" />
-  </path>
-
   <!-- target definitions -->
   
   <target name="clean" >
     <delete includeEmptyDirs="true" quiet="true">
       <fileset dir="${generated}" defaultexcludes="false" includes="**" />
     </delete>
-    <delete file="${cobertura.ser.file}" quiet="true" />
   </target>
 
   <target name="usage">
@@ -107,7 +81,6 @@
     <echo message="'test' runs all tests (see ${testresult})." />
     <echo message="'docs' creates all javadoc in ${docs}." />
     <echo message="'checks' checks coding style (see ${generated}/checkstyle_report.txt)." />
-    <echo message="'coverage' checks coverage (see ${coverageresult})." />
     <echo message="'tar' creates a release tarball in ${dist}." />
   </target>
 
@@ -125,7 +98,6 @@
     <mkdir dir="${testclasses}"/>
     <mkdir dir="${docs}"/>
     <mkdir dir="${testresult}"/>
-    <mkdir dir="${instrument}"/>
     <mkdir dir="${dist}"/>
     <manifest file="${emptymanifest}" />
   </target>
@@ -353,35 +325,3 @@
     </tar>
   </target>
 
-  <taskdef classpathref="cobertura.classpath" resource="tasks.properties" />
-  <target name="coverage" depends="compile,testcompile">
-    <delete file="${cobertura.ser.file}" quiet="true" />
-    <copy todir="${instrument}" >
-      <fileset dir="${classes}"/>
-    </copy>
-    <cobertura-instrument ignoreTrivial="true">
-      <fileset dir="${instrument}">
-        <include name="**/**/*.class" />
-      </fileset>
-    </cobertura-instrument>
-    <junit fork="true" haltonfailure="false" printsummary="on">
-      <sysproperty key="net.sourceforge.cobertura.datafile"
-                   file="${cobertura.ser.file}" />
-      <jvmarg value="-DLOGBASE=${generated}/testcoverage-logs"/>
-      <jvmarg value="-Djava.security.policy=${buildresources}/junittest.policy"/>
-      <jvmarg value="-Djava.security.manager"/>
-      <classpath refid="cobertura.test.classpath" />
-      <formatter type="xml" />
-      <batchtest toDir="${testresult}" >
-        <fileset dir="${testclasses}"
-                 includes="**/*Test.class"/>
-      </batchtest>
-    </junit>
-    <cobertura-report format="html" destdir="${coverageresult}" >
-      <fileset dir="${sources}">
-        <include name="**/*.java" />
-      </fileset>
-    </cobertura-report>
-    <antcall target="coverage-check" />
-  </target>
-
diff --git a/java/ivy.xml b/java/ivy.xml
index 79ce408..e5f07aa 100644
--- a/java/ivy.xml
+++ b/java/ivy.xml
@@ -21,7 +21,6 @@
 
     <!-- Development tools dependencies that are optional for the build. -->
     <dependency org="com.puppycrawl.tools" name="checkstyle" rev="6.17" />
-    <dependency org="net.sourceforge.cobertura" name="cobertura" rev="2.1.1" />
 
     <!-- Metrics website and web-specific ExoneraTor dependencies. -->
     <dependency org="javax.servlet" name="javax.servlet-api" rev="3.1.0" />

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits