ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anthony Goubard" <adagoub...@chello.nl>
Subject Re: Ant 1.7
Date Wed, 18 Feb 2004 16:17:31 GMT
Hi,

>Hi,
>
>
>In any case I am starting to think about ant 1.7 and further.
>
>Here are the points which spring to my mind :
>
>1) local properties,
Here I'd like to point out to something strange I saw last month; properties
are local if you use antcall but not with depends :

  <target name="test.properties">
    <echo message="1st local.prop : ${local.prop}"/>
    <antcall target="test.properties2"/>
    <echo message="3rd local.prop : ${local.prop}"/>
  </target>

  <target name="test.properties2">
    <property name="local.prop" value="a value"/>
    <echo message="2nd local.prop : ${local.prop}"/>
  </target>

results in
D:\Lg\java\ant>ant -f test.xml test.properties
Unable to locate tools.jar. Expected to find it in
D:\LG\JDK1.4\JRE\lib\tools.ja
r
Buildfile: test.xml

test.properties:
     [echo] 1st local.prop : ${local.prop}

test.properties2:
     [echo] 2nd local.prop : a value
     [echo] 3rd local.prop : ${local.prop}

BUILD SUCCESSFUL
Total time: 5 seconds
D:\Lg\java\ant>echo %JAVA_HOME%
d:\lg\jdk1.4

1st remarks : I don't know why it's looking my tools.jar in jre/lib as it's
in jdk1.4/lib (on my jdk 1.4.2_01, Win 98 & Win ME, ANT 1.6.1)

2nd remarks : As you can see the property is local, so there is a lot of
confusion and I had some problems when I wanted to have a global variable.
Do you consider this as a bug?

>I see 3 phases :
>0) discuss which APIs/Projects ... represent the kind of virtual file
>system we are interested in. I am always thinking about jakarta
>vfs-sandbox (that I only know by name), but one could also think about
>JNDI as an interface through which ant could get access to a number of
>different realms, and there are certainly other APIs and or
>implementations which can be interesting.
>
>I) develop ant virtual filesystem support only in the vfs sandbox(if vfs
>sandbox is chosen in phase 0, that is to say), without changing ant,
>
Here I'd like to share my experience as I realised a project that used both
ANT and VFS for a file manager in Java.
What I've done is created target that use standard ANT tasks if it's a file
to file manipulation and uses VFS tasks if it uses ftp or samba or zip or
...
I first had to extend the VFS task as the copy task (for example) only takes
one source or you need to specify one by one as nested element your files.
I've added a setSrcdir(String sourceDir) and setIncludes(String fileList).

I also think that the project is on stand by as it seems that nobody is
working on it at the moment. The last commits date from 11 months ago
(except for a isHidden() method and a text correction in the license). I've
discovered a few things (that I consider as bug) and submitted it (with the
bug fix) to Adam Murdoch (the main programmer who did a very good job) but
had no answer to them.

About the dependencies note that if VFS depends on common logging and some
others optional libraries depending on the file system :
http://jakarta.apache.org/commons/sandbox/vfs/download.html

If you want to see what is the combination of ANT and VFS download my
software at
www.antcommander.com (note it's still under development but almost finished)
I think that the combination of VFS and ANT is great and it does not
necessary mean that ANT depends on VFS, the tasks can only use the VFS
library when they need it (with ftp, webdav, ...) such as some optional
tasks do now.

I especially like the todo list
http://jakarta.apache.org/commons/sandbox/vfs/todo.html
with
#  Add an equivalent of Ant path, fileset, dirset, filelist, etc. Ideally,
these can be abstracted into a single data type.
# Allow selectors, name mappers, and filters to be specified for the Ant
tasks.
# Add more selectors: XPath, Ant style, regular expression.

Anthony


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


Mime
View raw message