Matt to the rescue (again). :) -----Original Message----- From: Matt Benson [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 18, 2005 11:21 AM To: Ant Users List Subject: RE: Problem with nested property sets
yep, 'tis a bug in the handling of mapped, nested propertysets. I will look into this today. -Matt --- "Dick, Brian E." <[EMAIL PROTECTED]> wrote: > I have two property sets, one prefixed with "foo" > and one prefixed with > "bar". I want to union these two property sets and > change the "foo" > prefix to "foobar" and change the "bar" prefix to > "foobar". > > If I remove the mappers I get the following output. > There is no error, > so the mappers must be causing the problem. > > [echoproperties] #Ant properties > [echoproperties] #Wed May 18 08:26:28 EDT 2005 > [echoproperties] foo.2=2 > [echoproperties] foo.1=1 > [echoproperties] #Ant properties > [echoproperties] #Wed May 18 08:26:28 EDT 2005 > [echoproperties] bar.4=4 > [echoproperties] bar.3=3 > [echoproperties] #Ant properties > [echoproperties] #Wed May 18 08:26:28 EDT 2005 > [echoproperties] bar.4=4 > [echoproperties] bar.3=3 > [echoproperties] foo.2=2 > [echoproperties] foo.1=1 > > This is the output I really want. > > [echoproperties] #Ant properties > [echoproperties] #Wed May 18 08:26:28 EDT 2005 > [echoproperties] foo.2=2 > [echoproperties] foo.1=1 > [echoproperties] #Ant properties > [echoproperties] #Wed May 18 08:26:28 EDT 2005 > [echoproperties] bar.4=4 > [echoproperties] bar.3=3 > [echoproperties] #Ant properties > [echoproperties] #Wed May 18 08:26:28 EDT 2005 > [echoproperties] foobar.4=4 > [echoproperties] foobar.3=3 > [echoproperties] foobar.2=2 > [echoproperties] foobar.1=1 > > > > -----Original Message----- > From: _mylene_ [mailto:[EMAIL PROTECTED] > Sent: Wednesday, May 18, 2005 8:09 AM > To: Ant Users List > Subject: Re: Problem with nested property sets > > > It's not the nested propertyset that is the problem. > I guess you assumed that the properties were really > changed in foobar.* > Apperently they are not. When you add the > properties: > > <property name="foobar.1" value="1"/> > <property name="foobar.2" value="2"/> > > <property name="foobar.3" value="3"/> > <property name="foobar.4" value="4"/> > > And you execute that, you'll get: > > Apache Ant version 1.7alpha compiled on May 11 2005 > Buildfile: build.xml > Detected Java version: 1.5 in: C:\Program > Files\Java\jdk1.5.0_02\jre > Detected OS: Windows XP > parsing buildfile C:\Documents and > Settings\Mylene\Desktop\build.xml > with URI = > file:///C:/Documents%20and%20Settings/Mylene/Desktop/build.xml > Project base dir set to: C:\Documents and > Settings\Mylene\Desktop > Build sequence for target(s) `prop' is [prop] > Complete build sequence is [prop, ] > > prop: > [echoproperties] #Ant properties > [echoproperties] #Wed May 18 14:06:13 CEST 2005 > [echoproperties] foobar.1=1 > [echoproperties] foobar.2=2 > [echoproperties] foobar.3=3 > [echoproperties] foobar.4=4 > [echoproperties] #Ant properties > [echoproperties] #Wed May 18 14:06:13 CEST 2005 > [echoproperties] foobar.3=3 > [echoproperties] foobar.4=4 > [echoproperties] #Ant properties > [echoproperties] #Wed May 18 14:06:13 CEST 2005 > [echoproperties] foobar.1=1 > [echoproperties] foobar.2=2 > [echoproperties] foobar.3=3 > [echoproperties] foobar.4=4 > > BUILD SUCCESSFUL > Total time: 0 seconds > > and that's what you expected, I guess > > Success! > > Mylene > > > > On 5/18/05, Dick, Brian E. <[EMAIL PROTECTED]> > wrote: > > Here is the output from "ant -debug". > > > <cut> > > Total time: 0 seconds > > > > -----Original Message----- > > From: Jeffrey E Care [mailto:[EMAIL PROTECTED] ] > > Sent: Tuesday, May 17, 2005 4:03 PM > > To: Ant Users List > > Subject: Re: Problem with nested property sets > > > > Try running in debug mode (-debug) and providing > the stack trace. > > > > -- > > Jeffrey E. Care ([EMAIL PROTECTED] ) > > WebSphere Build SWAT Team Lead > > WebSphere Build Tooling Lead (Project Mantis) > > https://w3.opensource.ibm.com/projects/mantis > > > > "Dick, Brian E." <[EMAIL PROTECTED] > wrote on > 05/17/2005 12:30:58 > PM: > > > > > I'm getting an exception from the following > build. The > echoproperties > > > task doesn't like the nested propertyset. What > am I doing wrong? > > > > > > <?xml version="1.0" ?> > > > <project name="build" default="prop"> > > > <property name="foo.1" value="1"/> > > > <property name="foo.2" value="2"/> > > > > > > <property name="bar.3" value="3"/> > > > <property name="bar.4" value="4"/> > > > > > > <propertyset id="foo.propset"> > > > <propertyref prefix="foo"/> > > > <mapper type="glob" from="foo.*" > to="foobar.*"/> > > > </propertyset> > > > > > > <propertyset id="bar.propset"> > > > <propertyref prefix="bar"/> > > > <mapper type="glob" from="bar.*" > to="foobar.*"/> > > > </propertyset> > > > > > > <propertyset id="foobar.propset"> > > > <propertyset refid="foo.propset"/> > > > <propertyset refid="bar.propset"/> > > > </propertyset> > > > > > > <echoproperties> > > > <propertyset refid="foo.propset"/> > > > </echoproperties> > > > > > > <echoproperties> > > > <propertyset refid="bar.propset"/> > > > </echoproperties> > > > > > > <echoproperties> > > > <propertyset refid="foobar.propset"/> > > > </echoproperties> > > > </project> > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: > [EMAIL PROTECTED] > > For additional commands, e-mail: > [EMAIL PROTECTED] > > > > > > > -- > Mylene > > Books just wanna be FREE! See what I mean at: > http://bookcrossing.com/friend/mylene > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > === message truncated === Discover Yahoo! Find restaurants, movies, travel and more fun for the weekend. Check it out! http://discover.yahoo.com/weekend.html --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]