You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Raja Nagendra Kumar <Na...@tejasoft.com> on 2009/10/01 20:18:29 UTC
properties echo with absolute values
How to echo the absolution location of a property..
say <echo message="Digitally Sign the Midlet using keyStore
'${keyStore}'"/>
should print the abosolute path of the key store file even if the value
stored is ./build/tejasoft/keystore.ks etc.
Regards,
Raja Nagendra Kumar,
C.T.O
www.tejasoft.com
--
View this message in context: http://www.nabble.com/properties-echo-with-absolute-values-tp25704095p25704095.html
Sent from the Ant - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
AW: AW: AW: properties echo with absolute values
Posted by Ja...@rzf.fin-nrw.de.
The (slow) trend is to modularize Ant. There will be some handlers in the core, but there also will be some additional libraries (with tasks, with handler, ...).
http://ant.apache.org/antlibs/sandbox.html#Props%20-%20additional%20Property%20Resolver
(currently during the vote for leaving the sandbox and releasing a 1.0 with Ant 1.8.0).
Jan
>-----Ursprüngliche Nachricht-----
>Von: Raja Nagendra Kumar [mailto:Nagendra.Raja@tejasoft.com]
>Gesendet: Montag, 5. Oktober 2009 16:43
>An: user@ant.apache.org
>Betreff: Re: AW: AW: properties echo with absolute values
>
>
>Thank you Jan, nice to know 1.8 has many things which we are
>looking to..
>
>Also, would it be possible to have more default protocol
>handers such as
>"toFile" ,"toLocation" , "toURL" etc as built in ones. or
>more generically
>name of the the method as protocol
>
>Regards,
>Nagendra
>
>Jan.Materne wrote:
>>
>> For upcoming Ant 1.8.0 there is a hook you can plugin for resolving
>> properties.
>> ${protocol:name} and a 'protocol'handler will convert 'name'
>to a String.
>>
>>
>http://svn.apache.org/repos/asf/ant/core/trunk/docs/manual/usin
>g.html#propertyHelper
>>
>>
>> Jan
>>
>>>-----Ursprüngliche Nachricht-----
>>>Von: Raja Nagendra Kumar [mailto:Nagendra.Raja@tejasoft.com]
>>>Gesendet: Freitag, 2. Oktober 2009 08:04
>>>An: user@ant.apache.org
>>>Betreff: Re: AW: properties echo with absolute values
>>>
>>>
>>>Hi Jan,
>>>
>>>In our context, we are using <var> task to set this variable.
>>>Var does not
>>>seem to support location. Properties read only-set only once
>>>approach would
>>>not work with us, as this value would get chanced in each
>call to that
>>>target.
>>>
>>>I saw there are some thing like property hooks which
>>>supporting ${toString:
>>>xyz} kind of resolutions. It would be nice, if there are more
>>>such hooks -
>>>say to call any method of that object. This avoids adding
>>>another explicit
>>>property.
>>>
>>>Regards,
>>>Nagendra
>>>
>>>
>>>
>>>
>>>--
>>>View this message in context:
>>>http://www.nabble.com/properties-echo-with-absolute-values-tp25
>>>704095p25710820.html
>>>Sent from the Ant - Users mailing list archive at Nabble.com.
>>>
>>>
>>>---------------------------------------------------------------------
>>>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
>>
>>
>>
>
>--
>View this message in context:
>http://www.nabble.com/properties-echo-with-absolute-values-tp25
>704095p25752120.html
>Sent from the Ant - Users mailing list archive at Nabble.com.
>
>
>---------------------------------------------------------------------
>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
Re: AW: AW: properties echo with absolute values
Posted by Raja Nagendra Kumar <Na...@tejasoft.com>.
Thank you Jan, nice to know 1.8 has many things which we are looking to..
Also, would it be possible to have more default protocol handers such as
"toFile" ,"toLocation" , "toURL" etc as built in ones. or more generically
name of the the method as protocol
Regards,
Nagendra
Jan.Materne wrote:
>
> For upcoming Ant 1.8.0 there is a hook you can plugin for resolving
> properties.
> ${protocol:name} and a 'protocol'handler will convert 'name' to a String.
>
> http://svn.apache.org/repos/asf/ant/core/trunk/docs/manual/using.html#propertyHelper
>
>
> Jan
>
>>-----Ursprüngliche Nachricht-----
>>Von: Raja Nagendra Kumar [mailto:Nagendra.Raja@tejasoft.com]
>>Gesendet: Freitag, 2. Oktober 2009 08:04
>>An: user@ant.apache.org
>>Betreff: Re: AW: properties echo with absolute values
>>
>>
>>Hi Jan,
>>
>>In our context, we are using <var> task to set this variable.
>>Var does not
>>seem to support location. Properties read only-set only once
>>approach would
>>not work with us, as this value would get chanced in each call to that
>>target.
>>
>>I saw there are some thing like property hooks which
>>supporting ${toString:
>>xyz} kind of resolutions. It would be nice, if there are more
>>such hooks -
>>say to call any method of that object. This avoids adding
>>another explicit
>>property.
>>
>>Regards,
>>Nagendra
>>
>>
>>
>>
>>--
>>View this message in context:
>>http://www.nabble.com/properties-echo-with-absolute-values-tp25
>>704095p25710820.html
>>Sent from the Ant - Users mailing list archive at Nabble.com.
>>
>>
>>---------------------------------------------------------------------
>>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
>
>
>
--
View this message in context: http://www.nabble.com/properties-echo-with-absolute-values-tp25704095p25752120.html
Sent from the Ant - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
AW: AW: properties echo with absolute values
Posted by Ja...@rzf.fin-nrw.de.
For upcoming Ant 1.8.0 there is a hook you can plugin for resolving properties.
${protocol:name} and a 'protocol'handler will convert 'name' to a String.
http://svn.apache.org/repos/asf/ant/core/trunk/docs/manual/using.html#propertyHelper
Jan
>-----Ursprüngliche Nachricht-----
>Von: Raja Nagendra Kumar [mailto:Nagendra.Raja@tejasoft.com]
>Gesendet: Freitag, 2. Oktober 2009 08:04
>An: user@ant.apache.org
>Betreff: Re: AW: properties echo with absolute values
>
>
>Hi Jan,
>
>In our context, we are using <var> task to set this variable.
>Var does not
>seem to support location. Properties read only-set only once
>approach would
>not work with us, as this value would get chanced in each call to that
>target.
>
>I saw there are some thing like property hooks which
>supporting ${toString:
>xyz} kind of resolutions. It would be nice, if there are more
>such hooks -
>say to call any method of that object. This avoids adding
>another explicit
>property.
>
>Regards,
>Nagendra
>
>
>
>
>--
>View this message in context:
>http://www.nabble.com/properties-echo-with-absolute-values-tp25
>704095p25710820.html
>Sent from the Ant - Users mailing list archive at Nabble.com.
>
>
>---------------------------------------------------------------------
>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
Re: AW: properties echo with absolute values
Posted by Raja Nagendra Kumar <Na...@tejasoft.com>.
Hi Jan,
In our context, we are using <var> task to set this variable. Var does not
seem to support location. Properties read only-set only once approach would
not work with us, as this value would get chanced in each call to that
target.
I saw there are some thing like property hooks which supporting ${toString:
xyz} kind of resolutions. It would be nice, if there are more such hooks -
say to call any method of that object. This avoids adding another explicit
property.
Regards,
Nagendra
--
View this message in context: http://www.nabble.com/properties-echo-with-absolute-values-tp25704095p25710820.html
Sent from the Ant - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
AW: properties echo with absolute values
Posted by Ja...@rzf.fin-nrw.de.
If you define
<property name="keyStore" location="..."/>
instead of
<property name="keyStore" value="..."/>
this should work.
Jan
>-----Ursprüngliche Nachricht-----
>Von: Raja Nagendra Kumar [mailto:Nagendra.Raja@tejasoft.com]
>Gesendet: Donnerstag, 1. Oktober 2009 20:18
>An: user@ant.apache.org
>Betreff: properties echo with absolute values
>
>
>How to echo the absolution location of a property..
>
>say <echo message="Digitally Sign the Midlet using keyStore
>'${keyStore}'"/>
>
>should print the abosolute path of the key store file even if the value
>stored is ./build/tejasoft/keystore.ks etc.
>
>Regards,
>Raja Nagendra Kumar,
>C.T.O
>www.tejasoft.com
>--
>View this message in context:
>http://www.nabble.com/properties-echo-with-absolute-values-tp25
>704095p25704095.html
>Sent from the Ant - Users mailing list archive at Nabble.com.
>
>
>---------------------------------------------------------------------
>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
Re: properties echo with absolute values
Posted by David Weintraub <qa...@gmail.com>.
A property is just a string. It may or may not be a file name. You can
try the <makeurl> task to see if that will put the full path to a file.
This type of task isn't all that simple and requires some assumptions
about the OS. I always prepend file and directory names in my ant
script with ${dirname}.
--
David Weintraub
David@Weintraub.name
Sent from my iPhone while riding in my Ferrari. (Jealous?)
On Oct 1, 2009, at 2:18 PM, Raja Nagendra Kumar <Nagendra.Raja@tejasoft.com
> wrote:
>
> How to echo the absolution location of a property..
>
> say <echo message="Digitally Sign the Midlet using keyStore
> '${keyStore}'"/>
>
> should print the abosolute path of the key store file even if the
> value
> stored is ./build/tejasoft/keystore.ks etc.
>
> Regards,
> Raja Nagendra Kumar,
> C.T.O
> www.tejasoft.com
> --
> View this message in context: http://www.nabble.com/properties-echo-with-absolute-values-tp25704095p25704095.html
> Sent from the Ant - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> 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