ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan.Mate...@rzf.fin-nrw.de
Subject RE: String replacement in a property?
Date Fri, 29 Aug 2003 07:19:49 GMT
No response to my suggestion?
http://marc.theaimsgroup.com/?l=ant-user&m=106204800127750&w=2

Ant-ContribĀ“s <propertyregex/>


Jan

> -----Original Message-----
> From: Claudio Corsi [mailto:ccorsi@progress.com]
> Sent: Thursday, August 28, 2003 11:45 PM
> To: Ant Users List
> Subject: Re: String replacement in a property?
> 
> 
> # The "." will not be replaced because they are not path related
> <path id="example.id">
>     <pathelement path="${example}"/>
> </path>
> 
> # This will create the example.new property with the "." 
> replaced with "/"
> <pathconvert targetos="unix" property="example.new" 
> refid="example.id">
>      <map from="." to="/" />
> </pathconvert>
> 
> Robert Simmons wrote:
> 
> > Could you give me a full example of this? I am not sure how 
> this possible hack
> > will work.
> > 
> > -- Robert
> > 
> > "Claudio Corsi" <ccorsi@progress.com> wrote in message
> > news:3F4E84E8.20002@progress.com...
> > 
> >>Use the pathconvert task with a nested map element.
> >>
> >><pathconvert ... >
> >>    <map from="." to="/" />
> >></pathconvert>
> >>
> >>Robert Simmons wrote:
> >>
> >>
> >>>Greetings,
> >>>
> >>>I would like to provide functionality to replace all '.' 
> characters in a
> >>>property with '/' characters.
> >>>
> >>>Essentially what I'm trying to do is allow the user to do 
> two different
> > 
> > targets
> > 
> >>>the same way.
> >>>
> >>>
> >>>
> >>>>ant -Dexample=org.myorg.myproduct.MyClass run
> >>>>ant -Dexample=org.myorg.myproduct.MyClass compile
> >>>
> >>>
> >>>In the second line I need a replacement to pass to the 
> compiler that would
> > 
> > give
> > 
> >>>me essentially the same result as:
> >>>
> >>><property name="foo" value="org/myorg/myproduct/MyClass.java"/>
> >>>
> >>>Then I can use this in the compile target
> >>>
> >>>Any ideas?
> >>>
> >>>TIA
> >>>
> >>>-Robert
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>-----------------------------------------------------------
> ----------
> >>>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> >>>For additional commands, e-mail: user-help@ant.apache.org
> >>>
> > 
> > 
> > 
> > 
> > 
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> > For additional commands, e-mail: user-help@ant.apache.org
> > 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message