Home
Using the code snippet
Now that you have created a code snippet, you can use it in any Ant build file. To use a code snippet, do these steps:
![]()
Open the build.xml file.
![]()
Add an empty line under the <project> tag, place the cursor there, double-click the Comment Tag in the Snippets view, and the Insert Template dialog is displayed .
![]()
Figure 25-6 Insert Template dialog
![]()
In the variables table, type This is a comment in the comment variable.
![]()
Click Insert.
![]()
The comment line is inserted. Save the file. <project name="HelloAnt" default="dist" basedir=".">
<!-- This is a comment -->
<!-- set global properties for this build -->
ibm.com/redbooks