forked from webcane/nebula.widgets.nattable
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
120 lines (106 loc) · 3.87 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
115
116
117
118
119
120
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--
Copyright (c) 2012 Original authors and others.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
http://www.eclipse.org/legal/epl-v10.html
Contributors:
Original authors and others - initial API and implementation
-->
<!--
Top level Ant build file for NatTable
The following properties must be present in ${user.home} directory. Alternatively they can
be specified on the command line (-DECLIPSE_HOME="dir"):
ECLIPSE_HOME: Location of eclipse install. SWT and other eclipse deps are picked up from the plugins dir
FINDBUGS_HOME: Location of the findbugs install.
Also see: common.xml
-->
<project>
<property name="build.tools.dir" value="deps/tools" />
<property name="reports.dir" value="reports" />
<property name="coverage.reports.dir" value="${reports.dir}/coverage" />
<!-- Setup emma task -->
<path id="emma.lib">
<pathelement location="${build.tools.dir}/emma.jar" />
<pathelement location="${build.tools.dir}/emma_ant.jar" />
</path>
<taskdef resource="emma_ant.properties" classpathref="emma.lib" />
<!-- Setup findbugs (static analysis) task -->
<property name="FINDBUGS_HOME" value="${user.home}/findbugs-1.3.9" />
<path id="findbugs.lib" location="${FINDBUGS_HOME}/lib/findbugs-ant.jar" />
<taskdef name="findbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask" classpathref="findbugs.lib"/>
<!--
Macro to run targets on all subprojects. The order of the build is important.
Dependencies must be built first.
Subprojects supply their own properties (in their repective build.xml files)
to tweak aspects of the build
-->
<macrodef name="iterate">
<attribute name="target" />
<sequential>
<subant target="@{target}">
<fileset file="org.eclipse.nebula.widgets.nattable.core/build.xml" />
</subant>
<subant target="@{target}">
<fileset file="org.eclipse.nebula.widgets.nattable.core.test/build.xml" />
</subant>
<subant target="@{target}">
<fileset file="org.eclipse.nebula.widgets.nattable.extension.glazedlists/build.xml"/>
</subant>
<subant target="@{target}">
<fileset file="org.eclipse.nebula.widgets.nattable.extension.glazedlists.test/build.xml"/>
</subant>
<subant target="@{target}">
<fileset file="org.eclipse.nebula.widgets.nattable.dataset/build.xml"/>
</subant>
<subant target="@{target}">
<fileset file="org.eclipse.nebula.widgets.nattable.extension.builder/build.xml"/>
</subant>
<subant target="@{target}">
<fileset file="org.eclipse.nebula.widgets.nattable.examples/build.xml"/>
</subant>
</sequential>
</macrodef>
<target name="clean">
<iterate target="clean" />
<delete dir="${reports.dir}" />
</target>
<!-- Compiles and build jars -->
<target name="build">
<iterate target="build" />
</target>
<!-- Runs unit tests.
Triggers report generation for JUnit and Emma
Triggers findbugs for static analysis
-->
<target name="test">
<iterate target="test" />
<antcall target="coverage.report"/>
</target>
<!--
Emma coverage report. Invoked at the end of the test run.
Note: This must be run at the top level, since it needs to aggregate test
coverage data.
-->
<target name="coverage.report">
<mkdir dir="${coverage.reports.dir}" />
<emma>
<report encoding="UTF-8">
<sourcepath>
<dirset dir="${basedir}">
<include name="**/src" />
</dirset>
</sourcepath>
<fileset dir="${basedir}">
<include name="**/*.emma" />
</fileset>
<xml outfile="${coverage.reports.dir}/coverage.xml" depth="method" />
<html outfile="${coverage.reports.dir}/coverage.html"
columns="name,line,method,class"
sort="+class, +line"
depth="method" />
</report>
</emma>
</target>
</project>