eclipse - When I compile this with Ant the exclude tag does not work -
this ant build.xml:
<target name = "build" depends="clean" description = "compile main source tree java files"> <mkdir dir = "${build.dir}"/> <javac destdir = "${build.dir}" source = "1.6" target = "1.6" debug = "true" deprecation = "false" optimize = "false" failonerror = "false" includeantruntime="true" > <src path = "${src.dir}"/> <include name="com/**/*" /> <exclude name="${src.dir}/com/cheom/db/dbmethodtest.java"/> <classpath refid = "master-classpath"/> </javac> </target>
and console output:
[javac] compiling 5 source files /users/josh/google drive/workdocs/jee/monitordbflow/classes [javac] /users/josh/google drive/workdocs/jee/monitordbflow/src/com/cheom/db/dbmethodtest.java:3: package org.junit not exist [javac] import static org.junit.assert.*; [javac] ^ [javac] /users/josh/google drive/workdocs/jee/monitordbflow/src/com/cheom/db/dbmethodtest.java:7: package org.junit not exist [javac] import org.junit.test; [javac] ^ [javac] /users/josh/google drive/workdocs/jee/monitordbflow/src/com/cheom/db/dbmethodtest.java:13: cannot find symbol [javac] symbol : class test [javac] location: class com.cheom.db.dbmethodtest [javac] @test [javac] ^ [javac] /users/josh/google drive/workdocs/jee/monitordbflow/src/com/cheom/db/dbmethodtest.java:3: package org.junit not exist [javac] import static org.junit.assert.*; [javac] ^ [javac] /users/josh/google drive/workdocs/jee/monitordbflow/src/com/cheom/db/dbmethodtest.java:7: package org.junit not exist [javac] import org.junit.test; [javac] ^ [javac] /users/josh/google drive/workdocs/jee/monitordbflow/src/com/cheom/db/dbmethodtest.java:13: cannot find symbol [javac] symbol : class test [javac] location: class com.cheom.db.dbmethodtest [javac] @test [javac] ^ [javac] 3 errors [javac] compile failed; see compiler error output details.
i want exclude dbmethodtest.java filem exclude tag not work. tried in eclipse ide , terminal ant version 1.9.4. there problem code?
there no junit jars in classpath.
-cp path or -classpath path specify find user class files, , (optionally) annotation processors , source files. class path overrides user class path in classpath environment variable. if neither classpath, -cp nor -classpath specified, user class path consists of current directory. see setting class path more details. javac doc