java - How to add only its own classes to a jar file without subpackages using ant script? -
let's package organization below:
net.sf.myparentpackage
- class: requiredclass1.java
- class: requiredclass2.java
net.sf.test.mysuppackage
- class: notrequiredclass1.java
the code below includes classes , subpackages.
<jar destfile="myjar.jar" manifest="manifest.mf"> <fileset dir=".." includes="net/sf/myparentpackage/**" </jar>
i want include requiredclass1.java , requiredclass2.java without listing class names.
you can put ".java" or ".class" instead of "**"
<jar destfile="myjar.jar" manifest="manifest.mf"> <fileset dir=".." includes="net/sf/myparentpackage/*.java" </jar>
Comments
Post a Comment