ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 8965] - Use of File instead of URL
Date Fri, 17 May 2002 00:32:53 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8965>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8965

Use of File instead of URL





------- Additional Comments From memmel2@yahoo.com  2002-05-17 00:32 -------
No its not too complex the problem is you need to seperate the two concepts
one ant needs to know where to find the build file or files second ant needs to
know where to find the "source" its compiling. Its simply tradition that the
build files are relative to the source code location not a requirment.
Given the option to have a "src" root and a build  root then you could easily
have the more complex behiavor. Obviosily you would default to the traditional
behavior unless the build files are coming from disjoint location. 

I think that allowing seperation of the build file structure from the source
is a good thing the build files do not need to be relative to the src this has
nothing to do per se with URL's although its required for this.

Thats problem 1.

This would mean 

ant -f http://someserver/build.xml -src ../

thus 

ant -f ../build.xml 

is the same as

ant -f ../build.xml -src ../



Next to run the Builds you should be able to use URL/URLConnection 

or better a Wrapper class that can use Files or URL's internally etc.
This would basically be equivilent to Java's ResourceBundles.

This would allow ant to handle non-file resources.

As far as I can tell ant intself only needs to know if a resource has been
modified and a way to pass the URL to the resource off to the tools.

Sure the Tools or tasks may only understand files but ant itself could be coded
to use generic URI's IMHO.

Theres no intrinsic reason for java javah javac etc to use files instead of
URI's and no reason for ant to fall under this restriction. 

In fact and ant task could indeed perform a "get" too the local file system as a
wrapper around old-fashioned  tools as you suggested. I'm just saying that Ant
itself and a lot of the generic tasks can be coded to use URL's.
This actually brings up another issue there is no generic support for a temp
directory or temp files. There should be a basic tasks to make temp directory
and file names. The production of temporary files is fairly common during
builds.

Anyway I've started work on removing the File depedencies inside ant and moving
to URL's if it all works out I'll send it back to you guys. If I can get ant non
file dependent I can look at wrapper tasks which will allow you to use a
"URLize" a file dependent tool.

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message