ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <dona...@apache.org>
Subject Re: how to jar a package
Date Fri, 01 Jun 2001 18:23:35 GMT
At 11:11 AM 6/1/01 -0700, Suu Quan wrote:
>Novice speaking
>
>I'm trying to make a jar file out of a 'package' all under the subdirectory
>utils.
>This is my task (my current directory is the top project directory, and
>utils is a child of it)
>
><target name="utils" >
>    <javac srcdir="utils" includes="**/*.java" excludes="**/test/**"
>        classpathref="classpath"/>
>    <jar jarfile="${lib}/utils.jar"
>         basedir="utils"
>         includes="**/*.class"
>    />
></target>
>
>what I get is
>
>ldap/NumberString.class
>ldap/IntegerString.class
>net/
>net/TcpServer.class
>Log.class
>Int.class
>
>        instead of
>
>utils/ldap/NumberString.class
>utils/ldap/IntegerString.class
>utils/net/
>utils/net/TcpServer.class
>utils/Log.class
>utils/Int.class
>
>    How do I correct it, so that other can refer tothe jar file as
>
>import utils.*;

Use

    <jar jarfile="${lib}/utils.jar"
         basedir="."
         includes="utils/*.class"
    />

Cheers,

Pete

*-----------------------------------------------------*
| "Faced with the choice between changing one's mind, |
| and proving that there is no need to do so - almost |
| everyone gets busy on the proof."                   |
|              - John Kenneth Galbraith               |
*-----------------------------------------------------*


Mime
View raw message