<pathelement path="${classpath}"/> <fileset dir="lib"> <include name="**/*.jar"/> </fileset> <pathelement location="classes"/> </classpath> 上面的例子构造了一个路径值包括:${classpath}的路径,跟着lib目录下的所有jar文件,接着是classes目录。 如果你想在多个task中使用相同的path-like stru...
如果你想在多个task中使用相同的path-like structure,你可以用<path>元素定义他们(与target同级),然后通过id属性引用--参考Referencs例子。 path-like structure可能包括对另一个path-like structurede的引用(通过嵌套<path>元素): <path id="base.path"> <pathelement path="${classpath}"/> <fileset dir="li...
<path id="classpath"> <fileset dir="lib"> <include name="/*.jar"/> </fileset> </path> <target name="compile"> <mkdir dir="${build.dir}"/> <javac srcdir="${src.dir}" destdir="${build.dir}" classpathref="classpath"/> </target> 自定义任务 如果内置任务不能满足你的需求,...
如果你需要一遍遍的复制相同的XML代码块,这一属性就很有用--如多次使用<classpath>结构。 下面的例子: <project ... > <target ... > <rmic ...> <classpath> <pathelement location="lib/"/> <pathelement path="${java.class.path}/"/> <pathelement path="${additional.path}"/> </classpath...
1). 安装jdk,设置JAVA_HOME ,PATH ,CLASS_PATH 2). 下载ant 地址http://www.apache.org/ 3). 设置ANT_HOME, PATH中添加ANT_HOME目录下的bin目录 4). 测试验证,开始-->运行-->cmd进入命令行-->键入 ant -v 二、目录说明 bin--是ant的程序运行入口,如果没有配置ANT_HOME的情况下,可以通过bin目录中...
"/></path><target name="init"><mkdir dir="build"/></target><target name="compile"depends="init"><javac srcdir="src"destdir="build"><classpath refid="classpath"/></javac></target><target name="test"depends="compile"><junit printsummary="yes"><classpath refid="classpath"/><...
用于编译java文件,一般形式如下:<javac srcdir="src" destdir="class" [classpath=" "]/>srcdir是编译此文件夹下或子文件夹下的全部java文件; destdir是编译后的class文件放置路径; classpath指定第三方类库; <java> 运行java类,一般形式如下: 代码语言:javascript ...
2、 设置 name 和 refid 属性值,比如: <property name="srcpath" refid="dao.compile.classpath"/> ,其中dao.compile.classpath 在别的地方定义。 3 、设置 name 和 location 属性值,比如: <property name="srcdir" location="src"/> ,即将 srcdir 的值设 置为:当前项目根目录的 /src 目录。
<target name="setClassPath"> PATH标签用于逻辑捆绑所有位于公共位置的文件 <path id="classpath_jars"> pathelement标签将设置存储所有文件的公共位置根目录的路径 <pathelement path="${basedir}/"/> pathConvert标签,用于将path标签内所有公共文件的路径转换为系统的类路径格式 ...
-debug print debugging information -emacs produce logging information without adornments -logfile file use given file for log output -logger classname the class that is to perform logging -listener classname add an instance of class as a project listener ...