Dave
Dave

Reputation: 507

ant .svn is copied, source includes are ignored

  <target name="compile">
<javac destdir="${build.dir}/classes"
  classpathref="${build.classpath}"
  debug="on">
  <src path="${src.dir}"/>
  <include name="package1/**/*.java"/>
</javac>

Issues

  1. compile all java files under the source ${src.dir}, not only package1 but also other packages.
  2. the source dir is in the SVN checkout workspace, .svn is copied to the ${build.dir}/classes.

Thanks for help.

Upvotes: 0

Views: 122

Answers (1)

Jean Waghetti
Jean Waghetti

Reputation: 4727

You are telling javac only to compile sources in package1.

Remove this line:

<include name="package1/**/*.java"/>

The .svn directory contains files with .java extension. Add this to javac task:

<excludes name="**/.svn/**"/>

Your target code will be:

<target name="compile">
<javac destdir="${build.dir}/classes"
  classpathref="${build.classpath}"
  debug="on">
  <src path="${src.dir}"/>
  <excludes name="**/.svn/**"/>
</javac>
</target>

Upvotes: 3

Related Questions