ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <dona...@mad.scientist.com>
Subject Re: subsitution in file names
Date Tue, 04 Jul 2000 12:23:11 GMT
At 03:09  4/7/00 +0400, you wrote:
><property name="sources" value="a.java,b.java">
>...
><javac srcdir="."
>       destdir="classes"
>       includes="${sources}"/>
>...
><jar jarfile="project.jar"
>     basedir="classes"
>     includes="${sources,.java=.class}"/>
>...

Well as a point Ant doesn't want to be as complex as make and this adds a
lot of complexity. Also property substitution will go away in a future
version of ant. 

>Is this possible in ant? What is the workaround for today? 

Well some similar functionality may be available with the path tags that
are in progress of being integrated into ant. As to the workaround ? Use
standard directories and let jar work with whole directory. If you need to
compile from one source tree and place in multiple jars different parts
then you will have to compile to multiple different directories and then
jar thos directories.

ie


<property name="sources1" value="a.java,b.java">
<property name="sources2" value="c.java,d.java">
...
<javac srcdir="."
       destdir="classes/sources1"
       includes="${sources1}"/>
<javac srcdir="."
       destdir="classes/sources2"
       includes="${sources2}"/>
...
<jar jarfile="sources1.jar"
     basedir="classes/sources1" />

<jar jarfile="sources2.jar"
     basedir="classes/sources2"/>
...


>Probably,
>this point was already discussed (sorry, I could not find archives of
>this list)? Please comment

It is mentioned in the email you got when you subscribed.

Cheers,

Pete

*------------------------------------------------------*
| "Nearly all men can stand adversity, but if you want |
| to test a man's character, give him power."          |
|       -Abraham Lincoln                               |
*------------------------------------------------------*

Mime
View raw message