blob: 499003c09e95dc44ac0b5037f7ede15f31a954bf [file] [log] [blame]
<!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, 2009. 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>Running Ant buildfiles</title>
</head>
<body>
<h1>Running Ant buildfiles</h1>
<p>Any file with a <code>.xml</code> extension can be run as an Ant buildfile.
Of course, not all such files really are Ant buildfiles, but no harm is done
if an attempt is made to mistakenly run a non-Ant <code>.xml</code> file as an Ant buildfile.</p>
<p>In this section, the basic mechanisms for running Ant buildfiles
in Eclipse will be covered, using the <code>HelloWorld.xml</code> file created in the <a href="qs-83_edit.htm">Editing Ant buildfiles</a> task.</p>
<ol>
<li>Select <code>HelloWorld.xml</code> in one of the navigation views and choose <b>Run As
&gt; Ant Build... </b> from its context menu.</li>
<li>The launch configuration dialog is opened on a launch configuration for this Ant buildfile.
<p><img src="../images/ant_run_dialog.png" alt="Run Ant dialog" border="0"></p>
</li>
<li>This dialog allows the configuration of many aspects of the way an Ant
buildfile is run, but for now concentrate on the <b>Targets</b> tab which
allows the selection of which Ant targets to run and their order. Select both
targets and leave the order as the default. </li>
<li>Click the <b>Run</b> button.</li>
<li>The Ant buildfile is run, and the output is 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>
<h3 class="related">Related tasks</h3>
<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 &amp; 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-96_non_ant_pjs.htm">Non-Ant project builders</a><br>
<a href="qs-97_standalone_ets.htm">Stand-alone external tools</a>
</body>
</html>