ant build.xml compile 编译 指定 jar
2013-10-11 13:51
295 查看
<?xml version="1.0" encoding="UTF-8" ?> <project name="HelloWorld" default="run" basedir="."> <property name="src" value="src"/> <property name="dest" value="classes"/> <property name="jar_name" value="helloWorld.jar"/> <property name="lib.dir" value="lib" /> <target name="init"> <mkdir dir="${dest}"/> </target> <path id="classpath"> <fileset file="${lib.dir}/*.jar" /> </path> <target name="compile" depends="init"> <javac srcdir="${src}" destdir="${dest}"> <!-- 这里指定依赖的lib库路径 --> <classpath refid="classpath" /> </javac> </target> <target name="build" depends="compile"> <jar jarfile="${jar_name}" basedir="${dest}"/> </target> <target name="run" depends="build"> <java classname="test.ant.HelloWorld" classpath="${hello_jar}"/> </target> <target name="clean"> <delete dir="${dest}" /> <delete file="${hello_jar}" /> </target> <target name="rerun" depends="clean,run"> <ant target="clean" /> <ant target="run" /> </target> </project>
相关文章推荐
- Ant编译打jar包 build.xml
- ANT-build.xml编译文件详解
- 实习杂记(23):build.xml进行ant编译的时候target的执行顺序
- 使用ANT编译build.xml
- Ant编译和部署工具build.xml的编写
- java ant 编译打包build.xml完整配置范例
- ant 全功能编译打包部署ftp启动服务的 build.xml
- ant 打可执行jar的build.xml
- java ant 编译打包build.xml完整配置范例
- ANT build.xml 编译出错Error running javac.exe compiler
- ant build.xml 打包应三方jar注意的问题与混淆R的写法
- java ant进行编译打包,build.xml文件编写
- ant打包jar的build.xml配置
- ant 编译android程序 执行build.xml文件到打包资源文件时候报错!提示找不到资源文件!
- Ant 编译、打包 build.xml 脚本模板
- 在eclipse中进行nutch1.7二次开发通过ant编译build.xml出现Class not found javac1.8
- AndroidSDK内置ANT编译build.xml
- ant 自动编译 build.xml 配置
- cocos2dx 编译错误 BUILD FAILEDG:\android\SDK\android-sdk-windows\tools\ant\build.xml:645: The following
- ANT编译文件build.xml的书写