views:

554

answers:

1

Hi, I have a large project I'm working on (using Eclipse) that uses the 1.5 update 18 JDK, various external JARs, and the like. It's all been setup properly in Eclipse. Is it possible to create an Ant file that generates a JAR from a particular source file in my project? (A number of the source files are compilable into Java Applications. All of those share a lot of the same resources, thus the huge project workspace).

So far, I've only been able to figure out how to create an Ant build file for the entire project, not build the specific .java file into an app, let alone create a .jar from it.

Thanks for all the help!

+5  A: 

You can specify which files to include in a jar file by configuring the jar task. You can configure which class files go into the jar by configuring using the includes and includesFile options. See the Jar task docs.

Paul Morie