| <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
| <html> |
| <head> |
| <title> |
| Using build configurations with Ant |
| </title> |
| <link rel="stylesheet" href="../book.css" charset="ISO-8859-1" type="text/css"> |
| <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> |
| <meta http-equiv="Content-Style-Type" content="text/css"> |
| </head> |
| <body> |
| <h1> |
| Using build configurations with Ant |
| </h1> |
| <p> |
| The format used in .ajproperties files is that of standard properties files. |
| If want to build your Eclipse projects using Ant, you can either convert your |
| .ajproperties files to the old .lst format, or you can process the .ajproperties |
| files directly. Below is a snippet from an example build.xml file which reads the |
| src.includes and src.excludes properties from a .ajproperties file and passes them to the |
| iajc Ant task.</p> |
| |
| <p><code><br> |
| |
| <property file="tracelib.ajproperties"/><br><br> |
| |
| |
| <target name="compile" ><br> |
| <iajc srcdir="."<br> |
| includes="${src.includes}" excludes="${src.excludes}" <br> |
| fork="true"/><br><br> |
| <forkclasspath><br> |
| <pathelement .../><br> |
| ...<br><br> |
| </target><br><br> |
| </code> |
| </p> |
| |
| <p> |
| Note that there is a limitation here in that Ant processes the includes |
| and excludes in a slightly different way to Eclipse. For example if you |
| include lib/AbstractTracing.java but exclude lib/ then as a build |
| configuration in Eclipse, the source file will be an included entry in an |
| otherwise excluded package. Ant processes the includes first, then removes |
| the matching excludes, so everything under lib/ will be excluded |
| (thus overriding the include entry). |
| </p> |
| |
| </p> |
| <p> |
| <img src="../images/ngrelc.gif" alt="Related concepts" border="0" height="27" width="159"> <br> |
| |
| <a href="../concepts/projects.htm">AspectJ projects</a><br> |
| <a href="../concepts/buildconfigs.htm">Build configurations</a> |
| </p> |
| <p> |
| <img src="../images/ngrelt.gif" alt="Related tasks" border="0" height="27" width="159"> |
| </p> |
| <p> |
| <a href="newantfile.htm">Creating a new Ant build file</a><br> |
| <a href="newpluginbuildfile.htm">Creating an Ant build file for an AspectJ plug-in</a><br> |
| <a href="newbuildconfig.htm">Creating a new build configuration</a><br> |
| <a href="editbuildconfig.htm">Editing a build configuration</a><br> |
| <a href="switchbuildconfig.htm">Switching build configurations</a><br> |
| <a href="lstfiles.htm">.lst file support</a> |
| </p> |
| <p> |
| <a href="../notices.html"><img src="../cpy.gif" border="0" alt="Legal notices" width="324" height="14"></a> |
| </p> |
| </body> |
| </html> |
| |