title: How can a maven property be used in a maven attribute?
body: <p>For a previously defined property <code>&lt;scala.js.opt&gt;</code> I'd like to be able to include it like so in a pom.xml file:</p>
  
  <pre><code>&lt;arg value="${scala.js.opt}"/&gt;
  </code></pre>
  
  <p>However, this doesn't seem to work. Is it even possible, or are there any workarounds?</p>
  
  <p>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.</p>
  
  <p><strong>Detailed example follows</strong></p>
  
  <p>In master pom file:</p>
  
  <pre><code>&lt;properties&gt;
      &lt;scala.js.opt&gt;fastOptJS&lt;/scala.js.opt&gt;
  &lt;/properties&gt;
  </code></pre>
  
  <p>Then in child pom file</p>
  
  <pre><code>        &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-antrun-plugin&lt;/artifactId&gt;
              &lt;version&gt;1.8&lt;/version&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;phase&gt;compile&lt;/phase&gt;
                      &lt;configuration&gt;
                          &lt;target&gt;
                              &lt;exec executable="cmd.exe"
                                    spawn="true"&gt;
                                  &lt;arg value="/c"/&gt;
                                  &lt;arg value="C:\Program Files (x86)\sbt\bin\sbt.bat"/&gt;
                                   &lt;arg&gt;${scala.js.opt}&lt;/arg&gt;
                              &lt;/exec&gt;
                          &lt;/target&gt;
                      &lt;/configuration&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;run&lt;/goal&gt;
                      &lt;/goals&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
          &lt;/plugin&gt;
  </code></pre>
  
  <p>When run using e.g., <code>mvn install</code>, this produces:</p>
  
  <pre><code>org.apache.tools.ant.types.Commandline$Argument doesn't support nested text data ("fastOptJS")
  </code></pre>