You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Christof Schablinski <sc...@danet.de> on 2001/08/13 16:19:29 UTC

Subpackage build script compiles java-sources in sibling-package

Hi,

I'm calling Ant with the following build-file in a subpackage directory.
Ant echos the number of files in the subpackage that must be recompiled,
but first starts to compile java sources in a sibling package.
How can I prevent Ant from checking the sibling packages?

<project name="client-package" default="compile">

  <property environment="ENV" />
  <property name="builddir"
            value="${ENV.PROJDIR}/Team/${ENV.USER}/program/classes" />
  <property name="srcdir"
            value="${ENV.PROJDIR}/Team/${ENV.USER}/program/java" />
  <property name="package" value="com/dcag/spb/client/mainwindow" /> 


  <target name="init">
     <mkdir dir="${builddir}" />
  </target>

  <target name="clean">
     <delete dir="${builddir}/${package}" />
  </target>

  <path id="classpath.project">
     <pathelement location="${builddir}" />
     <pathelement location="${builddir}/../lib/jh.jar" />
  </path>
 
  <target name="compile" depends="init">
    <javac srcdir="${srcdir}" destdir="${builddir}" >
       <classpath refid="classpath.project" />
       <patternset excludes="${srcdir}/com/dcag/spb/client/**/*.java"/>
       <patternset includesfile="includes.ant" />
    </javac>
  </target>
</project>