<?xml version="1.0" encoding="utf-8" ?> <project default="all" basedir="."> <property environment="env" /> <property name="appname" value="virt" /> <property name="jarname" value="yoyo-virt" /> <property name="mainclass" value="com.yoyosys.virt.navigation.service.SystemResourceMonitor" /> <property name="src" value="src" /> <property name="conf" value="conf" /> <property name="build" value="${basedir}/build" /> <property name="build.src" value="${build}/src" /> <property name="build.class" value="${build}/class" /> <property name="build.doc" value="${build}/doc" /> <property name="debug" value="off" /> <property name="optimize" value="on" /> <property name="deprecation" value="on" /> <property name="packages" value="com.yoyosys.virt.*" /> <path id="classpath"> <fileset dir="./WebContent/WEB-INF/lib"> <include name="*.jar" /> </fileset> <fileset dir="./lib"> <include name="*.jar" /> </fileset> </path> <target name="all" depends="init,build,jar" description="make all task." /> <target name="init" depends="clean"> <mkdir dir="${build}" /> <mkdir dir="${build.src}" /> <mkdir dir="${build.class}" /> <mkdir dir="${build.doc}" /> <copy todir="${build.src}"> <fileset dir="${src}" /> <fileset dir="${conf}" /> </copy> </target> <target name="build" depends="init"> <javac srcdir="${build.src}" destdir="${build.class}" encoding="UTF-8" debug="${debug}" optimize="${optimize}" deprecation="${deprecation}" includeantruntime="on"> <include name="com/**/*.java" /> <classpath refid="classpath" /> </javac> <copy todir="${build.class}"> <fileset dir="${build.src}"> <include name="handlers/*" /> <include name="rdb/*" /> </fileset> </copy> </target> <target name="javadoc" depends="init"> <javadoc packagenames="${packages}" sourcepath="${build.src}" destdir="${build.doc}" author="true" version="true" use="true" splitindex="true" windowtitle="${appname} API" doctitle="${appname}" charset="UTF-8" encoding="UTF-8" docencoding="UTF-8"> <classpath refid="classpath" /> </javadoc> </target> <target name="jar" depends="build"> <pathconvert property="libs.project" pathsep=" "> <mapper> <chainedmapper> <!-- remove absolute path --> <flattenmapper /> <!-- add lib/ prefix --> <globmapper from="*" to="lib/*" /> </chainedmapper> </mapper> <path refid="classpath" /> </pathconvert> <jar jarfile="${build}/${jarname}.jar" basedir="${build.class}" includes="**"> <manifest> <attribute name="Main-Class" value="${mainclass}" /> <attribute name="Class-Path" value="${libs.project}" /> </manifest> </jar> <jar jarfile="${build}/${jarname}-doc.jar" basedir="${build.doc}" includes="**" /> <jar jarfile="${build}/${jarname}-src.jar" basedir="${build.src}" includes="**" /> </target> <target name="clean" description="clean up"> <delete dir="${build}" /> </target> <!-- checkstyle --> <property name="checkstyle-5.3.home" value="${env.YOYO_SVN_HOME}/app/java/checkstyle/checkstyle-5.3" /> <fileset id="checkstyle-5.3.jar" dir="${checkstyle-5.3.home}"> <include name="checkstyle-5.3-all.jar" /> </fileset> <property name="checkstyle-latest.home" value="${checkstyle-5.3.home}" /> <fileset id="checkstyle-latest.jar" refid="checkstyle-5.3.jar" /> <taskdef resource="checkstyletask.properties" classpath="${checkstyle-5.3.home}/checkstyle-5.3-all.jar" /> <target name="checkstyle" depends="build"> <checkstyle config="${env.YOYO_SVN_HOME}/app/java/checkstyle/checkstyle.xml" failOnViolation="false"> <fileset dir="${build.src}/com/yoyosys/virt"> <include name="**/*.java" /> </fileset> <formatter type="plain" /> <formatter type="xml" toFile="${build}/checkstyle_report.xml" /> </checkstyle> <xslt in="${build}/checkstyle_report.xml" out="${build}/checkstyle_report.html" style="${basedir}/checkstyle-noframes-severity-sorted.xsl" /> <delete file="${build}/checkstyle_report.xml" /> </target> <!-- findbugs --> <property name="findbugs.home" value="${env.YOYO_SVN_HOME}/app/java/findbugs/findbugs-2.0.0" /> <path id="findbugs-jar"> <pathelement path="${findbugs.home}/lib/findbugs-ant.jar" /> </path> <taskdef name="findbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask" classpathref="findbugs-jar" /> <target name="findbugs" depends="build"> <findbugs home="${findbugs.home}" jvmargs="-server -Xss512m -Xmx1024m" output="xml:withMessages" outputFile="${build}/findbugs_report.xml" excludefilter="${basedir}/findbugs_exclude.xml" auxClasspathRef="classpath"> <sourcePath path="${build.src}" /> <class location="${build.class}" /> </findbugs> <xslt in="${build}/findbugs_report.xml" out="${build}/findbugs_report.html" style="${basedir}/findbugs-fancy-hist.xsl" /> <delete file="${build}/findbugs_report.xml" /> </target> </project>
详细解决方案
ant build.xml示范
热度:859 发布时间:2013-12-21 20:16:01.0
相关解决方案
- eclipse 提醒 configure build path
- myeclipse5.5建立J2ME项目的时候提示“errors during build”异常
- \nbproject\build-impl.xml:332: Preverification failed with error code 1. 异常
- 请问ant build.xml中怎么把properties文件打入jar包
- Build path specifies execution environment J2SE-1.4 异常
- VS, build 与 publish有什么区别?解决办法
- 共享一个自己重写的Serv-U(build 6.4.0.2版)帐好管理类。该怎么处理
- 项目“H:\Program Files\Microsoft\PetShop\Pre-Build\Pre-Build.vcproj”所需的应用程序未安装。确保已解决思路
- 急Unset build parameters for Deb_S60_30_WINSCW异常
- Vista+Visual Studio.net 2003+Symbian SDK9.2,输入abld build wins udeb命令出现异常
- 新手请问:abld build wins udeb后出现异常
- ubuntu9.04上安装mic2 出错 (python setup.py build)
- ubuntu9.04下安装mic2 出错 (python setup.py build),该如何解决
- 如何在bat中对New Build Window Wizard进行设置
- ejbca ant bootstrap 构建失败(BUILD FAILED),该怎么处理
- build.xml
- build.xml
- build.xml
- 急急急................emf build 2.1.0在哪里下呀
- 『求助』Build pcsl and midp on phoneme advance MR2 error!
- 404 File Not Found Host by NetBox Version 2.8 Build 4128 如何解决
- PHP新手问:build path与include path什么区别?该怎么处理
- 施用spm build 批量打包压缩seajs 代码
- How to build your own sub-theme (七.x-3.x)
- 解决 MyEclipse build workspace 慢,validation javascript 更慢的有关问题
- ant build.xml示范
- eclipse 揭示 configure build path
- eclipse 提示 configure build path解决办法
- Build path entry is missing: frameworkv2.00.006解决方案
- eclipse 提示 configure build path,该怎么解决