You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-dev@jakarta.apache.org by nd...@apache.org on 2002/03/10 00:12:49 UTC
cvs commit: jakarta-cactus/build build.xml
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: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: cvs commit: jakarta-cactus/build build.xml
Posted by Erik Hatcher <li...@ehatchersolutions.com>.
----- Original Message -----
From: <nd...@apache.org>
> ndlesiecki 02/03/09 15:12:49
>
> Modified: build build.xml
> Log:
> added dependency checking to fail builds if required libs not avail.
Nice Ant work, Nick my friend! One typo though...
> + <condition property="required_properites_set">
I think you mean "properties" :)
> + <echo message="All requirements met =
${required_properites_set}"/>
But don't forget to change the other places its used.
> + <target name="enforce_requirements"
unless="required_properites_set">
Like here.
Erik
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: cvs commit: jakarta-cactus/build build.xml
Posted by Vincent Massol <vm...@octo.com>.
Nick,
Thanks a lot. I'm currently in a huge build refactoring process that I
started last week. I worked 10 hours on it yesterday and have almost
finished ! It involves things that you modified :
* There is dependency checking already there
* thanks for the jarfile. I thought it was supported by Ant 1.4. I guess
I'll have to restore all my zipfile, warfile, etc. .....
I'm really sorry; you participate and I tell you to hold ... :-). We're
not lucky in timing. If you can hold 1 more day, I'll commit my changes.
Actually I have a problem, which is why I have not already committed. My
TestJspTestCase.testOut() does not work anymore and I suspect it is a
Cactus that was somehow hidden before (or I did something wrong in the
move - but I can't remember changing any code ...).
FYI, here is the new directory structure :
Jakarta-cactus
|_ anttasks
|_ framework
|_ documentation
|_ sample-servlet
|_ build.xml
|_ build-admin.xml
and under each subproject :
subproject
|_ conf
|_ docs
|_ src
|_ build.xml
dependencies are :
anttasks - standalone
framework - standalone
documentation -> anttasks and framework
sample-servlet -> anttasks and framework
Dependencies are resolved by the master build.xml. They are not when you
call the individual subproject's build.xml
The master build.xml is used to generate the distribution (includes
running the tests).
The master build-admin.xml is used for admin tasks like build the web
site and upload it, etc.
There will be 1 output only of the master build.xml :
Jakarta-cactus-<j2ee api>-<version>.zip
Depending on the j2ee.jar that you use, it will generate for J2EE 1.2 or
J2EE 1.3
At the moment, we don't use anything else than the Servlet API, thus it
is fine to use the servlet.jar instead of the J2EE one.
What do you think ?
Thanks
-Vincent
> -----Original Message-----
> From: ndlesiecki@apache.org [mailto:ndlesiecki@apache.org]
> Sent: 10 March 2002 04:43
> To: jakarta-cactus-cvs@apache.org
> Subject: cvs commit: jakarta-cactus/build build.xml
>
> 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:cactus-dev-
> unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:cactus-dev-
> help@jakarta.apache.org>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>