changeset 26:1bfff4a9a00a jcov3.0-rc0

Switching to ASM6 release
author afedorch
date Fri, 29 Sep 2017 10:37:46 -0700
parents 16cbc6c62174
children 7b6a1fb833ba
files build/build.properties build/build.xml build/check-dependecies.xml
diffstat 3 files changed, 93 insertions(+), 26 deletions(-) [+]
line wrap: on
line diff
--- a/build/build.properties	Tue Sep 26 17:24:04 2017 -0700
+++ b/build/build.properties	Fri Sep 29 10:37:46 2017 -0700
@@ -21,11 +21,15 @@
 # or visit www.oracle.com if you need additional information or have any
 # questions.
 
-# path to asm6 library
-asmjar = asm-all-6.0_BETA.jar
+# sha1 checksum for asm6 libraries
+asm.checksum = bc6fa6b19424bb9592fe43bbc20178f92d403105
+asm.tree.checksum = a624f1a6e4e428dcd680a01bab2d4c56b35b18f0
+asm.util.checksum = 430b2fc839b5de1f3643b528853d5cf26096c1de
 
-# sha1 checksum for asm6 library
-asmjar.checksum = 535f141f6c8fc65986a3469839a852a3266d1025
+# path to asm6 libraries
+asm.jar = asm-6.0.jar
+asm.tree.jar = asm-tree-6.0.jar
+asm.util.jar = asm-util-6.0.jar
 
 # path to javatest library (empty value allowed if you do not need jtobserver.jar)
 javatestjar = javatest.jar
--- a/build/build.xml	Tue Sep 26 17:24:04 2017 -0700
+++ b/build/build.xml	Fri Sep 29 10:37:46 2017 -0700
@@ -29,10 +29,11 @@
 
     <property file="release.properties"/>
     <property file="build.properties"/>
+    <import file="check-dependecies.xml"/>
 
     <!-- Build area -->
     <property name="build.dir" location="${result.dir}/jcov_${build.version}"/>
-    <property name="jcov.classpath" value="${asmjar}:${java.home}/lib/tools.jar"/>
+    <property name="jcov.classpath" value="${asm.jar}:${asm.util.jar}:${asm.tree.jar}:${java.home}/lib/tools.jar"/>
 
     <!-- Temp dir is for files which do not appear in release directory -->
     <property name="tmp.dir" location="${result.dir}/temp"/>
@@ -94,26 +95,7 @@
 
     </target>
 
-    <target name="compare-checksum">
-
-        <available file="${asmjar}" property="asm.present"/>
-        <fail unless="asm.present" message="Please, specify asm library"/>
-
-        <checksum file="${asmjar}" algorithm="sha1" property="${asmjar.checksum}" verifyproperty="asm.checksum.matches" />
-        <condition property="checksum.differs">
-            <equals arg1="${asm.checksum.matches}" arg2="false" />
-        </condition>
-    </target>
-
-    <target name="fail-if-checksum-differs" if="verify.strict" unless="verify.off">
-        <fail if="checksum.differs" message="wrong checksum for ASM dependency" />
-    </target>
-
-    <target name="verify-checksum" depends="compare-checksum, fail-if-checksum-differs" if="checksum.differs" unless="verify.off">
-        <echo message="warning: wrong checksum for ASM dependency" level="warning" />
-    </target>
-
-    <target name="prepare" depends="clean, verify-checksum" description="checks dependencies">
+    <target name="prepare" depends="clean, verify-dependencies" description="checks dependencies">
 
         <condition property="javatest.present">
             <and>
@@ -201,7 +183,9 @@
     </patternset>
 
     <target name="build-jcov" depends="compile" description="build jcov jar">
-        <unjar src="${asmjar}" dest="${jcov.classes}"/>
+        <unjar src="${asm.jar}" dest="${jcov.classes}"/>
+        <unjar src="${asm.tree.jar}" dest="${jcov.classes}"/>
+        <unjar src="${asm.util.jar}" dest="${jcov.classes}"/>
 
         <mkdir dir="${jcov.classes}/META-INF"/>
         <mkdir dir="${jcov.classes}/META-INF/services"/>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/build/check-dependecies.xml	Fri Sep 29 10:37:46 2017 -0700
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+
+  This code is free software; you can redistribute it and/or modify it
+  under the terms of the GNU General Public License version 2 only, as
+  published by the Free Software Foundation.  Oracle designates this
+  particular file as subject to the "Classpath" exception as provided
+  by Oracle in the LICENSE file that accompanied this code.
+
+  This code is distributed in the hope that it will be useful, but WITHOUT
+  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+  version 2 for more details (a copy is included in the LICENSE file that
+  accompanied this code).
+
+  You should have received a copy of the GNU General Public License version
+  2 along with this work; if not, write to the Free Software Foundation,
+  Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+
+  Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+  or visit www.oracle.com if you need additional information or have any
+  questions.
+-->
+
+<project name="JCov-dependencies" default="verify-dependencies" basedir=".">
+
+    <property file="build.properties"/>
+
+    <target name="compare-asm-checksum">
+        <available file="${asm.jar}" property="asm.present"/>
+        <fail unless="asm.present" message="Please, specify asm library"/>
+
+        <checksum file="${asm.jar}" algorithm="sha1" property="${asm.checksum}" verifyproperty="asm.checksum.matches"/>
+        <condition property="asm.checksum.differs">
+            <equals arg1="${asm.checksum.matches}" arg2="false" />
+        </condition>
+    </target>
+
+    <target name="verify-asm" if="${asm.checksum.differs}" unless="verify.off" depends="compare-asm-checksum">
+        <fail if="verify.strict" message="wrong checksum for ASM dependency"/>
+        <echo message="warning: wrong checksum for ASM dependency" level="warning" />
+    </target>
+
+    <target name="compare-asm-tree-checksum">
+        <available file="${asm.tree.jar}" property="asm.tree.present"/>
+        <fail unless="asm.tree.present" message="Please, specify asm-tree library"/>
+
+        <checksum file="${asm.tree.jar}" algorithm="sha1" property="${asm.tree.checksum}" verifyproperty="asm.tree.checksum.matches"/>
+        <condition property="asm.tree.checksum.differs">
+            <equals arg1="${asm.tree.checksum.matches}" arg2="false" />
+        </condition>
+    </target>
+
+    <target name="verify-asm-tree" if="${asm.tree.checksum.differs}" unless="verify.off" depends="compare-asm-tree-checksum">
+        <fail if="verify.strict" message="wrong checksum for ASM-tree dependency"/>
+        <echo message="warning: wrong checksum for ASM-tree dependency" level="warning" />
+    </target>
+
+    <target name="compare-asm-util-checksum">
+        <available file="${asm.util.jar}" property="asm.util.present"/>
+        <fail unless="asm.util.present" message="Please, specify asm-util library"/>
+
+        <checksum file="${asm.util.jar}" algorithm="sha1" property="${asm.util.checksum}" verifyproperty="asm.util.checksum.matches"/>
+        <condition property="asm.util.checksum.differs">
+            <equals arg1="${asm.util.checksum.matches}" arg2="false" />
+        </condition>
+    </target>
+
+    <target name="verify-asm-util" if="${asm.util.checksum.differs}" unless="verify.off" depends="compare-asm-util-checksum">
+        <fail if="verify.strict" message="wrong checksum for ASM-util dependency"/>
+        <echo message="warning: wrong checksum for ASM-util dependency" level="warning" />
+    </target>
+
+    <target name="verify-dependencies" depends="verify-asm, verify-asm-tree, verify-asm-util"/>
+
+</project>
\ No newline at end of file