PropertyNameList

The PropertyNameList task returns a list of property names that are contained in the specified PropertySet.

If a PropertySet is omitted, all property names will be returned.

The following table describes PropertyNameList attributes.

Attribute Description Required

failOnError

If true (the default), the task fails if it encounters an error. If false, some errors are ignored and the task is completed.

No

failProperty

Name of the ant property inw hich to store the result of the task. If the task is successful, the specified property will be set to true. If the task fails, the specified property will be set to false. If failOnError is set to true, this option has no effect.

No

reportError

If true (the default value) and failOnError is et to false, an information message is written to the log when an error is encountered which includes the error message text. If false, no message is written to the log when an error is encountered. If failonError is set to true, this option has no effect.

No

reportTrace

If true and reportError is true, the stack trace for the error is wirtten to the log. If false (the default value), the stack trace for the error is not written to the log. If failOnError is set to true, or if reportError is set to false, this option has no effect.

No

property

The name of the ant property in which to return the workspace name.

Yes

Example

Encrypt a password

<?xml version="1.0" encoding="UTF-8"?>
<project name="DropBuildProperties" xmlns:ac="antlib:net.sf.antcontrib">

	<propertyNameList property="propertyName">
		<propertysset id="get.propertyList">
			<propertyref prefix="com."/>
			<propertyref prefix="dir."/>
			<propertyref prefix="jvm."/>
			<propertyref prefix="rtc."/>
			<propertyref prefix="scm."/>
			<propertyref prefix="team."/>
			<propertyref prefix="temp."/>
			<propertyref name="buildDefinitionId"/>
			<propertyref name="buildEngineHostName"/>
			<propertyref name="buildEngineId"/>
			<propertyref name="buildLabel"/>
			<propertyref name="buildLabelPrefix"/>
			<propertyref name="buildRequesterUserId"/>
			<propertyref name="buildResultUUID"/>
		</propertyset>
	</propertyNameList>

	<ac:for list="${propertyName}" delimiter="," param="propertyName">
		<sequential>
			<echo levl="verbose">Dropping property: [@{propertyName}]</echo>

		</sequential>
	</ac:for>

</project>		

video icon Video

Jazz.net channel
Software Education channel

learn icon Courses

IoT Academy
Skills Gateway

ask icon Community

Jazz.net
Jazz.net forums
Jazz.net library

support icon Support

IBM Support Community
Deployment wiki