You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by kk...@apache.org on 2014/11/20 11:16:47 UTC
svn commit: r1640708 - in /tomcat/tc7.0.x/trunk: build.xml
webapps/docs/changelog.xml
Author: kkolinko
Date: Thu Nov 20 10:16:47 2014
New Revision: 1640708
URL: http://svn.apache.org/r1640708
Log:
Improve Java 7 support in build.xml:
- Check correctness of java.7.home and fail early
- Use ${java.home}/bin/java as a fallback
- Echo the path to the selected Java executable
- Simplify test-init1, test-init2 tasks.
I hope that this fixes "Unsupported major.minor version 52.0" errors on Gump.
Modified:
tomcat/tc7.0.x/trunk/build.xml
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
Modified: tomcat/tc7.0.x/trunk/build.xml
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/build.xml?rev=1640708&r1=1640707&r2=1640708&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/build.xml (original)
+++ tomcat/tc7.0.x/trunk/build.xml Thu Nov 20 10:16:47 2014
@@ -448,6 +448,19 @@
<exclude name="**/LocalStrings_*" />
</patternset>
+ <!--
+ Verify availability of Java 7 JDK if one was configured.
+ Fail if java.7.home was set, but points to a non-existing path.
+ -->
+ <fail message="Invalid java.7.home setting: [${java.7.home}]. The path $${java.7.home}/bin/ does not exist.">
+ <condition>
+ <and>
+ <isset property="java.7.home" />
+ <not><available file="${java.7.home}/bin/" type="dir" /></not>
+ </and>
+ </condition>
+ </fail>
+
<!-- =========================== Build targets =========================== -->
<target name="build-prepare">
@@ -1334,16 +1347,17 @@
<available file="${test.apr.loc}" property="apr.exists" />
</target>
- <target name="test-init1" if="java.7.home">
- <property name="java.bin.path" value="${java.7.home}/bin/"/>
- </target>
-
- <target name="test-init2" unless="java.7.home">
- <property name="java.bin.path" value=""/>
+ <target name="test-init">
+ <condition property="java.bin.path" value="${java.7.home}/bin/">
+ <isset property="java.7.home" />
+ </condition>
+ <condition property="java.bin.path" value="${java.home}/bin/">
+ <isset property="java.home" />
+ </condition>
+ <property name="java.bin.path" value="" />
+ <echo message="Using Java: [${java.bin.path}java]" />
</target>
- <target name="test-init" depends="test-init1,test-init2" />
-
<macrodef name="runtests"
description="Runs the unit tests using the specified connector.
Does not stop on errors, but sets 'test.result.error' and 'test.result.failure' properties.">
Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1640708&r1=1640707&r2=1640708&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Thu Nov 20 10:16:47 2014
@@ -109,6 +109,12 @@
Simplify <code>setproxy</code> task in <code>build.xml</code>.
Taskdef there is not needed since Ant 1.8.2. (kkolinko)
</update>
+ <fix>
+ Improve Java 7 support in <code>build.xml</code>. Check whether
+ the specified ${java.7.home} is valid. By default use Java that
+ runs Ant (${java.home}) instead of the one found on $PATH
+ to run JUnit tests. (kkolinko)
+ </fix>
</changelog>
</subsection>
</section>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org