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

Non-Ant project builders

When we worked through our project builder example, you may have noticed that when we created our project builder Ant buildfile, we had a choice of external tool type:

Choice of external tool type dialog

The Program option is essentially a catch-all, allowing you to define an external tool for any executable file that is accessible on your local or network file system. Suppose that instead of Ant, you prefer to use your own shell scripts or Windows .bat files to jar up and deploy your Eclipse projects. You would then create a Program external tool that specified where and how to execute your script.

  1. Create a script that performs your preferred deployment steps.
  2. Select the project that you wish to build in one of the navigation views, and choose Properties from the context menu.
  3. Select Builders, click New..., select Program and click OK.
  4. The External Tools dialog appears, configured for Program type tools.
  5. Enter the location of your script, its working directory, and any required arguments.

    External tools dialog for program type tools

  6. In this case, the script is a Windows .bat file, but it could be a Linux shell script, a Perl script or just about anything else that can be executed on your system.
  7. The Refresh and Build Options tabs are identical to the tabs we saw for Ant project builders. In particular, the Build Options tab allows us to control what types of builds trigger our project builder buildfile.
  8. Apply the changes, and click OK.
  9. As with Ant project builders, we can control the ordering of this project builder with respect to other project builders (such as the default Java builder for Java projects).
  10. Rebuild your project. This will trigger your script to execute. Any output it generates will be sent to the Console view .

Ant is a popular tool for configuring and deploying projects. But if you prefer some other tool, or prefer to do it yourself, you can set up a Program external tool project builder. This allows you customize the deployment of your project as you see fit, while keeping the convenience of automatically running your script every time your project is built.

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

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