This repository has been archived by the owner on Oct 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 185
/
build.xml
executable file
·114 lines (88 loc) · 3.99 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
109
110
111
112
113
114
<project name="reportng"
xmlns:uncommons="antlib:org.uncommons.antlib"
default="dist"
basedir=".">
<description>Reporting plug-in for TestNG.</description>
<!-- ==================================================================
GLOBAL BUILD PROPERTIES
=================================================================== -->
<!-- Project-global locations. -->
<property name="conf.dir" value="etc" />
<property name="lib.dir" value="lib" />
<property name="dist.dir" value="dist" />
<property name="docs.dir" value="docs" />
<property name="release.dir" value="release" />
<property name="temp.dir" value="temp" />
<!-- Classpath for compilation and tests. -->
<path id="tool.path">
<fileset dir="${lib.dir}" includes="**/*.jar" />
</path>
<taskdef uri="antlib:org.uncommons.antlib"
resource="org/uncommons/antlib/antlib.xml"
classpathref="tool.path"/>
<property name="version" value="1.1.5"/>
<property name="artifact.identifier" value="reportng-${version}"/>
<!-- This is the minimum coverage percentage (for both lines and
branches) that will be tolerated. This is used to prevent
regressions in coverage. The threshold will be raised as
test coverage improves. -->
<property name="minimum.coverage" value="40" />
<!-- ==================================================================
TARGETS FOR BUILDING THE SOFTWARE
=================================================================== -->
<!-- Builds everything from scratch. -->
<target name="all" depends="clean, dist" description="Builds everything, excluding docs, from scratch."/>
<!-- Deletes all directories and files created by the build process. -->
<target name="clean" description="Remove all files created by the build process." >
<delete dir="${docs.dir}" />
<delete dir="${dist.dir}" />
<delete dir="${release.dir}" />
<delete dir="${temp.dir}" />
<uncommons:clean module="reportng" />
</target>
<!-- Build all Java code. -->
<target name="compile" description="Compile the source." >
<uncommons:compile module="reportng" />
</target>
<!-- Build application JAR files. -->
<target name="jar" depends="compile" description="Create the application JAR files.">
<uncommons:jar module="reportng"
jarfile="${artifact.identifier}.jar"
classpath="velocity-dep-1.4.jar" />
</target>
<!-- Copy all necessary files to deployment directory. -->
<target name="dist" depends="jar" description="Generate the deployment tree." >
<uncommons:dist libdir="" />
</target>
<!-- Create the release artifacts. -->
<target name="release"
depends="clean, dist"
description="Creates the release archives.">
<uncommons:release name="${artifact.identifier}">
<additionalcontents>
<tarfileset dir="reportng/${src.dir}/css" prefix="${artifact.identifier}/stylesheets" includes="*.css" />
</additionalcontents>
</uncommons:release>
</target>
<target name="test" depends="jar" description="Run the unit tests.">
<uncommons:test suites="${conf.dir}/testng.xml"
title="ReportNG Unit Test Report"
mincoverage="${minimum.coverage}" />
</target>
<!-- Generate a sample report. -->
<target name="sample" depends="jar" description="Generate a sample test report.">
<uncommons:test suites="${conf.dir}/sample-testng.xml, ${conf.dir}/sample2-testng.xml"
reportdir="${docs.dir}/sample"
title="ReportNG Sample Report"
dialect="JUnit"
mincoverage="0" />
<!-- Generate an HTML report from the JUnit XML. -->
<mkdir dir="${docs.dir}/sample/xslt" />
<junitreport todir="${docs.dir}/sample/xslt">
<fileset dir="${docs.dir}/sample/xml">
<include name="*.xml"/>
</fileset>
<report format="frames" todir="${docs.dir}/sample/xslt"/>
</junitreport>
</target>
</project>