Java Mailing List Archive

http://www.ant-tasks.com/

Apache Ant Archive

» Ant Users List
» Ant Developers List
SOLVED: Re: Importing a FileSet from a file different than build.xml

SOLVED: Re: Importing a FileSet from a file different than build.xml

2003-03-30       - By johannes.fiala@(protected)

Hi Jacob,

This tip rocks !!
Do you know where to find more about this in the ant docs??

Johannes




Jacob Kjome <hoju@(protected)>
30.03.2003 18:19
Please respond to
"Ant Users List" <user@(protected)>


To
"Ant Users List" <user@(protected)>
cc

Subject
Re: Importing a FileSet from a file different than build.xml







Sure...

If various lib.xml files contain contents similar to your <copy> task
below, the build.xml file might look like....

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE project [
    <!ENTITY lib-project1 SYSTEM "file:./lib1.xml">
    <!ENTITY lib-project2 SYSTEM "file:./lib2.xml">
]>
<project name="MyProject" default="compile" basedir="." >
...
...
...
<target name="copyjars">
    &lib-project1;
    &lib-project2;
</target>
...
...
...
</project>


Jake

At 01:45 PM 3/30/2003 +0200, you wrote:
>Hi there,
>
>Is it possible to import a FileSet from a file different than build.xml?
>
>E.g. I have a copy task:
>===============
><copy todir="${build.home}/WEB-INF/lib">
>       <fileset dir="${lib.home}">
>                 <include name="cos.jar" />
>                 <include name="cos2.jar" />
>                 ....
>     </fileset>
></copy>
>=================
>
>I'd like to import the fileset's contents (the Jar files) to come from a
>file like lib.xml, so I can have one version of my build.xml and
different
>lib.xml files for each application I want to build.
>
>Is this possible?
>
>thx
>Johannes


©2008 ant-tasks.com - Jax Systems, LLC, U.S.A.