| <!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>Creating Ant buildfiles</title> |
| |
| </HEAD> |
| <BODY BGCOLOR="#ffffff"> |
| <h3>Creating Ant buildfiles</h3> |
| |
| <P CLASS="Para"> Ant buildfiles are just text files, so the most straightforward |
| way to create an Ant buildfile in Eclipse is:</P> |
| <ol> |
| <li><b>File > New > File</b>.</li> |
| <li>Enter a name for the file.</li> |
| <li>Click <b>Finish</b>.</li> |
| </ol> |
| <p>By default the Ant editor only has an association with build.xml named files. |
| As the user you can designate for the Ant editor to be considered for all xml |
| files. |
| <ol> |
| <li><b>Window > Preferences > General > Editors >File Associations</b></li> |
| <li>Add an association between *.xml and the Ant editor.</li></ol> |
| |
| Now, as long as the file has a .xml extension, Eclipse will consider it to be a |
| possible Ant buildfile, and will enable Ant-related actions when it is selected. |
| Until a file has Ant buildfile content, you will need to open it using <b>Open With > Ant Editor</b>.</p> |
| <p>As will be demonstrated in a later section, an Ant buildfile can be created |
| for an Eclipse plug-in that contains predefined targets that are useful for deploying |
| the plug-in.</p> |
| |
| |
| </BODY> |
| </HTML> |