For a previously defined property <scala.js.opt>
I'd like to be able to include it like so in a pom.xml file:
<arg value="${scala.js.opt}"/>
However, this doesn't seem to work. Is it even possible, or are there any workarounds?
The particulars of my specific case is that these are arguments to an executable in the maven-antrun-plugin, should this be easier with my specific case.
Detailed example follows
In master pom file:
<properties>
<scala.js.opt>fastOptJS</scala.js.opt>
</properties>
Then in child pom file
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
<executions>
<execution>
<phase>compile</phase>
<configuration>
<target>
<exec executable="cmd.exe"
spawn="true">
<arg value="/c"/>
<arg value="C:\Program Files (x86)\sbt\bin\sbt.bat"/>
<arg>${scala.js.opt}</arg>
</exec>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
When run using e.g., mvn install
, this produces:
org.apache.tools.ant.types.Commandline$Argument doesn't support nested text data ("fastOptJS")