ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cèsar Ordiñana Navarro <>
Subject About the ant task
Date Fri, 22 Sep 2000 15:30:24 GMT

  Hello everybody,

  I'm working in a big project with several subprojects into it. To easy
the build process, we have decided to use the ant tool.

  Initially, I've made a build.xml file that compiles all the project,
generates the javadoc documentation, etc. It works very well, but I want
to break it into several parts, one for every subproject, that can be
used by itself or be called through a master build.xml file that builds
all the project. This way, every subproject group can work with their
own build.xml file.

  To do this, I'm using the <ant> task, but there is a problem. As we
use a lot of java libraries, I've defined the classpath with a <path>
tag, like this:

  <path id="classpath">
    <pathelement path="${classpath}"/>
    <pathelement path="${build.part1}" />
    <pathelement path="${build.part2}" />
    <fileset dir="${lib}">
      <include name="**/*.jar"/>

  And I use it into the <javac> tag like this:
  <classpath refid="classpath" />

  That works very well in the "big" build.xml. In the subprojects
version, I've used the same in the subprojects build.xml files, and in
the master build.xml. It also works well when we build any subproject
but, when we try to build all the project, ant complains when it
processes the first <ant> task that runs it on the first subproject
build.xml, and tells:

  Unexpected element "path"

  There is any solution, or I have to define the classpath into every
<javac> task?


Cèsar Ordiñana              _ ___  ___   ___ ___    
Enginyer I+D               (_) __|/ _ \ / __/ _ \ 
correu:  | \__ \ (_) | (_| (_) |
telèfon: +34 96 348 2894   |_|___/\___/ \___\___/

View raw message