| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
| <html lang="en"> |
| <head> |
| <meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2011. 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> |
| <h1>Non-Ant project builders</h1> |
| <p> When we worked through our <a href="qs-93_project_builder.htm">project builder example</a>, you may have |
| noticed that when we created our project builder as an Ant buildfile kind. This time we will choose the Program kind when we create a |
| project builder. |
| </p> |
| <p>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 <code>.bat</code> files to jar up and deploy your Eclipse |
| projects. You would then create a <b>Program</b> 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 <b>External Tools</b> dialog appears, configured for <b>Program</b> type tools.</li> |
| <li>Enter the location of your script, its working directory, and any required |
| arguments. <br><br> |
| <img src="../images/et_builder_main_tab.png" alt="External tools dialog for program type tools" border="0" > |
| <br><br> |
| </li> |
| <li>In this case, the script is a Windows <code>.bat</code> 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 <b><a href="PLUGINS_ROOT/org.eclipse.jdt.doc.user/concepts/concept-java-builder.htm">Java builder</a></b> |
| for Java projects).</li> |
| <li>Rebuild your project. This will trigger your script to execute. Any output |
| it generates will be sent to the <b><a href="PLUGINS_ROOT/org.eclipse.jdt.doc.user/reference/views/console/ref-console_view.htm">Console view</a></b>.</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> |
| <p> |
| <img border="0" src="../images/ngrelt.png" alt="Related tasks" ><br> |
| <a href="qs-82_create.htm">Creating Ant buildfiles</a><br> |
| <a href="qs-83_edit.htm">Editing Ant buildfiles</a><br> |
| <a href="qs-85_ant_configs.htm">Saving & Reusing Ant options</a><br> |
| <a href="qs-84_run_ant.htm">Running Ant buildfiles</a><br> |
| <a href="qs-93_project_builder.htm">Creating a project builder Ant buildfile</a><br> |
| <a href="qs-92_project_builders.htm">Ant buildfiles as project builders</a><br> |
| <a href="qs-94_run_pj.htm">Executing project builders</a><br> |
| <a href="qs-95_external_tools.htm">External tools</a><br> |
| <a href="qs-97_standalone_ets.htm">Stand-alone external tools</a> |
| </p> |
| </body> |
| </html> |