There are six ways to set properties:
In Oddjob the property name is divided up into a tree of properties, so morning.snack.fruit = apple is a node called morning that has a snack property which is another node that has a fruit property with a value apple.
If the export property is set to true the property tree is exported to Oddjobs underlying property pool so the root property node acts like a component with an id. In the above example an id of 'morning'.
The prefix property will be prefixed to properties provided with via input, values or properties (not environment or system as they provide their own prefix)
| Name | Description | Required |
|---|---|---|
| name | A name, can be any text. | No. |
| export | Export properties to the underlying Bean Registry. | No. |
| input | An input source for Properties. | No. |
| fromXml | Is the input in XML format. | No, Defaults to false. |
| set | The. | No. |
| properties | Extra properties. | No. |
Required: No, Defaults to false.
Is the input in XML format.
<oddjob>
<job>
<sequential>
<jobs>
<properties id="props" export="true" prefix="messages">
<values>
<property name="english.greeting" value="Hello"/>
</values>
</properties>
<echo text="${props.all.messages.english.greeting} is exported as ${messages.english.greeting}" />
</jobs>
</sequential>
</job>
</oddjob>