blob: dd878eda9fb1282d7a4f52f379404892caae9d4f [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML>
<HEAD>
<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2005. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
<LINK REL="STYLESHEET" HREF="../book.css" CHARSET="ISO-8859-1" TYPE="text/css">
<title>Non-Ant project builders</title>
</HEAD>
<BODY BGCOLOR="#ffffff">
<h3>Non-Ant project builders</h3>
<P CLASS="Para"> 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:<br>
<img src="../images/Image614_et_type_dialog.png" alt="Choice of external tool type dialog" border="0" > </P>
<P CLASS="Para">The <b>Program</b> 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. </P>
<ol>
<li>Create a script that performs your preferred deployment steps.</li>
<li>Select the project that you wish to build in one of the navigation views,
and choose <b>Properties</b> from the context menu.</li>
<li>Select <b>Builders</b>, click <b>New...</b>, select <b>Program</b> and click
<b>OK</b>.</li>
<li>The External Tools dialog appears, configured for Program type tools.</li>
<li>Enter the location of your script, its working directory, and any required
arguments. <br>
<img src="../images/Image615_program_builder.png" alt="External tools dialog for program type tools" border="0" >
</li>
<li>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. </li>
<li>The <b>Refresh</b> and <b>Build Options</b> tabs are identical to the tabs
we saw for Ant project builders. In particular, the <b>Build Options</b> tab
allows us to control what types of builds trigger our project builder buildfile.</li>
<li>Apply the changes, and click <b>OK</b>.</li>
<li>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).</li>
<li>Rebuild your project. This will trigger your script to execute. Any output
it generates will be sent to the Console view.</li>
</ol>
<p>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.</p>
</BODY>
</HTML>