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> 

https://ant.apache.org/manual/types/fileset.html


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -