ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Akbar Ibrahim" <akbar.ibra...@wipro.com>
Subject Re: Problem with Property Task
Date Mon, 10 Jul 2000 03:57:17 GMT
Well, changing C:/ and D:/ to C:\ and D:\ made it work (with ant3.1 and
classpath concatenation). But I don't understand why. Earlier it worked with
C:/ but when I added D:/ it didn't, and when that is changed to C:\ and D:\
it works :(  Maybe I can try to have a look at the "/" and "\" anomaly and
send in a patch.

I agree about the case where ant is run as an inner instance of another ant
so overriding property values should not be allowed. Couldn't each
target/Task have properties of it's own which it can choose to change or do
whatever it wanted with and which wouldn't affect the outer version of the
property.

I feel that there should be a way to allow properties, or specifically
paths, to be built incrementally in this, or some other, manner. I hate to
have classpaths running to several lines (and wrapping around in the
editor). I like to have each path in the classpath to be on a separate line.
This make it very clear and easy to edit. If all the paths are in one single
line it is very difficult to read/edit and easy to make mistakes.

Could there be some way to add paths incrementally to the classpath of the
javac task. Maybe..

<javac ...>
    <classpath>
        <path value="C:\" />
        <path value="D:\" />
        <path value="E:\" />
        <path value="F:\" />
    </classpath>
</javac>

Ugh! This doesn't look too good but it is better than a classpath which runs
for 10 lines. Maybe there is some better way to do this. I would certainly
welcome any which doesn't require me to specify the whole classpath in one
place.

Cheers,
Akbar


----- Original Message -----
From: Conor MacNeill <conor@m64.com>
To: <ant-dev@jakarta.apache.org>
Sent: Friday, July 07, 2000 8:30 PM
Subject: RE: Problem with Property Task


> Akbar,
>
> 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
>
>
> --
> Conor MacNeill
> Home: conor@m64.com
> Work: conor@cortexebusiness.com.au
> Web:  www.cortexebusiness.com.au
>
>
> > -----Original Message-----
> > From: Akbar Ibrahim [mailto:akbar.ibrahim@wipro.com]
> > Sent: Friday, 7 July 2000 23:24
> > To: ant-dev@jakarta.apache.org
> > 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
> >
> >
>


Mime
View raw message