- Documentation (2.4.0)
- Release Notes
- Tutorials
- Reference
- Introduction
- Settings Files
- Ivy Files
- Ant Tasks
- artifactproperty
- artifactreport
- buildlist
- buildobr
- buildnumber
- cachefileset
- cachepath
- checkdepsupdate
- cleancache
- configure
- convertmanifest
- convertpom
- deliver
- dependencytree
- findrevision
- fixdeps
- info
- install
- listmodules
- makepom
- post resolve tasks
- publish
- repreport
- resolve
- resources
- retrieve
- report
- settings
- var
- Using standalone
- OSGi
- Developer doc
property
Tag: property
Defines an ivy variable. since 1.3 The optional override attribute enables you to avoid overriding the previous value of the variable, which makes the definition behave like an ant property, which is particularly useful to define default values (values which are used only if they haven't been defined yet).
Attributes
Attribute | Description | Required |
---|---|---|
name | the name of the variable to define | Yes |
value | the new value the variable must take | Yes |
override | true if the previous value (if any) of the variable should overriden, false otherwise | No, defaults to true |
ifset | the variable will be set only if the provided 'ifset' variable is already set (Since 2.4) | No |
unlessset | the variable will not be set unless the provided 'unlessset' variable is set (Since 2.4) | No |
Examples
<property name="myvar" value="myvalue"/>Sets the variable myvar to the value myvalue.
<property name="myvar" value="myvalue" override="false"/>Sets the variable myvar to the value myvalue only if myvar has not been set yet.
<properties environment="env"/>If the environment variable is set, it takes precedence over of default value.
<property name="ivy.repos.server" value="${env.IVY_SERVER}" override="false" ifset="env.IVY_SERVER" />
<property name="ivy.repos.server" value="http://ivy:8081" override="false"/>