2012-04-13 25 views
0

我必须做的build.xml文件,其创建罐子,每个战项目,耳朵文件的build.xml如何加载所有支持JAR在classpath中的Apache Ant的

调用这个build.xml中,我有一个做多个主build.xml文件

现在我已经配置哈德森

这个项目的问题,同时从哈德逊大厦项目,哈德森不能相对路径转换为绝对路径。

所以我希望做一些全局声明,并添加所有的jar路径和加载所有jar路径的build.xml的classpath中

<fileset dir="${class.dir}" includes="**/*.jar"/> 

<fileset dir="${AllJar.dir}" includes="**/*.jar"/> 

回答

0

,关键是要确定个人文件集的一些标识和定义master path with refid从链路

引用:

的路径状结构可以包括到其他路径状 结构的引用(路径是本身RESOUR CE集合)通过嵌套 元素:

<path id="base.path"> 
    <pathelement path="${classpath}"/> 
    <fileset dir="lib"> 
    <include name="**/*.jar"/> 
    </fileset> 
    <pathelement location="classes"/> 
</path> 

<path id="tests.path" cache="true"> 
    <path refid="base.path"/> 
    <pathelement location="testclasses"/> 
</path> 

在这种test.path包括base.path其进而包括$ {类路径}和从lib文件夹的所有JAR文件。

相关问题