Are you speaking purely of an ant script, or an antlib? Because an antlib
has to manually dereference refids.


On 12 September 2014 17:08, WebServices Development <
webservices_developm...@csx.com> wrote:

> I am trying to use a value of a variable with path refid in ANT.
>
> I tried different approaches and am getting different errors. Is it
> possible to use a variable value for refid?
>
>     <path id="compile.classpath">
>
>         <path refid="shared.lib.classpath" />
>
>         <path refid="ext.classpath" />
>
>         <path refid="common.classpath" />
>
>         <path refid="${ant.refid:seq.1}" />
>
>         <path refid="ear.lib.classpath" />
>
>     </path>
>
> Reference ${ant.refid:seq.1} not found.
>
>
>
> OR
>
>
>
>     <path id="compile.classpath">
>
>         <path refid="shared.lib.classpath" />
>
>         <path refid="ext.classpath" />
>
>         <path refid="common.classpath" />
>
>         <path refid="${toString:seq.1}" />
>
>         <path refid="ear.lib.classpath" />
>
>     </path>
>
> Unresolvable reference ${toString:seq.1} might be a misuse of property
> expansion syntax.
>
>
>
> OR
>
>
>
>     <path id="compile.classpath">
>
>         <path refid="shared.lib.classpath" />
>
>         <path refid="ext.classpath" />
>
>         <path refid="common.classpath" />
>
>         <path refid="${seq.1}" />
>
>         <path refid="ear.lib.classpath" />
>
>     </path>
>
> Reference ${seq.1} not found.
>
>
>
> This is how my seq.1 is defined
>
>
>
>     <property name="seq.1" value="module.compile.classpath" />
>
>     <echo>seq.1: ${seq.1}</echo>
>
>
>
> which displays [echo] seq.1: module.compile.classpath
>
> module.compile.classpath is defined elsewhere
>
>
>
> and if I use
>
>  <path id="compile.classpath">
>
>         <path refid="shared.lib.classpath" />
>
>         <path refid="ext.classpath" />
>
>         <path refid="common.classpath" />
>
>         <path refid="module.compile.classpath" />
>
>         <path refid="ear.lib.classpath" />
>
>     </path>
>
> the build works.
>
>
>
> So, How can I use a variable for refid to make it work? This way I can
> change the sequence prior to defining the compile.classpath and use the
> appropriate sequence for the build I am running?
>
>
>
>
> This email transmission and any accompanying attachments may contain CSX
> privileged and confidential information intended only for the use of the
> intended addressee. Any dissemination, distribution, copying or action
> taken in reliance on the contents of this email by anyone other than the
> intended recipient is strictly prohibited. If you have received this email
> in error please immediately delete it and notify sender at the above CSX
> email address. Sender and CSX accept no liability for any damage caused
> directly or indirectly by receipt of this email.
>



-- 
Matt Sicker <boa...@gmail.com>

Reply via email to