forked from aofeng/threadpool4j
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
121 lines (110 loc) · 4.73 KB
/
Copy pathbuild.xml
File metadata and controls
121 lines (110 loc) · 4.73 KB
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
109
110
111
112
113
114
115
116
117
118
119
120
121
<project name="threadpool4j" basedir="." default="all">
<property name="project.name" value="threadpool4j"></property>
<property name="project.version" value="3.1.0"></property>
<property name="package.name" value="${project.name}-${project.version}"></property>
<property name="author" value="NieYong"></property>
<property name="organization" value="cn.aofeng"></property>
<property name="project.url" value="https://github.com/aofeng/threadpool4jj"></property>
<property name="src.dir" value="${basedir}/src"></property>
<property name="lib.dir" value="${basedir}/lib"></property>
<property name="build.dir" value="${basedir}/temp"></property>
<property name="dist.dir" value="${basedir}/dist"></property>
<property name="src.test.dir" location="${basedir}/test" />
<property name="lib.test.dir" value="${basedir}/libtest"></property>
<property name="target.unit-test.dir" location="${build.dir}/unit-test" />
<property name="target.cover-test.dir" location="${build.dir}/cover-test" />
<property name="target.report.dir" location="${build.dir}/report" />
<property name="target.unit-test-report.dir" location="${target.report.dir}/unit-test" />
<property name="target.cover-test-report.dir" location="${target.report.dir}/cover-test" />
<path id="app.classpath">
<fileset dir="${lib.dir}">
<include name="**/*.jar" />
</fileset>
<path location="${basedir}/conf" />
</path>
<path id="app.test.classpath">
<fileset dir="${lib.test.dir}">
<include name="**/*.jar" />
</fileset>
<path location="${basedir}/test" />
</path>
<target name="clean">
<delete dir="${build.dir}"></delete>
<delete dir="${dist.dir}"></delete>
</target>
<target name="prepare">
<mkdir dir="${build.dir}" />
<mkdir dir="${build.dir}/${package.name}" />
<mkdir dir="${dist.dir}" />
</target>
<target name="compile">
<javac srcdir="${src.dir}" destdir="${build.dir}/${package.name}" debug="on" source="1.6" includeantruntime="on">
<classpath refid="app.classpath">
</classpath>
</javac>
</target>
<target name="jar">
<jar destfile="${dist.dir}/${package.name}.jar" basedir="${build.dir}/${package.name}">
<manifest>
<attribute name="Built-By" value="${author}" />
<attribute name="Implementation-Vendor-Id" value="${organization}" />
<attribute name="Implementation-Vendor" value="${project.url}" />
<attribute name="Implementation-Title" value="${project.name}" />
<attribute name="Implementation-Version" value="${project.version}" />
</manifest>
</jar>
</target>
<target name="jar-src">
<jar destfile="${dist.dir}/${package.name}-sources.jar" basedir="${src.dir}">
<manifest>
<attribute name="Built-By" value="${author}" />
<attribute name="Implementation-Vendor-Id" value="${organization}" />
<attribute name="Implementation-Vendor" value="${project.url}" />
<attribute name="Implementation-Title" value="${project.name}" />
<attribute name="Implementation-Version" value="${project.version}" />
</manifest>
</jar>
</target>
<target name="compile.test" depends="compile">
<mkdir dir="${target.unit-test.dir}" />
<javac srcdir="${src.test.dir}" destdir="${target.unit-test.dir}"
debug="on" source="1.6" includeantruntime="on">
<classpath refid="app.classpath"></classpath>
<classpath refid="app.test.classpath"></classpath>
<classpath location="${build.dir}/${package.name}"></classpath>
</javac>
<copy todir="${target.unit-test.dir}">
<fileset dir="${src.test.dir}">
<include name="**/*.properties" />
<include name="**/*.xml" />
</fileset>
</copy>
</target>
<target name="unit-test" depends="compile.test">
<mkdir dir="${target.unit-test-report.dir}" />
<junit printsummary="on" haltonerror="off" haltonfailure="off" fork="on">
<formatter type="plain" usefile="off"/>
<formatter type="xml" usefile="on" />
<batchtest todir="${target.unit-test-report.dir}">
<fileset dir="${target.unit-test.dir}">
<include name="**/*Test.class"/>
</fileset>
</batchtest>
<classpath refid="app.classpath"></classpath>
<classpath refid="app.test.classpath"></classpath>
<classpath path="${build.dir}/${package.name}"></classpath>
<classpath path="${target.unit-test.dir}"></classpath>
</junit>
</target>
<target name="unit-test-report" depends="unit-test">
<mkdir dir="${target.unit-test-report.dir}/html" />
<junitreport todir="${target.unit-test-report.dir}">
<fileset dir="${target.unit-test-report.dir}">
<include name="TEST-*.xml" />
</fileset>
<report todir="${target.unit-test-report.dir}/html" />
</junitreport>
</target>
<target name="all" depends="clean, prepare, compile, jar, jar-src">
</target>
</project>