1 Star 0 Fork 0

beeagle/tigase-utils

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
build.xml 5.44 KB
一键复制 编辑 原始数据 按行查看 历史
Andrzej Wójcik 提交于 2017-10-29 13:23 . #2750: code reformat
<project name="tigase-utils" default="jar" basedir=".">
<property file="build.properties"/>
<import file="ant-definitions.xml"/>
<taskdef resource="net/sf/antcontrib/antlib.xml"/>
<!-- <taskdef name="pmd" classname="net.sourceforge.pmd.ant.PMDTask"/> -->
<!-- Global properties for this build -->
<property name="cvs-package" value="${projectname}"/>
<target name="prepare" description="Prepare build structures">
<tstamp/>
</target>
<target name="prepare-dist" description="Calculate build version">
<!-- Get revision number -->
<exec executable="svnversion">
<redirector outputproperty="build-no" errorproperty="error-property">
<outputfilterchain>
<tokenfilter>
<containsregex
pattern="[^0-9]*([0-9]+).*" replace="\1"/>
</tokenfilter>
</outputfilterchain>
</redirector>
</exec>
<property name="version" value="${ver}-b${build-no}"/>
<property name="dist" value="dist/${projectname}-${jarfile}-${version}"/>
</target>
<target name="prepare-dev" description="Create development version">
<!-- Get revision number -->
<property name="build-no" value="DEV"/>
<property name="version" value="${ver}-b${build-no}"/>
<property name="dist" value="dist/${projectname}-${jarfile}-${version}"/>
</target>
<target name="jar-file" description="Create jar file, called from other targets">
<compile srcdir="${src}"
xlint="-Xlint:all"/>
<jarfile
filename="${projectname}-${jarfile}"
excludes="**/*TestCase*.*,TestAll.*"/>
</target>
<target name="jar" depends="prepare,prepare-dev,jar-file"
description="Build jar file for ${projectname} ${jarfile}">
</target>
<target name="jar-dist" depends="prepare,prepare-dist,jar-file"
description="Build jar file for ${projectname} ${jarfile}">
</target>
<target name="jar-unittests" depends="prepare"
description="Prepare jar file with all classes including unittests classes">
<delete dir="${build}"/>
<compile
srcdir="${src}:${unittests}"
deprecation="on"
xlint="-Xlint:all"/>
<jarfile filename="unittests-${projectname}-${jarfile}"/>
<unitgen input="${src}" output="${unittests}" update="true">
<classpath>
<pathelement location="${jars}/unittests-${projectname}-${jarfile}.jar"/>
<fileset dir="${libs}">
<include name="**/*.jar"/>
</fileset>
</classpath>
</unitgen>
</target>
<target name="jar-all" depends="clean,prepare,jar,jar-unittests"
description="Builds all jar for the project.">
</target>
<target name="docs" depends="prepare"
description="Make Server javadoc">
<docs packages="${javadoc-package}"
destdir="docs-${projectname}-${jarfile}"/>
</target>
<target name="dist"
depends="clean-all,prepare-dist,jar-dist,docs"
description="Create ${projectname} ${jarfile} binary distribution file">
<distbin packagename="${projectname}-${jarfile}"
docsdir="docs-${projectname}-${jarfile}"/>
</target>
<target name="dist-src" depends="prepare,prepare-dist"
description="Create distribution package with all source files">
<distsrc packagename="${projectname}-${jarfile}" cvsroot="${svnroot}"
cvspackage="${cvspackage}"/>
</target>
<!--
<target name="pmd">
<pmd rulesetfiles="rulesets/imports.xml">
<formatter type="html" toFile="pmd_report.html"/>
<fileset dir="${src}">
<include name="**/*.java"/>
</fileset>
</pmd>
</target>
-->
<target name="run-unittests" depends="prepare,jar-unittests"
description="Run all JUnit tests for built package">
<mkdir dir="${reports}"/>
<junit printsummary="yes" haltonfailure="no">
<classpath>
<pathelement location="${jars}/unittests-${projectname}-${jarfile}.jar"/>
<fileset dir="${libs}">
<include name="**/*.jar"/>
</fileset>
</classpath>
<batchtest fork="yes" todir="${reports}">
<formatter type="xml"/>
<fileset dir="${build}">
<include name="**/*TestCase.class"/>
<exclude name="**/TestAll.class"/>
</fileset>
</batchtest>
</junit>
<junitreport>
<fileset dir="${reports}">
<include name="TEST-*.xml"/>
</fileset>
<report format="noframes"/>
</junitreport>
</target>
<target name="clean" description="Clean build directories">
<delete dir="${build}"/>
</target>
<target name="clean-all" depends="clean" description="Clean all extra files">
<delete file="sample-junit-target.xml"/>
<delete dir="${jars}"/>
<delete dir="dist"/>
<delete dir="docs-${jarfile}"/>
<delete dir="target"/>
<delete>
<fileset dir="." includes="*.log"/>
<fileset dir="." includes="*.lck"/>
<fileset dir="." includes="*.cache"/>
</delete>
</target>
</project>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/beeagle/tigase-utils.git
git@gitee.com:beeagle/tigase-utils.git
beeagle
tigase-utils
tigase-utils
master

搜索帮助