You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Ralph Jocham <rj...@yahoo.com> on 2001/09/22 00:38:30 UTC
beginner problem
Hi I am trying to compile my whole class tree with
this ant file. But it does not exclude all test
folders. Usually each package contains one.
What is wrong? I also tried to use this script, it is
living above the top level package, to build parts of
the tree using the -find flag. It moves up the folder
structure, but then compiles from where it finds the
build file. Is this the correct behaviour??
TIA
Ralph
<project name="Test" default="compile" basedir=".">
<!-- set global properties for this build -->
<property file="L:/java/src/cp.properties"/>
<property name="src" value="."/>
<property name="build" value="L:/java/build"/>
<target name="compile">
<!-- Compile the java code from ${src} into
${build} -->
<javac srcdir="${src}"
destdir="${build}"
debug="on"
classpath="${my_classpath}">
<include name="*/**"/>
<include name="*.java"/>
<exclude name="test/**"/>
</javac>
</target>
</project>
Re: beginner problem
Posted by David Jencks <da...@directvinternet.com>.
I'm no ant expert, but yes this is correct behavior and you might try
<exclude name="**/test/**"/>
You might mean
<include name="**/*.java"/> also
david jencks
On 2001.09.21 18:38:30 -0400 Ralph Jocham wrote:
> Hi I am trying to compile my whole class tree with
> this ant file. But it does not exclude all test
> folders. Usually each package contains one.
> What is wrong? I also tried to use this script, it is
> living above the top level package, to build parts of
> the tree using the -find flag. It moves up the folder
> structure, but then compiles from where it finds the
> build file. Is this the correct behaviour??
>
> TIA
> Ralph
>
> <project name="Test" default="compile" basedir=".">
> <!-- set global properties for this build -->
> <property file="L:/java/src/cp.properties"/>
> <property name="src" value="."/>
> <property name="build" value="L:/java/build"/>
>
> <target name="compile">
> <!-- Compile the java code from ${src} into
> ${build} -->
> <javac srcdir="${src}"
> destdir="${build}"
> debug="on"
> classpath="${my_classpath}">
> <include name="*/**"/>
> <include name="*.java"/>
> <exclude name="test/**"/>
> </javac>
> </target>
> </project>
>
>
>