----- Original Message -----
From: "Erik Hatcher" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, November 02, 2001 10:14 AM
Subject: conditional building of Cactus deployments
> Where can I find good examples of how folks are architecting their Ant
> builds such that a release version is built without any test code in it
> whatsoever and when the tests are run the deployment is built to include
the
> necessary pieces for Cactus testing?
>
> Here are the issues I'm facing:
>
> * Some tests are non-Cactus JUnit tests. Some are Cactus. I'm separating
> them by directory structure. There needs to be a distinction in the Ant
> targets on which tests get run and such.
>
Solution 1 :
* Have 2 ant targets : test-junit and test-cactus and just call the one you
want
Solution 2:
* Have a build.properties file where you define properties that depend on
your environment (this file is not checked in CVS - although there is a
commented build.properties.sample one). See the one in the cactus build
directory.
* Define a property : cactus.include = true
* Have a test target that depends on test-junit and test-cactus
* Use an if="cactus.include" in the definition of the test-cactus target
> * web.xml allow conditional inclusion of the redirector configuration
>
Solution:
* Write an XSL stylesheet that contains the cactus redirectors. Tell me if
you need help (it is very easy if you know XSL)
* Use the style ant task to transform your web.xml (production one) into a
web.xml (test one). The condition to perform the style task or not could be
based either on the target name as in solution 1 above or on the definition
or not of cactus.include (solution 2 above).
> * I do not want duplication in my build.xml
euh.. not sure what you mean. all solutions presented here have no
duplications
>
> I'm going to start tackling these issues myself, but if its already been
> implemented nicely then it'd save me some time and I'd be able to
contribute
> my efforts on the Cactus project in other areas! :)
please do ... :)
thanks
-Vincent
>
> Erik
>
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>