Setting Properties in an Ant Properties File
See Also
You can set properties for your Ant scripts by entering them directly into
the Ant script or by storing them in a separate Ant properties (ant.properties)
file.
To set properties in a separate Ant properties file:
- Right-click the Ant script node in the Filesystems window and choose Properties.
- Click the ellipsis button for the Project Properties property. The Create
Properties File wizard opens.
- Enter a unique name for the properties file or click Next to accept the
default name. The IDE automatically appends the .ant.properties suffix
to the file name.
- Type your properties in the text area. Write properties using the same syntax
as regular properties files (key=value) without quotation
marks. Click Finish.
The properties file (
)
is created in the same directory as your Ant script and a <property
file="filename"> tag is added to your
Ant script.
 |
You can also set properties for individual targets
by right-clicking the target in the Filesystems window, choosing Properties,
and clicking the ellipsis for the Target Properties property. |
To edit the contents of a properties file, do either of the following:
- Double-click the properties file in the Filesystems window to edit the file in the
Source Editor's tabbed properties pane.
- Right-click the properties file and choose Edit to edit the file in text
mode.
To change the properties file referenced by your Ant script:
- Right-click the Ant script node in the Filesystems window and choose Properties.
- Select a different properties file from the Switch Properties File combo
box. This combo box lists all of the .ant.properties files in the
present directory.
 |
In addition to your user-defined properties, the
IDE also includes a set of global properties that are passed to Ant each
time you run an Ant script. To view these properties, choose Tools Options
and expand the Building node. Then select Ant Properties and click the ellipsis
button in the Properties setting. |
Legal Notices