Details
-
Improvement
-
Status: Closed
-
Critical
-
Resolution: Fixed
-
1.1
-
None
Description
Properties defined in pom <properties> do not propagate to the antrun environment.
For example:
<properties> <my.property>foo</my.property> </properties>
Does not get propagate to Ant. While properties defined within the pom will resolve, the properties are not available as an Ant property. So from antrun:
<ant antfile="${pom.basedir}/src/ant/build.xml" dir="${pom.basedir}" inheritAll="true" inheritRefs="true" target="foo"/>
And then the Ant build.xml:
<project>
<target name="foo">
<echo>${my.property}</echo>
</target>
<project>
The output will be:
[echo] ${my.property}
Instead of what it should be:
[echo] foo
The workaround is to delegate to a build.xml file with the ant task and redefine each property that is needed:
<ant antfile="${pom.basedir}/src/ant/build.xml" dir="${pom.basedir}" inheritAll="true" inheritRefs="true" target="foo"> <property name="my.property" value="${my.property}"/> </ant>
Attachments
Issue Links
- is duplicated by
-
MANTRUN-87 Improve propagation of properties
- Closed
-
MANTRUN-64 Pass properties through
- Closed
- is related to
-
MANTRUN-88 Profile properties not handled correctly
- Closed