Using ANT to generate .jar in a very large project

I have a large project that I'm working on (using Eclipse) that uses the 1.5 update 18 JDK, various external JARs, etc. Everything was configured correctly in Eclipse. Is it possible to create an Ant file that generates a JAR from a specific source file in my project? (Several source files are compiled into Java applications. They all have many of the same resources, so a huge project workspace).

So far, I've been able to figure out how to create an Ant build file for the entire project, rather than create a specific .java file in the application, let alone create a .jar from it.

Thanks for the help!

+1


a source to share


1 answer


You can specify which files to include in the jar file by configuring the task jar

. You can customize which class files go to the jar by adjusting the parameters includes

and includesFile

. See the Jar task docs .



+5


a source







All Articles