ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Charlie Cano <cc...@columbus.rr.com>
Subject Ant to collect 3rd party libraries
Date Fri, 29 Aug 2003 17:28:46 GMT

I would like to use Ant to automate the "gathering" of 3rd party
libraries (jars, etc) from a remote ftp server, but I'm not sure what
the "right" way of doing it would be.  

For example, starting from a clean build, I'd like my developers to be
able to run an ant command which would ftp all the required libraries
(junit, etc) from a central ftp server to their local rool-level build
environment.  My question is how to maintain this list of dependent
libraries in a "clean" way.

What I have now is a top-level properties.xml, which defines as
properties the location of jar files required by all subprojects.  For
example:


        <property name="lib.dir"                 
        location="${masterbuild.dir}/lib" />
        <property name="xerces.dir"         
        location="${lib.dir}/xerces-2_3_0"  />
        <property name="xercesImpl.jar" 
        location="${xerces.dir}/xercesImpl.jar" />
        

I follow this pattern for all the libraries used.  My problem is how
should I use ant cleanly to go and fetch (either the tarball, or the
full directory) from 

    ftp://myRemoteServer/3rdPartyLibs/xerces-2_3_0

to
    
    ${masterbuild.dir}/lib    // local location

Here's some pseudocode for what I'd like to be able to do:


        Array requiredLibs = { xerces, struts };
        for (i=0; i<requiredLibs.length; i++) {
            copy from remoteserver/requiredLibs[i] to
        local_masterbuild.dir/lib/
        }


Is there a nice way to do this?  Is anyone else doing something similar
that might have a better suggestion for me?

Thanks in advance,
Charlie


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