What I want to do with Apache Ant:
- Create 1 jar file
Inside it is such a structure
/ lib / <- add all libraries here
/ META-INF / <- here indicate the Main-Class
/ com / ... <- compiled classes
/ here configs files
Is it possible to do so, if so, how to put all the libraries that are in different folders in the folder lib + when calling
java -jar name.jar These libraries provided this jar to the classpath. Thank you.
He did this, but he puts all the classes in the jar-nick's root (along with the folders)
<jar destfile="${build.dir}/out/name.jar"> <fileset dir="${classes.dir}"> <include name="**/*.class"/> </fileset> <zipfileset dir="${lib.dir}"> <include name="**/*.jar"/> </zipfileset> <manifest> <attribute name="Main-Class" value="mypackage.myClass" /> </manifest> </jar>