ndlesiecki 02/03/09 15:12:49
Modified: build build.xml
Log:
added dependency checking to fail builds if required libs not avail.
Revision Changes Path
1.37 +73 -2 jakarta-cactus/build/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-cactus/build/build.xml,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- build.xml 24 Feb 2002 19:25:44 -0000 1.36
+++ build.xml 9 Mar 2002 23:12:49 -0000 1.37
@@ -212,7 +212,78 @@
</target>
- <target name="init">
+ <target name="check_required">
+ <echo message="Checking required properties."/>
+ <echo message="cactus.ant.jar = ${cactus.ant.jar}"/>
+ <echo message="junit.jar = ${junit.jar}"/>
+ <echo message="httpunit.jar = ${httpunit.jar}"/>
+ <echo message="httpclient.jar = ${httpclient.jar}"/>
+ <echo message="log4j.jar = ${log4j.jar}"/>
+ <echo message="aspectjrt.jar = ${aspectjrt.jar}"/>
+ <condition property="required_properites_set">
+ <and>
+ <available file="${cactus.ant.jar}"/>
+ <available file="${junit.jar}"/>
+ <available file="${httpunit.jar}"/>
+ <available file="${httpclient.jar}"/>
+ <available file="${log4j.jar}"/>
+ <available file="${aspectjrt.jar}"/>
+ </and>
+ </condition>
+ <echo message="All requirements met = ${required_properites_set}"/>
+ <antcall target="enforce_requirements"/>
+ </target>
+
+ <target name="enforce_requirements" unless="required_properites_set">
+ <fail>
+ You are missing a required property. The following properties need to be
+ set in a ./build.properties or ${user.home}/build.properties file :
+
+ cactus.ant.jar [REQUIRED] The path to the Cactus Ant jar.
+
+ servlet22.jar [OPTIONAL] The path to the Servlet API 2.2 jar.
+ Required only if you want to build against this
+ API
+
+ servlet23.jar [OPTIONAL] The path to the Servlet API 2.3 jar.
+ Required only if you want to build against this
+ API
+
+ junit.jar [REQUIRED] The path to the JUnit jar file.
+ Required for compiling Cactus classes.
+
+ httpunit.jar [REQUIRED] The path to the HttpUnit jar file.
+ Required for compiling and running the unit
+ tests (used in build-servletapi.xml).
+
+ httpclient.jar [REQUIRED] The path to the Commons HttpClient
+ jar file. Required for performing all Cactus
+ HTTP requests. It is also required for
+ bundling it in the the distribution.
+
+ log4j.jar [REQUIRED] The path to the Log4j jar file.
+ Required for bundling it in the distribution
+ (used in build-servletapi.xml).
+
+ aspectjrt.jar [REQUIRED] The path to the AspectJ runtime jar.
+ It is used by Cactus for logging entries and
+ exit of methods, configuration checking, ...)
+
+ dist.dir [OPTIONAL] The directories where distributable
+ files will be copied with version number
+ postfixed. Required for the dist target only.
+ Default is root/dist
+
+ test.port [OPTIONAL] The port that should be used for
+ starting the servers during unit testing. This
+ should be used not to interfere with other
+ running servers. The default is 8080. This
+ property is used when running the functional tests
+
+ </fail>
+ </target>
+
+ <target name="init" depends="check_required">
<tstamp/>
@@ -675,4 +746,4 @@
<target name="checkstyle"
depends="checkstyle.share,checkstyle.22,checkstyle.23"/>
-</project>
\ No newline at end of file
+</project>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>