ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cuong Tran <ct...@yahoo.com>
Subject Re: Automatically importing a directory of .jar files.
Date Wed, 25 Jul 2001 06:06:36 GMT

 I usually do this:

    <javac srcdir="${src.main}"
           destdir="${build.classes}"
           debug="off"
           deprecation="off"
           optimize="on" 
           includes="**/*.java" >
      <classpath>
        <pathelement path="${java.class.path}" />
        <fileset dir="lib/">
          <include name="**/*.jar" />
        </fileset>
      </classpath>
    </javac>

--- burtonator <burton@relativity.yi.org> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> 
> Hey.
> 
> I want to make it easy for my projects to be downloaded and built without any
> major CLASSPATH hacks.  I am putting all my .jar files into PROJECT/lib but I
> am
> hving to manually add EACH .jar into the "classpath" attribute on the javac
> task.
> 
> It would make sense to just do a
> 
> <import-classpath dir="../lib"/>
> 
> And then run javac like:
> 
> <javac classpath="${CLASSPATH}
> 
> The ImportClasspath taskdef would read all .jar files form the given
> directory
> and add them to the classpath.
> 
> Doesn't this seem more "clean" than manually adding each classpath entry? 
> Has
> anyone attempted a Taskdef like this?
> 
> Kevin
> 
> - -- 
> Kevin A. Burton ( burton@apache.org, burton@openprivacy.org,
> burtonator@acm.org )
>         Cell: 408-910-6145 URL: http://relativity.yi.org ICQ: 73488596 
> 
> Without enlightenment, there is only ignorance.
>   -- famous Zen Koan
> 
> 
> 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.0.4 (GNU/Linux)
> Comment: Get my public key at: http://relativity.yi.org/pgpkey.txt
> 
> iD8DBQE7XiUaAwM6xb2dfE0RApgHAJ9tkzO2BxXH/xB0q8lF/j5ZscJrDwCeMsV8
> xOYiWLtQ5CYQD+9GN5XzBUI=
> =UJCP
> -----END PGP SIGNATURE-----
> 


=====
Cuong Q. Tran <ctran@yahoo.com>

__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

Mime
View raw message