ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "plim" <pengs...@correlationtech.com>
Subject How to use a FileList/FileSet in multiple places
Date Thu, 17 Apr 2003 18:12:26 GMT
Hi,
 
How can I define a list of jar files that will be used in multiple
projects
The list of jar files is made up of...
    1) My own utilities -- myXmlUtils.jar, and
    2) a few open-source jars -- xercesImpl.jar, xmlParserAPIs.jar,
xalan.jar, jaxrpc.jar
As you can see, the list of files need to stay together for each
project.
My central build.xml has one build target for each project
    ie: <target name="build-XmlViewer" > ,
        <target name="build-XslViewer" >  ,      etc..
 
what I want to do....
1) define a FileList or Fileset containing these jar files --
id="myLibs"
2) In my "build-XmlViewer" project , I want to include the list into my
project jar...
        <target name="build-XmlViewer" >
            <ant-call target="clean-and-compile"/>
            <ant-call target="jar-XmlViewer"/>
        </target>
        <target name="jar-XmlViewer">
            <jar destfile="XmlViewer.jar">
                <fileset refid="myLibs"/>   <--------- something like
this ???
            </jar>
        </target>
3) in my "build-XslViewer" project, I just want to copy the list to my
project lib directory...
        <target name="build-XslViewer" >
            <ant-call target="copy-myLibs"/>
        </target>
        <target name="copy-myLibs">
            <copy todir="${basedir}/XslViewer/lib">
                <filelist refid="myLibs"/>  <----------- something like
this ???
            </copy>
        </target>
 
Can anybody enlighten me on the usage of FileSets and FileLists ?
I need to do this sort of thing in 10 different projects, where each
project needs to define file lists
for sources, classes, jars, config files, images, etc. To be used in
various tasks like, <zip>, <jar>, <war>, <ear>
<copy>, <delete>, <move>, etc..
 
Thanks in advance
pengster
 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message