Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Mail Systems
Eclipse Documentation

How To Guides
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Problem Solutions
Privacy Policy




Eclipse Workbench User Guide
Previous Page Home Next Page

Ant buildfiles as project builders

Our second practical example of using Ant buildfiles in Eclipse is a 'project builder'. This is an Ant buildfile that has been designated to run whenever a project is built. The uses for such a buildfile are many:

  • Generate a .jar file containing class files from your project
  • Perform some type of pre- or post-build processing on source or binary files in your project. For example:
    • Pre-processing source files to instrument them for performance analysis
    • Obfuscating binary files to prevent reverse engineering
  • Copy class files to some location (for instance, on a network)

For this example, we will create an Ant buildfile that creates a .jar archive of the class files in a project. Note that this is similar to the example in the last chapter, in which we used an Ant buildfile to generate .jar files for an Eclipse plug-in. This example differs in that it works for any Eclipse project, whether or not it is also an Eclipse plug-in.

Related tasks
Creating Ant buildfiles
Editing Ant buildfiles
Running Ant buildfiles
Saving & Reusing Ant options
Creating a project builder Ant buildfile
Executing project builders
External tools
Non-Ant project builders
Stand-alone external tools

  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire