ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff <etrick.j...@ensco.com>
Subject Re: Quick GenJar Question
Date Wed, 29 Jan 2003 19:05:49 GMT
Brian Quirk wrote:

>Hi,
>
>I'd like to Jar all the classes (and dependent classes) in a package
>without listing each class via the <class> element:
>
><genjar jarfile="Bar.jar">
>          <class name="com.foo.bar.class1"/>
>          <class name="com.foo.bar.class2"/>
>          <class name="com.foo.bar.class3"/>
></genjar>
>
>
>Does anyone if its possible to replace the collective <class> elements with
>something that would pull in the entire package?
>
>Thanks,
>Brian
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: ant-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: ant-user-help@jakarta.apache.org
>
>
>  
>
If you want to put all your classes in a jar, you may want to just user 
the <jar> task.

genjar is great when bundling the minimum you need for your jar.

Example: com.foo.bar.class3 uses com.foo.bar.class2 and com.foo.bar.class1
then you can just specify 

<genjar jarfile="Bar.jar">
          <class name="com.foo.bar.class3"/>
</genjar>


If you used the <jar> task to create a jar of common utilities, and then used genjar
to create your deployed application, you can always include an entire jar with the library
tag. 

<genjar jarfile="Bar.jar">
          <class name="com.foo.bar.class3"/>
          <library jar="${common.lib}"  />
</genjar>



---------------------------------------------------------------------
To unsubscribe, e-mail: ant-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: ant-user-help@jakarta.apache.org


Mime
View raw message