forked from ruyaoyao/paoding-analysis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
108 lines (92 loc) · 3.5 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<?xml version="1.0" encoding="UTF-8"?>
<project name="paoding-analysis" default="default" basedir=".">
<description>Builds, tests, and runs the project ndetl.</description>
<property environment="env"/>
<property name="version" value="2.0.4"/>
<property name="project" value="paoding-analysis"/>
<property name="package" value="paoding"/>
<property name="domain" value="net"/>
<property name="author" value="LinLangyi, ZhenQin"/>
<property name="vendor" value="ZhenQin"/>
<property name="src.dir" location="src/main/java"/>
<property name="build.dir" location="target/ant/clesses" />
<property name="dist.dir" location="target/dist"/>
<property name="config.dir" location="src/main/resources" />
<property name="doc.dir" location="target/ant/javadoc"/>
<property name="web.root" location="./" />
<property name="lib.dir" location="target/dependency"/>
<property name="test.dir" location="src/test/java"/>
<path id="classpath">
<fileset dir="${lib.dir}" includes="**/*.jar"/>
</path>
<target name="makedir" description="建立文件夹">
<mkdir dir="${dist.dir}"/>
<mkdir dir="${build.dir}"/>
<mkdir dir="${lib.dir}"/>
<mkdir dir="${web.root}/META-INF" />
</target>
<target name="compile" depends="makedir" description="编译代码">
<!-- 编译所有的代码,Server and client -->
<javac srcdir="${src.dir}"
destdir="${build.dir}"
encoding="UTF-8"
includeantruntime="no"
excludes="**/test/*,**/test/bean/*,**/*.svn,*.svn"
includes="**/*.java"
source="1.6"
target="1.6"
deprecation="true"
failonerror="true"
debug="true">
<classpath refid="classpath" />
</javac>
<!-- 把所有文件copy到build目录 -->
<copy todir="${build.dir}">
<fileset dir="${src.dir}" includes="**/*" excludes="**/*.java" />
</copy>
<copy todir="${build.dir}">
<fileset dir="${config.dir}" includes="**/*"/>
</copy>
</target>
<!--生成Javadoc 文档 -->
<target name="javadoc" description="生成Javadoc文档.">
<delete dir="${doc.dir}"/>
<mkdir dir="${doc.dir}"/>
<javadoc destdir="${doc.dir}" windowtitle="${project} ${version} Javadoc" use="yes"
linksource="no"
splitindex="yes"
encoding="UTF-8"
docencoding="GBK"
locale="zh_CN">
<classpath refid="classpath"/>
<packageset dir="${src.dir}" defaultexcludes="yes">
<include name="${domain}/${package}/**"/>
</packageset>
</javadoc>
</target>
<target name="package" depends="compile" description="打包成Jar" >
<mkdir dir="${dist.dir}/${version}" />
<tstamp>
<format property="TODAY" pattern="yyyy-MM-dd HH:mm:ss"/>
<format property="TIME" pattern="yyMMddHHmm"/>
</tstamp>
<manifest file="${web.root}/META-INF/MANIFEST.MF">
<attribute name="Created-By" value="${author}"/>
<attribute name="Built-Date" value="${TODAY}"/>
<attribute name="Implementation-Title" value="${project}"/>
<attribute name="Implementation-Version" value="${version}"/>
<attribute name="Implementation-Vendor" value="${vendor}"/>
</manifest>
<!-- 打包所有的编译文件 -->
<jar jarfile="${dist.dir}/${version}/${project}-${version}.v${TIME}.jar"
basedir="${build.dir}" manifest="${web.root}/META-INF/MANIFEST.MF">
</jar>
</target>
<target name="destory" description="最后的清理" >
<delete includeemptydirs="true">
<fileset dir="${build.dir}" includes="**/*" />
</delete>
</target>
<target name="default" depends="package, destory">
</target>
</project>