How can you tell an ant build file to recursively add all files in the bin directory to a jarfile?
I have the following ant build file which is supposed to package all class files in the bin directory into a jarfile:
<?xml version="1.0" encoding="utf-8"?>
<project name="RemoteJunitXletServer.makejar" default="makejar" basedir=".">
<target name="makejar" description="Build a jarfile based on the JunitServer project">
<jar jarfile="JunitServer.jar" in开发者_高级运维cludes="**.class" basedir="bin" />
</target>
</project>
Unfortunately, including "**.class" only goes two directories deep, and does not copy any files that are deeper than two directories inside of the bin folder. Do these directories HAVE to be explicitly declared? Or is there a way to tell Ant to just copy all class files inside of the bin folder regardless of location while preserving the folder structure?
Try includes="**/**.class"
...
精彩评论