ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steffen Schluff" <schl...@oio.de>
Subject AW: New comer to ant
Date Wed, 27 Nov 2002 10:45:28 GMT
Hi Reshma,

the name of the referenced property must exactly match the one declared,
i.e. 'src.dir' instead of 'src' in your case.

Furthermore the property is never set in your case since you did not specify
that the 'compile' target depends on the 'init' target.

Try the following script as an example (especially try removing the
'depends' attribute in the 'compile' target).

Hope that helps,

best wishes,

Steffen Schluff
Orientation in Objects GmbH
http://www.oio.de

<?xml version = '1.0' encoding = 'ISO-8859-1'?>
<project name="Learn_Ant" default="compile">

  <target name="init">
    <property name="src.dir" value="src"/>
  </target>

  <target name="compile" depends="init">
    <echo message="src-property is: ${src}"/>
    <echo message="src.dir-property is: ${src.dir}"/>
  </target>

</project>





-----Urspr√ľngliche Nachricht-----
Von: Reshma Pai [mailto:reshma@analytica-india.com]
Gesendet: Mittwoch, 27. November 2002 11:30
An: ant-user@jakarta.apache.org
Betreff: New comer to ant


Hi All,


In the ant build file displayed below, when i am trying to reference the src
directory declared with the name src.dir, it say ${src.dir} directory not
found. Why is this happening so, to my understanding, ${src} should obtain
the value associated with that name.

<?xml version = '1.0' encoding = 'ISO-8859-1'?>
<project name="Learn_Ant" default="compile"
basedir="/home1/reshma/Learn_Build">
  <target name="init">
    <property name="src.dir" value="src"/>
  </target>
  <target name="compile" >
    <javac srcdir="${src}" destdir="."/>
    <echo message="${build.dir}"/>
  </target>
</project>

Thanks in advance,
Reshma Pai

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message