Can anyone help?

I am trying to set the basedir project attribute with a property that is 
passed in on the command line.  The property is recognised from within tasks 
of this project, but does not get recognised within the <project> tag.

Script (Make.bat) :

SET MY_HOME=C:\MyHome
java -Dant.home="%ANT_HOME%" org.apache.tools.ant.Main -buildfile 
%MY_HOME%\bin\build.xml -Dmy.home=%MY_HOME% %1 %2 %3 %4 %5 %6 %7 %8 %9


build.xml file :

<project name="My Project" default="buildall" basedir="${my.home}">
  <property environment="env"/>
  <property name="classpath" value="${env.CLASSPATH}"/>

  <target name="init">
    <echo message="basedir is ${basedir}"/>
    <echo message="my.home is ${my.home}"/>
  </target>
</project>


Output from running make file (make init) :

Buildfile: c:\MyHome\bin\build.xml
init:
     [echo] basedir is C:\MyHome\bin\${my.home}
     [echo] my.home is c:\MyHome



Is this exepected behaviour or a bug?  Is there a work around.  Any help is 
greatly appreciated.

Mark

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp

Reply via email to