vmassol 2002/07/30 13:15:21
Modified: documentation build.xml
framework build.xml
. gump.xml
sample-servlet build.xml
Log:
added a new CheckProperties Ant task to check that proprties have been set
Revision Changes Path
1.12 +8 -12 jakarta-cactus/documentation/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-cactus/documentation/build.xml,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- build.xml 28 Jul 2002 20:51:11 -0000 1.11
+++ build.xml 30 Jul 2002 20:15:20 -0000 1.12
@@ -102,10 +102,6 @@
<echo message="java.home = ${java.home}"/>
<echo message="user.home = ${user.home}"/>
<echo message="ant.home = ${ant.home}"/>
- <echo message=""/>
- <echo message="cactus.ant.jar = ${cactus.ant.jar}"/>
- <echo message="cvs.executable = ${cvs.executable}"/>
- <echo message=""/>
</target>
@@ -116,15 +112,15 @@
-->
<target name="check.properties" depends="display.properties">
- <condition property="properties.ok">
- <and>
- <available file="${cactus.ant.jar}"/>
- <isset property="cvs.executable"/>
- </and>
- </condition>
+ <taskdef name="checkProperty"
classname="org.apache.cactus.ant.CheckPropertiesTask">
+ <classpath>
+ <pathelement location="${cactus.ant.jar}"/>
+ </classpath>
+ </taskdef>
- <fail message="Missing property or property pointing to an invalid file
(check your build.properties file)"
- unless="properties.ok"/>
+ <checkProperty>
+ <property name="cvs.executable"/>
+ </checkProperty>
</target>
1.23 +17 -19 jakarta-cactus/framework/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-cactus/framework/build.xml,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- build.xml 28 Jul 2002 21:11:55 -0000 1.22
+++ build.xml 30 Jul 2002 20:15:20 -0000 1.23
@@ -109,6 +109,10 @@
</target>
+ <!-- The location of the Cactus custom Ant tasks jar -->
+ <property name="cactus.ant.jar"
+ value="anttasks/dist/lib/cactus-ant.jar"/>
+
<!--
========================================================================
Set the properties related to the distribution tree
@@ -172,14 +176,7 @@
<echo message="user.home = ${user.home}"/>
<echo message="ant.home = ${ant.home}"/>
<echo message=""/>
- <echo message="j2ee.jar = ${j2ee.jar}"/>
- <echo message="log4j.jar = ${log4j.jar}"/>
- <echo message="commons.logging.jar = ${commons.logging.jar}"/>
- <echo message="commons.httpclient.jar = ${commons.httpclient.jar}"/>
- <echo message="httpunit.jar = ${httpunit.jar}"/>
- <echo message=""/>
<echo message="clover.enable (optional) = ${clover.enable}"/>
- <echo message=""/>
</target>
@@ -190,18 +187,19 @@
-->
<target name="check.properties">
- <condition property="properties.ok">
- <and>
- <available file="${j2ee.jar}"/>
- <available file="${log4j.jar}"/>
- <available file="${commons.logging.jar}"/>
- <available file="${commons.httpclient.jar}"/>
- <available file="${httpunit.jar}"/>
- </and>
- </condition>
-
- <fail message="Missing property or property pointing to an invalid file
(check your build.properties file)"
- unless="properties.ok"/>
+ <taskdef name="checkProperty"
classname="org.apache.cactus.ant.CheckPropertiesTask">
+ <classpath>
+ <pathelement location="${cactus.ant.jar}"/>
+ </classpath>
+ </taskdef>
+
+ <checkProperty>
+ <property name="j2ee.jar" isfile="true"/>
+ <property name="log4j.jar" isfile="true"/>
+ <property name="commons.logging.jar" isfile="true"/>
+ <property name="commons.httpclient.jar" isfile="true"/>
+ <property name="httpunit.jar" isfile="true"/>
+ </checkProperty>
</target>
1.16 +2 -0 jakarta-cactus/gump.xml
Index: gump.xml
===================================================================
RCS file: /home/cvs/jakarta-cactus/gump.xml,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- gump.xml 23 Jul 2002 10:42:37 -0000 1.15
+++ gump.xml 30 Jul 2002 20:15:20 -0000 1.16
@@ -70,6 +70,7 @@
<ant buildfile="framework/build.xml" target="dist">
+ <depend property="cactus.ant.jar" project="jakarta-cactus-ant"/>
<depend property="j2ee.jar" project="jakarta-servletapi"/>
<depend property="log4j.jar" project="jakarta-log4j"/>
<depend property="commons.logging.jar" project="commons-logging" id="all"/>
@@ -142,6 +143,7 @@
<ant buildfile="framework/build.xml" target="dist">
+ <depend property="cactus.ant.jar" project="jakarta-cactus-ant"/>
<depend property="j2ee.jar" project="jakarta-servletapi-4"/>
<depend property="log4j.jar" project="jakarta-log4j"/>
<depend property="commons.logging.jar" project="commons-logging" id="all"/>
1.10 +17 -26 jakarta-cactus/sample-servlet/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-cactus/sample-servlet/build.xml,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- build.xml 28 Jul 2002 20:51:11 -0000 1.9
+++ build.xml 30 Jul 2002 20:15:20 -0000 1.10
@@ -84,11 +84,6 @@
value="framework/dist-${j2ee.api}/lib/cactus.jar"/>
<echo message="cactus.framework.jar = ${cactus.framework.jar}"/>
- <!-- The location of the Cactus custom Ant tasks jar -->
- <property name="cactus.ant.jar"
- value="anttasks/dist/lib/cactus-ant.jar"/>
- <echo message="cactus.ant.jar = ${cactus.ant.jar}"/>
-
<!-- The location of the web files generated by the Cactus framework
(i.e. the JSP Redirector) -->
<property name="cactus.framework.web"
@@ -102,6 +97,9 @@
</target>
+ <!-- The location of the Cactus custom Ant tasks jar -->
+ <property name="cactus.ant.jar" value="anttasks/dist/lib/cactus-ant.jar"/>
+
<!--
========================================================================
Set the properties related to the target tree
@@ -177,18 +175,10 @@
<echo message="user.home = ${user.home}"/>
<echo message="ant.home = ${ant.home}"/>
<echo message=""/>
- <echo message="j2ee.jar = ${j2ee.jar}"/>
- <echo message="commons.logging.jar = ${commons.logging.jar}"/>
- <echo message="commons.httpclient.jar = ${commons.httpclient.jar}"/>
- <echo message="aspectjrt.jar = ${aspectjrt.jar}"/>
- <echo message="junit.jar = ${junit.jar}"/>
- <echo message="httpunit.jar = ${httpunit.jar}"/>
- <echo message=""/>
<echo message="log4j.jar (optional) = ${log4j.jar}"/>
<echo message="clover.enable (optional) = ${clover.enable}"/>
<echo message="clover.jar (optional) = ${clover.jar}"/>
<echo message="test.port (optional) = ${test.port}"/>
- <echo message=""/>
</target>
@@ -199,19 +189,20 @@
-->
<target name="check.properties">
- <condition property="properties.ok">
- <and>
- <available file="${j2ee.jar}"/>
- <available file="${aspectjrt.jar}"/>
- <available file="${commons.logging.jar}"/>
- <available file="${commons.httpclient.jar}"/>
- <available file="${junit.jar}"/>
- <available file="${httpunit.jar}"/>
- </and>
- </condition>
-
- <fail message="Missing property or property pointing to an invalid file
(check your build.properties file)"
- unless="properties.ok"/>
+ <taskdef name="checkProperty"
classname="org.apache.cactus.ant.CheckPropertiesTask">
+ <classpath>
+ <pathelement location="${cactus.ant.jar}"/>
+ </classpath>
+ </taskdef>
+
+ <checkProperty>
+ <property name="j2ee.jar" isfile="true"/>
+ <property name="aspectjrt.jar" isfile="true"/>
+ <property name="commons.logging.jar" isfile="true"/>
+ <property name="commons.httpclient.jar" isfile="true"/>
+ <property name="junit.jar" isfile="true"/>
+ <property name="httpunit.jar" isfile="true"/>
+ </checkProperty>
</target>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>