You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by te...@apache.org on 2006/03/16 15:44:27 UTC
svn commit: r386344 - in /incubator/harmony/enhanced/classlib/trunk/make:
build-java.xml build-test.xml depends.properties depends.xml
Author: tellison
Date: Thu Mar 16 06:44:25 2006
New Revision: 386344
URL: http://svn.apache.org/viewcvs?rev=386344&view=rev
Log:
Apply patch HARMONY-203 (Improve dependency jar handling)
Added:
incubator/harmony/enhanced/classlib/trunk/make/depends.properties
incubator/harmony/enhanced/classlib/trunk/make/depends.xml
Modified:
incubator/harmony/enhanced/classlib/trunk/make/build-java.xml
incubator/harmony/enhanced/classlib/trunk/make/build-test.xml
Modified: incubator/harmony/enhanced/classlib/trunk/make/build-java.xml
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/make/build-java.xml?rev=386344&r1=386343&r2=386344&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/make/build-java.xml (original)
+++ incubator/harmony/enhanced/classlib/trunk/make/build-java.xml Thu Mar 16 06:44:25 2006
@@ -343,25 +343,9 @@
</target>
<target name="prepare-depends"
- description="Download jars required to compile prefs">
+ description="Check for jars required to compile prefs">
- <!-- Xalan 2.6.0 support -->
- <mkdir dir="${depends.jars}/xalan-j_2.6.0"/>
- <get src="http://www.ibiblio.org/maven/xalan/jars/xalan-2.6.0.jar"
- dest="${depends.jars}/xalan-j_2.6.0/xalan.jar"
- usetimestamp="true" verbose="true" />
-
- <!-- Xerces 2.6.2 support -->
- <mkdir dir="${depends.jars}/xerces_2.6.2" />
- <get src="http://www.ibiblio.org/maven/xml-resolver/jars/xml-resolver-1.1.jar"
- dest="${depends.jars}/xerces_2.6.2/resolver.jar"
- usetimestamp="true" verbose="true" />
- <get src="http://www.ibiblio.org/pub/packages/maven2/xerces/xercesImpl/2.6.2/xercesImpl-2.6.2.jar"
- dest="${depends.jars}/xerces_2.6.2/xercesImpl.jar"
- usetimestamp="true" verbose="true" />
- <get src="http://www.ibiblio.org/maven/xml-apis/jars/xml-apis-1.0.b2.jar"
- dest="${depends.jars}/xerces_2.6.2/xml-apis.jar"
- usetimestamp="true" verbose="true" />
+ <ant antfile="../make/depends.xml" inheritall="false" target="check"/>
</target>
Modified: incubator/harmony/enhanced/classlib/trunk/make/build-test.xml
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/make/build-test.xml?rev=386344&r1=386343&r2=386344&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/make/build-test.xml (original)
+++ incubator/harmony/enhanced/classlib/trunk/make/build-test.xml Thu Mar 16 06:44:25 2006
@@ -29,18 +29,14 @@
<property name="tests.build.output" location="build/tests" />
<property name="support.dir" location="support"/>
<property name="tests.depends.jars" location="deploy/jre/lib/boot" />
- <property name="junit.jar" location="${support.dir}/src/test/resources/libs/junit_3.8.1/junit.jar" />
- <property name="xalan.jar" location="${support.dir}/src/test/resources/libs/xalan-j_2.6.0/xalan.jar" />
- <property name="xerces.resolver.jar" location="${support.dir}/src/test/resources/libs/xerces_2.6.2/resolver.jar" />
- <property name="xerces.impl.jar" location="${support.dir}/src/test/resources/libs/xerces_2.6.2/xercesImpl.jar" />
- <property name="xml.apis.jar" location="${support.dir}/src/test/resources/libs/xerces_2.6.2/xml-apis.jar" />
+ <property file="make/depends.properties" />
<path id="xerces.id">
- <fileset dir="${support.dir}/src/test/resources/libs/xerces_2.6.2">
+ <fileset dir="${xerces.dir}">
<include name="*.jar" />
</fileset>
</path>
<path id="xalan.id">
- <fileset dir="${support.dir}/src/test/resources/libs/xalan-j_2.6.0">
+ <fileset dir="${xalan.dir}">
<include name="*.jar" />
</fileset>
</path>
@@ -158,7 +154,7 @@
<echo message="The test report is in ${display-location}"/>
</target>
- <target name="compile-support" depends="copy-test-resources, get-test-support-jars"
+ <target name="compile-support" depends="copy-test-resources, check-support-jars"
description="Compile the unit test source">
<mkdir dir="${tests.build.output}" />
<javac destdir="${tests.build.output}" source="1.4" target="1.4" debug="on">
@@ -206,26 +202,11 @@
</copy>
</target>
- <target name="get-test-support-jars"
- description="Download jars required to compile and run unit tests">
- <!-- JUnit 3.8.1 support -->
- <mkdir dir="${support.dir}/src/test/resources/libs/junit_3.8.1"/>
- <get src="http://www.ibiblio.org/maven/junit/jars/junit-3.8.1.jar"
- dest="${junit.jar}" usetimestamp="true" verbose="true" />
-
- <!-- Xalan 2.6.0 support -->
- <mkdir dir="${support.dir}/src/test/resources/libs/xalan-j_2.6.0"/>
- <get src="http://www.ibiblio.org/maven/xalan/jars/xalan-2.6.0.jar"
- dest="${xalan.jar}" usetimestamp="true" verbose="true" />
-
- <!-- Xerces 2.6.2 support -->
- <mkdir dir="${support.dir}/src/test/resources/libs/xerces_2.6.2" />
- <get src="http://www.ibiblio.org/maven/xml-resolver/jars/xml-resolver-1.1.jar"
- dest="${xerces.resolver.jar}" usetimestamp="true" verbose="true" />
- <get src="http://www.ibiblio.org/pub/packages/maven2/xerces/xercesImpl/2.6.2/xercesImpl-2.6.2.jar"
- dest="${xerces.impl.jar}" usetimestamp="true" verbose="true" />
- <get src="http://www.ibiblio.org/maven/xml-apis/jars/xml-apis-1.0.b2.jar"
- dest="${xml.apis.jar}" usetimestamp="true" verbose="true" />
+ <target name="check-support-jars"
+ description="Check for jars required to compile and run unit tests">
+
+ <ant antfile="make/depends.xml" inheritall="false" target="check"/>
+
</target>
<target name="run-tests" description="Run JUnit tests">
Added: incubator/harmony/enhanced/classlib/trunk/make/depends.properties
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/make/depends.properties?rev=386344&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/make/depends.properties (added)
+++ incubator/harmony/enhanced/classlib/trunk/make/depends.properties Thu Mar 16 06:44:25 2006
@@ -0,0 +1,36 @@
+# Copyright 2006 The Apache Software Foundation or its licensors, as applicable
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+
+depends.dir=depends
+depends.jars=${depends.dir}/jars
+ibiblio.base=http://www.ibiblio.org
+
+xalan.dir=${depends.jars}/xalan-j_2.6.0
+xalan.jar=${xalan.dir}/xalan.jar
+xalan.url=${ibiblio.base}/maven/xalan/jars/xalan-2.6.0.jar
+
+xerces.dir=${depends.jars}/xerces_2.6.2
+resolver.jar=${xerces.dir}/resolver.jar
+resolver.url=${ibiblio.base}/maven/xml-resolver/jars/xml-resolver-1.1.jar
+
+xerces.impl.jar=${xerces.dir}/xercesImpl.jar
+xerces.impl.url=${ibiblio.base}/pub/packages/maven2/xerces/xercesImpl/2.6.2/xercesImpl-2.6.2.jar
+
+xml.apis.jar=${xerces.dir}/xml-apis.jar
+xml.apis.url=${ibiblio.base}/maven/xml-apis/jars/xml-apis-1.0.b2.jar
+
+junit.dir=${depends.jars}/junit_3.8.1
+junit.jar=${junit.dir}/junit.jar
+junit.url=${ibiblio.base}/maven/junit/jars/junit-3.8.1.jar
Added: incubator/harmony/enhanced/classlib/trunk/make/depends.xml
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/make/depends.xml?rev=386344&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/make/depends.xml (added)
+++ incubator/harmony/enhanced/classlib/trunk/make/depends.xml Thu Mar 16 06:44:25 2006
@@ -0,0 +1,118 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+
+ Copyright 2006 The Apache Software Foundation or its
+ licensors, as applicable
+
+ Licensed under the Apache License, Version 2.0 (the "License"); you
+ may not use this file except in compliance with the License. You
+ may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied. See the License for the specific language governing
+ permissions and limitations under the License.
+
+ -->
+
+<project name="dependencies" default="check" basedir="..">
+ <description>
+ Confirm that dependencies are present and fetch missing dependencies
+ where possible.
+ </description>
+
+ <property file="make/depends.properties" />
+
+ <target name="check">
+
+ <antcall target="check-one-jar">
+ <param name="src" value="${xalan.url}" />
+ <param name="dest" value="${xalan.jar}" />
+ </antcall>
+
+ <antcall target="check-one-jar">
+ <param name="src" value="${resolver.url}" />
+ <param name="dest" value="${resolver.jar}" />
+ </antcall>
+
+ <antcall target="check-one-jar">
+ <param name="src" value="${xerces.impl.url}" />
+ <param name="dest" value="${xerces.impl.jar}" />
+ </antcall>
+
+ <antcall target="check-one-jar">
+ <param name="src" value="${xml.apis.url}" />
+ <param name="dest" value="${xml.apis.jar}" />
+ </antcall>
+
+ <antcall target="check-one-jar">
+ <param name="src" value="${junit.url}" />
+ <param name="dest" value="${junit.jar}" />
+ </antcall>
+
+ </target>
+
+ <target name="download"
+ description="Download required jars">
+
+ <mkdir dir="${xalan.dir}" />
+ <antcall target="download-one-jar">
+ <param name="src" value="${xalan.url}" />
+ <param name="dest" value="${xalan.jar}" />
+ </antcall>
+
+ <mkdir dir="${xerces.dir}" />
+ <antcall target="download-one-jar">
+ <param name="src" value="${resolver.url}" />
+ <param name="dest" value="${resolver.jar}" />
+ </antcall>
+
+ <antcall target="download-one-jar">
+ <param name="src" value="${xerces.impl.url}" />
+ <param name="dest" value="${xerces.impl.jar}" />
+ </antcall>
+
+ <antcall target="download-one-jar">
+ <param name="src" value="${xml.apis.url}" />
+ <param name="dest" value="${xml.apis.jar}" />
+ </antcall>
+
+ <mkdir dir="${junit.dir}" />
+ <antcall target="download-one-jar">
+ <param name="src" value="${junit.url}" />
+ <param name="dest" value="${junit.jar}" />
+ </antcall>
+
+ </target>
+
+ <target name="download-one-jar">
+ <get src="${src}" dest="${dest}" usetimestamp="true" verbose="true" />
+ </target>
+
+ <target name="check-one-jar">
+ <available file="${dest}" type="file" property="${dest}.exists" />
+ <fail>
+ <condition>
+ <not>
+ <isset property="${dest}.exists"/>
+ </not>
+ </condition>
+...
+
+Missing dependency. The jar from:
+
+ ${src}
+
+should be downloaded to:
+
+ ${dest}
+
+(Run "ant -f make/depends.xml download" to automatically fetch this file.)
+ </fail>
+ </target>
+
+</project>