ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vijay Raghavan <vi...@netscape.com>
Subject Re: help! Can't I set a <property> more than once in a build file?
Date Wed, 19 Jul 2000 22:18:58 GMT
I don't think this feature, ie. the ability to set properties specific to an
ant task, is documented. Is this possible with all ANT tasks or just the ant
ANT task?
Vijay


glennm@ca.ibm.com wrote:

> Being able to set properties once is considered a feature. :-)  This is a
> fairly significant departure from the 1.0.8 release.  The way around it for
> you is
>
> <ant antfile="${include.dir}/ejb-build.xml" dir="."
> target="ejb.descriptor">
>   <property name="ejb.basedir" value="com\auctionlogic\auction"/>
>   <property name="ejb.basename" value="AuctionManager"/>
> <ant>
>
> <ant antfile="${include.dir}/ejb-build.xml" dir="." target="ejb.container">
>   <property name="ejb.basedir" value="com\auctionlogic\auction"/>
>   <property name="ejb.basename" value="AuctionManager"/>
> <ant>
>
> Just make sure you don't set these properties _before_ the ant task.
>
> Glenn McAllister
> TID - Software Developer - VisualAge for Java
> IBM Toronto Lab, (416) 448-3805
> "An approximate answer to the right question is better than the
> right answer to the wrong question." - John W. Tukey
>
> Please respond to ant-dev@jakarta.apache.org
>
> To:        "ant-dev" <ant-dev@jakarta.apache.org>
> cc:
> Subject:        help!  Can't I set a <property> more than once in a build
> file?
>
> Help!
>
> My build file doesn't work properly with the latest Ant release.  It worked
> fine with the "1.0.8" version.
>
> I've determined that once I set a <property>, I can't override it by
> setting
> it again.  This worked in the previous release.
>
> The reason I need to do this is that I have all my ejbs set up so that I
> set
> some properties and then run an <ant> subproject to execute the tasks for
> that ejb.
> So, in the following example the value of "ejb.basename" in the
> "Customer.build" target turns out to be "AuctionManager", not "Customer" as
> I would expect.
>
> <!-- AuctionManager target -->
> <target name="AuctionManager.build" depends="init,AuctionManager.compile">
>        <property name="ejb.basedir" value="com\auctionlogic\auction"/>
>        <property name="ejb.basename" value="AuctionManager"/>
>        <ant antfile="${include.dir}/ejb-build.xml" dir="."
> target="ejb.descriptor"/>
>        <ant antfile="${include.dir}/ejb-build.xml" dir="."
> target="ejb.container"/>
> </target>
> <!-- Customer target -->
> <target name="Customer.build" depends="init,Customer.compile">
>        <property name="ejb.basedir" value="com\auctionlogic\customer"/>
>        <property name="ejb.basename" value="Customer"/>
>        <ant antfile="${include.dir}/ejb-build.xml" dir="."
> target="ejb.descriptor"/>
>        <ant antfile="${include.dir}/ejb-build.xml" dir="."
> target="ejb.container"/>
> </target>
>
> Is there any way to work around this?  Is this the proper expected
> behavior?
>
> Kenneth Liu
> AuctionLogic, Inc.
> 3799 Route 46 East, Suite 310
> (973)257-2751  (973)331-8062 FAX
> http://www.auctionlogic.com
> AuctionLogic - Empowered Web Auction Management

Mime
View raw message