Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Ant : how can I use properties to store nested element

Thread Tools

Ant : how can I use properties to store nested element

Christopher Ho
Posts: n/a
Hi all,

I have a build script which uses <fileset> nested in <path> to store
the classpath and then this <path> is used in javac. e.g.

<path id="MY_CLASSPATH">
<fileset dir="${build.dir.lib}" includes="**/*.*"/>
<fileset file="${global.lib.j2ee}"/>

srcdir = "${project.compile.src}"
destdir = "${project.compile.dest}">
<path refid="MY_CLASSPATH"/>

I just wondering is it possible to store the fileset in the properties
file so that I can reference it in other place? I want to do a fileset
instead of writing all the jar file names explicitly.
In the properties file:
project.compile.classpath=dir:${build.dir.lib}:fil e:${global.lib.j2ee}
(or something like that....)

then in my build.xml:
srcdir = "${project.compile.src}"
destdir = "${project.compile.dest}">
classpath = "${project.compile.classpath}">
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
The properties for the Img1 element do not have the additional RoundedCornersExtender properties. AAaron123 ASP .Net 2 10-07-2009 12:34 PM
Gibt es bei Ant "nested properties"? carsten_ Java 2 03-10-2008 09:11 PM
Element <link> cannot be nested inside element <div> Rick ASP .Net 1 07-19-2007 01:56 PM
Element TABLE cannot be nested within element 'p' Fred Flintstone ASP .Net 2 09-13-2006 08:15 PM
wondering how i can launch tomcat from ant without ant hanging... Chris Bedford Java 6 12-23-2004 12:41 AM