Details
-
Type:
Improvement
-
Status:
Closed
-
Priority:
Critical
-
Resolution: Fixed
-
Affects Version/s: 1.1
-
Fix Version/s: 1.4
-
Component/s: None
-
Labels:None
-
Number of attachments :
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>
Issue Links
| This issue is duplicated by: | ||||
| MANTRUN-87 | Improve propagation of properties |
|
|
|
| MANTRUN-64 | Pass properties through |
|
|
|
| This issue is related to: | ||||
| MANTRUN-88 | Profile properties not handled correctly |
|
|
|
I don't think this was never intended so it's a new feature, not a bug