ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Conor MacNeill" <>
Subject RE: Problem with Property Task
Date Fri, 07 Jul 2000 15:00:58 GMT

If you run your code with the -verbose flag you will see the following.

Setting project property: x -> a
   +Task: property
 [Property] Override ignored for x
   +Task: property
 [Property] Override ignored for x
   +Task: property
 [Property] Override ignored for x
 +Target: main
   +Task: echo

I think this behaviour comes from the situation where ant is run as a nested
task. In that case you want the outer instance to control the property.
Property definitions in the inner task should not override the values
defined in the outer instance of ant, if you know what I mean.

Nevertheless, I find the current behaviour very counter-intuitive. It is a
very common thing for people to build up classpath properties in this way.

As for your other problems, can you try using C:\ instead of C:/. I would
like to change ant to handle this properly.


Conor MacNeill

> -----Original Message-----
> From: Akbar Ibrahim []
> Sent: Friday, 7 July 2000 23:24
> To:
> Subject: Problem with Property Task
> Hi,
> I am using ant 3.1 (Release version) on WinNT4. In this version the
> following
>     <property name="x" value="a"/>
>     <property name="x" value="${x}a"/>
>     <property name="x" value="${x}a"/>
>     <property name="x" value="${x}a"/>
>     <echo message="${x}"/>
> gives the output
> aaaa
> I just downloaded ant3.2 Beta 1 (Milestone Version). But in this version I
> get
> a
> The concatenation is not working. Am I missing something ?
> I am using this concat method to concat paths to the classpath property
> which I later pass to the javac Task. Well the original reason why I
> downloaded ant3.2Beta1 is that I could not get ant 3.1 to recognise
> classpath properly.
> I was previously working in C:/ and the javac Task used to work
> perfectly. I
> am now working in D:/ and the javac Task is not able to find classes from
> the classpath (which has dirs and jars from C:/ - appending to it
> using the
> above concat method). Is this a problem with working in D:/ and using
> classes from C:/ ? The classpath is getting reflected properly (in ant3.1)
> and the classes *are available* in that classpath.
> I thought this might be a problem with ant3.1 and dowloaded
> ant3.2Beta1 and
> found the concatenation problem. In any case I am not able to compile :(
> Any suggestions. I suppose I am missing something (have not been able to
> follow the list for a long time so things might have changed without my
> noticing).
> Cheers,
> Akbar
> PS : Sorry for such a rambling mail

View raw message