开发者

ANT fileset includes in all filesystem

I want to create a fileset that contains the jdk classpath. The problem is that fileset is composed with files in all of the filesystem, not in a specific directory.

For example:

jdk.classpath.includes = ${jdk.home}/lib/**/*.jar, \
                         ${jdk.home}/../Classes/**/*.jar, \
                         /Library/Java/Extensions/**开发者_开发知识库/*.jar, \
                         /System/Library/Java/Support/Deploy.bundle/Contents/Resources/Java/**/*.jar

So, when i create the fileset i need to do not specify the dir, or to specify the filesystem root directory, like:

<fileset dir="INeedFileSystemRootDirectory" includes="${jdk.classpath.includes}"/>

How can this be accomplished? (I didn't find a built-in property to get the filesystem root)

Thanks.


You can make your fileset be composed of many tags, each with a different path:

example:

  <fileset dir="${INeedFileSystemRootDirectory}">
    <include name="${jdk.home}/lib/**/*.jar"/>
    <include name="${jdk.home}/../Classes/**/*.jar"/>
     ...
  </fileset>

Documentation and more examples here.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜