ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Krzysztof Czarny <czar...@yahoo.com>
Subject Some targets inside another buildfile
Date Tue, 11 Sep 2001 08:33:25 GMT
Hi!
Every project's buildfile that I wrote has some common
parts. E.g.:
<property name="build.classesdir"
          value="${build}/classes"/>
<target name="compile">
  <mkdir dir="${build.classesdir}"/>
  <javac srcdir="${src}"
         destdir="${build.classesdir}"/>
</target>
I'd like to move them into another common buildfile
and then 'include' this new buildfile into the main
project buildfile and use them in a normal way:

<!-- main project buildfile -->

<property name="src" value="."/>
<property name="build" value="build"/>
<include file="common.xml"/> <!-- it uses defined
property -->
<target name="test" depends="compile">
  <echo message="${build.classesdir}"/>
</target>

Is it possible?

Regards,
  Krzysztof


__________________________________________________
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger
http://im.yahoo.com

Mime
View raw message