我的build.xml中有以下内容:
<target name="compile.baz" depends="init">
<javac destdir="${build.dir}/classes" debug="on">
<compilerarg value="-Xlint:deprecation"/>
<src>
<pathelement location="${src.dir}/com/foo/bar/baz/" />
<pathelement location="${src.dir}/com/foo/bar/quux/" />
<!-- Need to exclude ${src.dir}/com/foo/bar/quux/dontwant/ -->
</src>
<classpath refid="classpath.jars" />
</javac>
...
</target>
这基本上就是我想要的,除了(正如评论所说的)我不想把文件放在
此任务将编译${src.dir}/com/foo/bar/quux/dontwant/
(但我确实希望在此任务中编译${src.dir}/com/foo/bar/quux/
下的所有其他内容)。
我看到有几个地方说有各种各样的exclude/excludes元素/属性,但我能想到的每一种变化要么没有效果,要么导致错误,比如"blah不支持'exclude‘属性“。
https://stackoverflow.com/questions/3145968
复制相似问题