ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Hardy <>
Subject Re: filelist dir attribute
Date Mon, 10 Feb 2003 17:11:52 GMT
All the paths I want to use are absolute, but pathelement can't handle 
absolute paths - it treats them all as relative in the way I stated 
according to my testing and knowledge of the src code, relative to the 
basedir as you call it.  Which brings me back to the start - it won't 
work under windows with differing drive letters.

You see, I don't want to have to move jars around - when I install or 
build a package, say struts or ant, I want to refer to the struts.jar 
just where it was put when I untarred or built it. This avoids manually 
copying jars after install to a lib directory in my projects directory 
or in tomcat or wherever. It always seemed strange having to do that, 
since ant will do it all over again anyway during deploy.

Am I being more lucid about what I am doing? I have now changed my ant 
code so that the dir attribute on FileList is not mandatory, and when it 
is null, then the parent Path element ignores it under the assumption 
that the path will be absolute.

Erik Hatcher wrote:
> On Monday, February 10, 2003, at 11:14  AM, Adam Hardy wrote:
>> <pathelement location=> has the same effect of putting the working 
>> directory onto the front, and <pathelement path=..> puts it onto the 
>> front of each item. Unless there's an attribute I don't know about?
> I'm confused.  You mean your properties like ${struts.jar} are 
> *relative* paths?  And you want to keep them that way?
> That is just not going to work consistently.  Each JAR file property 
> should be an absolute path to the location, not relative.  This does not 
> at all mean you code absolute paths anywhere - but instead you have a 
> known "root" directory you can base from (perhaps ${basedir} or ".") and 
> fix properties from that point.
> For example, I use something like this:
>     <property name="lib.dir" location="../lib"/>
> And then fix paths to ${struts.jar} based on ${lib.dir}.
>     Erik
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

View raw message