You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Sergei Dubov <sd...@gmail.com> on 2006/03/22 19:52:00 UTC
Set property is not seen?
Hi guys,
I have an interesting situation. I'd appreciate any help. Basically here
is the idea:
1. In my project directory I have lib/endorsed directory. It is
populated with jar files at Ant runtime (through Ivy). The target that
does it is called 'resolve'.
2. At the end of resolve, I have the following:
<fileset dir="${endorsed.lib.dir}" id="bootclasspath.jars"
includes="*.jar"/>
<pathconvert property="endorsed.path.id" refid="bootclasspath.jars"/>
3. There is a another task called 'test' that makes use of
endorsed.path.id property like this:
<jvmarg value="-Xbootclasspath/p:${endorsed.path.id}"/>
test depends on resolve.
So, the question is why is ${endorsed.path.id} is not understood by Ant
as a property. I thought once I set the property anywhere in the script,
it will be resolved to its value.
Thanks a lot for any help!
Serge
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: Set property is not seen?
Posted by Sergei Dubov <sd...@gmail.com>.
Thanks, Ninju,
It was the antcall issue and macrodef did the trick.
-Serge
Ninju Bohra wrote:
> Sergei
> Is your 'resolve' target called via an <antcall> target?
>
> If it is any properties/refids that are created/assinged by the target invoked by the <antcall> will NOT be defined/accessible after the <antcall> target calll returns.
>
> With ANT 1.6.x you can refactor your code to use <macrodef> targets and eliminate the <antcall> calls
>
> Sorry,
>
> Ninju
>
>
>
>
> ----- Original Message ----
> From: Sergei Dubov <sd...@gmail.com>
> To: user@ant.apache.org
> Sent: Wednesday, March 22, 2006 12:52:00 PM
> Subject: Set property is not seen?
>
>
> Hi guys,
>
> I have an interesting situation. I'd appreciate any help. Basically here
> is the idea:
>
> 1. In my project directory I have lib/endorsed directory. It is
> populated with jar files at Ant runtime (through Ivy). The target that
> does it is called 'resolve'.
>
> 2. At the end of resolve, I have the following:
>
> <fileset dir="${endorsed.lib.dir}" id="bootclasspath.jars"
> includes="*.jar"/>
> <pathconvert property="endorsed.path.id" refid="bootclasspath.jars"/>
>
> 3. There is a another task called 'test' that makes use of
> endorsed.path.id property like this:
> <jvmarg value="-Xbootclasspath/p:${endorsed.path.id}"/>
>
> test depends on resolve.
>
> So, the question is why is ${endorsed.path.id} is not understood by Ant
> as a property. I thought once I set the property anywhere in the script,
> it will be resolved to its value.
>
> Thanks a lot for any help!
>
> Serge
>
> ---------------------------------------------------------------------
> 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: Set property is not seen?
Posted by Ninju Bohra <ni...@yahoo.com>.
Sergei
Is your 'resolve' target called via an <antcall> target?
If it is any properties/refids that are created/assinged by the target invoked by the <antcall> will NOT be defined/accessible after the <antcall> target calll returns.
With ANT 1.6.x you can refactor your code to use <macrodef> targets and eliminate the <antcall> calls
Sorry,
Ninju
----- Original Message ----
From: Sergei Dubov <sd...@gmail.com>
To: user@ant.apache.org
Sent: Wednesday, March 22, 2006 12:52:00 PM
Subject: Set property is not seen?
Hi guys,
I have an interesting situation. I'd appreciate any help. Basically here
is the idea:
1. In my project directory I have lib/endorsed directory. It is
populated with jar files at Ant runtime (through Ivy). The target that
does it is called 'resolve'.
2. At the end of resolve, I have the following:
<fileset dir="${endorsed.lib.dir}" id="bootclasspath.jars"
includes="*.jar"/>
<pathconvert property="endorsed.path.id" refid="bootclasspath.jars"/>
3. There is a another task called 'test' that makes use of
endorsed.path.id property like this:
<jvmarg value="-Xbootclasspath/p:${endorsed.path.id}"/>
test depends on resolve.
So, the question is why is ${endorsed.path.id} is not understood by Ant
as a property. I thought once I set the property anywhere in the script,
it will be resolved to its value.
Thanks a lot for any help!
Serge
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org