You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by my...@apache.org on 2011/05/18 23:30:51 UTC
svn commit: r1124438 - in /db/derby/code/trunk: BUILDING.html build.xml
Author: myrnavl
Date: Wed May 18 21:30:51 2011
New Revision: 1124438
URL: http://svn.apache.org/viewvc?rev=1124438&view=rev
Log:
DERBY-5200; [patch] embellish build.xml to automatically install junit.jar in the correct directory if it doesn't exist
Added a restriction to accomodate setting of the junit property; if junit is
set, there will be no attempt to download.
Modified:
db/derby/code/trunk/BUILDING.html
db/derby/code/trunk/build.xml
Modified: db/derby/code/trunk/BUILDING.html
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/BUILDING.html?rev=1124438&r1=1124437&r2=1124438&view=diff
==============================================================================
--- db/derby/code/trunk/BUILDING.html (original)
+++ db/derby/code/trunk/BUILDING.html Wed May 18 21:30:51 2011
@@ -380,6 +380,24 @@ sane=false
</TD>
</TR>
+ <TR>
+ <TD><b><i>junit</i></b></TD>
+ <TD>Setting this property will overwrite the default location for
+ <i>junit.jar</i>, used to build the tests.
+ The default location is <i>tools/java</i>.
+ If you set this property, the build will not automatically download
+ <i>junit.jar</i>, and if it's not in the specified location, the build will
+ stop.</TD>
+ <TD><blockquote><i>tools/java/junit.jar</i></blockquote></TD>
+ <TD>
+<blockquote>
+<pre><b><font color="blue" size="+2">
+junit=/local0/junit.jar
+</font></b></pre>
+</blockquote>
+ </TD>
+ </TR>
+
</TBODY>
</TABLE>
Modified: db/derby/code/trunk/build.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/build.xml?rev=1124438&r1=1124437&r2=1124438&view=diff
==============================================================================
--- db/derby/code/trunk/build.xml (original)
+++ db/derby/code/trunk/build.xml Wed May 18 21:30:51 2011
@@ -175,8 +175,30 @@
<!-- You can override this property in local.properties to fetch from an alternative location -->
<property name="junit.url" value="http://repo1.maven.org/maven2/junit/junit/3.8.2/junit-3.8.2.jar"/>
<target name="junit_check">
- <available file="${basedir}/tools/java/junit.jar" property="junit.exists"/>
+ <!-- check if junit is set, if set, if junit.jar is really there, if not, error out -->
+ <fail message="junit property is set to ${junit}, but there is no junit.jar there.">
+ <condition>
+ <and>
+ <isset property="junit"/>
+ <not>
+ <available file="${junit}"/>
+ </not>
+ </and>
+ </condition>
+ </fail>
+ <condition property="junitfile" value="${junit}">
+ <and>
+ <isset property="junit"/>
+ </and>
+ </condition>
+ <condition property="junitfile" value="${basedir}/tools/java/junit.jar">
+ <not>
+ <isset property="junit"/>
+ </not>
+ </condition>
+ <available file="${junitfile}" property="junit.exists"/>
</target>
+
<target name="install_junit" depends="junit_check" unless="junit.exists" description="installs junit.jar into derby">
<get src="${junit.url}" dest="${basedir}/tools/java/junit.jar" verbose="true" ignoreerrors="true"/>
</target>