ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erik Hatcher" <jakarta-...@ehatchersolutions.com>
Subject Re: some design questions about "ant in anger"
Date Fri, 19 Apr 2002 01:54:46 GMT
----- Original Message -----
From: "Ray Tayek" <rtayek@attbi.com>
To: "Ant Users List" <ant-user@jakarta.apache.org>
Sent: Thursday, April 18, 2002 8:59 PM
Subject: some design questions about "ant in anger"


> hi, i am digging thought the "ant in anger" article and noticed that the
> author recommends having standard top-level targets like: build, test,
> clean, deploy, publish, fetch, docs/javadocs, all, and main and using ant
> calls to pass the control down the tree. so it seems like while some of
the
> stuff (in the build.xml file) is generic (implementation), some of it is
> non generic (policy) and "knows" what's below in the build tree. it would
> seem that ant is smart enough to look at the build.xml file in each
> directory and do the right thing. is this more or less how it works?

I encourage you to have a look at Maven.  It may be what you're looking for
in this regard.

    http://jakarta.apache.org/turbine/maven/

> also, i am a bit confused about properties. afaict, these are immutable

correct, they are immutable.

> (i.e. once defined, they will not be changed). i gather that this means
> that if you wanted to override some property, you would need to somehow
> process your build.properties in a "bottom up" manner (from the leaves to
> the root of the build process). so if i have a property in a
> build.properties file in a subdirectory and i do not use the ant call,
then
> (assuming that ant finds the file in the subdirectory), it would seem like
> the properties would *not* be overridden.

you set your properties in precedence order, and the command-line
(-D/-propertyfile) options take ultimate precedence.

> otoh, if i am using ant calls, what happens to all of the properties that
> have already been defined by descending the tree up to the point of this
> particular ant call? do these properties get lost when the new ant call
> gets made? when ant sees new build.xml and build.properties files do these
> "go away" when that ant call terminates?

I'm assuming you mean <antcall>?   Or <ant>?  Either way there are options
to pass properties down from the calling build and in Ant 1.5 even
references.  Properties do not pass back up though (unless you do some
tricks like writing to a property file and read it back in).

> another issue that seems problematic is that of testing. we will be doing
> servlets, so there are at least four (4) levels of testing: junit, cactus,
> httpunit, and someOtherTesting. the cactus seems a bit complicated (he
> deploys in place somehow - i don't quite grok that yet). has anyone had
any
> luck with putting different kinds of testing like these ant?

These all play fine together, and all are actually JUnit tests anyway, so
they could even all be run in one <junit> task (although I separate Cactus
and regular JUnit tests).  HttpUnit tests would be wrapped in a JUnit test
case, typically, and pretty much any other test I'd perform would be too.

What specific issues are you having here?

    Erik



--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message