开发者

How can I exclude my tests package from source folder in an ant build file?

开发者 https://www.devze.com 2022-12-31 18:04 出处:网络
I have the following declaration in my build.xml file, in my 开发者_StackOverflow中文版src folder I have my test package which I don\'t want to include into my process. How can I force scrdir to read

I have the following declaration in my build.xml file, in my 开发者_StackOverflow中文版src folder I have my test package which I don't want to include into my process. How can I force scrdir to read everything from ${src.dir} except test package?

<target name="compile">  
    <javac srcdir="${src.dir}" destdir="${classes.dir}"/>
</target>


http://ant.apache.org/manual/Tasks/javac.html

<target name="compile">   
    <javac srcdir="${src.dir}" destdir="${classes.dir}"
           excludes="mypackage/p1/testpackage/**"/>

</target> 


javac has excludes attribute where you can exclude the packages.

0

精彩评论

暂无评论...
验证码 换一张
取 消