forked from pentaho/data-access
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
160 lines (139 loc) · 6.76 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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
<project name="Data Access" basedir="." default="default" xmlns:ivy="antlib:org.apache.ivy.ant">
<!-- Import the subfloor-gwt.xml file which contains all the default tasks -->
<import file="build-res/subfloor-gwt.xml" />
<import file="build-res/common_build_compatibility.xml" />
<!-- Setup the classpath used for testing -->
<path id="test.classpath">
<fileset dir="${lib.dir}">
<include name="*.jar" />
</fileset>
<fileset dir="${devlib.dir}">
<include name="*" />
</fileset>
<fileset dir="${codegenlib.dir}">
<include name="*" />
</fileset>
<fileset dir="${testlib.dir}">
<include name="*.jar" />
</fileset>
<dirset dir="${classes.dir}" />
<dirset dir="${testclasses.dir}" />
</path>
<!-- Findbugs properties -->
<property name="findbugs.build.cache.dir"
value="${build.cache.dir}/findbugs"
description="Directory where the findbugs jars (and dependencies) is placed after it is auto-downloaded by the build" />
<property name="findbugs.zip"
value="${findbugs.build.cache.dir}/findbugs.zip"
description="Findbugs zip file that is downloaded" />
<property name="findbugs.version"
value="1.3.9"
description="version of findbugs to use" />
<property name="findbugs.url"
value="http://sourceforge.net/projects/findbugs/files/findbugs/${findbugs.version}/findbugs-${findbugs.version}.zip/download"
description="URL to download finbugs from" />
<property name="findbugs.output-dir"
value="${bin.dir}/reports/findbugs"
description="Folder to write the findbugs xml output file" />
<property name="findbugs.output-file"
value="${findbugs.output-dir}/findbugs.xml"
description="File to write the findbugs output" />
<property name="findbugs.home"
value="${findbugs.build.cache.dir}/findbugs-${findbugs.version}"
description="Where findbugs is installed to" />
<!--=======================================================================
continuous
Runs a typical continuous integration build including project dist, javadoc, test,
and coverage artifacts
====================================================================-->
<target name="continuous" depends="clean-all,resolve,dist,cobertura,publish"/>
<target name="install" description="Installs the plugin to your Pentaho BI Server">
<unzip src="${dist.dir}/${package.basename}.zip" dest="${pentaho.solutions.dir}/system" overwrite="true">
</unzip>
<!--copy todir="${pentaho.solutions.dir}">
<fileset dir="${basedir}/solutions/" />
</copy-->
</target>
<target name="install-jar" depends="jar" description="Installs the plugin to your Pentaho BI Server">
<copy file="${dist.dir}/${ivy.artifact.id}-${project.revision}.jar" todir="${pentaho.solutions.dir}/system/${package.root.dir}/lib" overwrite="true"/>
<!--copy todir="${pentaho.solutions.dir}">
<fileset dir="${basedir}/solutions/" />
</copy-->
</target>
<!-- override the subfloor assemble target to do special plug-in assembly -->
<target name="assemble" depends="gwt-compile,assemble.init">
<copy todir="${approot.stage.dir}/lib" overwrite="true">
<!-- fileset dir="${lib.dir}" excludes="pentaho-bi-platform-*.jar" / -->
<fileset file="${dist.dir}/${ivy.artifact.id}-${project.revision}.jar" />
<!--fileset file="${gwt.sdk.dir}/gwt-user*.jar" /-->
<fileset file="${codegenlib.dir}/pentaho-database-gwt-${dependency.pentaho-database.revision}.jar" />
<fileset file="${codegenlib.dir}/pentaho-modeler-${dependency.pentaho-modeler.revision}.jar" />
</copy>
<copy todir="${approot.stage.dir}" overwrite="true">
<fileset dir="${package.resdir}" />
</copy>
<copy todir="${approot.stage.dir}/lib">
<fileset file="${lib.dir}/flexjson*.jar" />
</copy>
<copy todir="${approot.stage.dir}/resources/gwt" overwrite="true">
<fileset dir="${gwt.output.dir}/DatasourceEditor">
<exclude name=".gwt-tmp/" />
<exclude name="*-aux/" />
<exclude name="WEB-INF/" />
</fileset>
</copy>
</target>
<!-- ===================================================================
findbugs.download-check
checks to see if findbugs is available or not
======================================================================== -->
<target name="findbugs.download-check" description="checks if files have already been downloaded">
<condition property="findbugs.exists">
<and>
<available file="${findbugs.build.cache.dir}" type="dir" />
<available file="${findbugs.home}" type="dir" />
<available classname="edu.umd.cs.findbugs.anttask.FindBugsTask">
<classpath>
<fileset dir="${findbugs.home}/lib">
<include name="findbugs-ant.jar"/>
</fileset>
</classpath>
</available>
</and>
</condition>
</target>
<!-- ===================================================================
findbugs.install
downloads and unzips findbugs from sourceforge.
ivy/maven resolution doesn't work well.
only a really old version of findbugs is available.
the findbugs ant task requires a "home" location of a findbugs install,
the ivy/maven artifacts aren't a complete install. So we download it
from sourceforge and unzip it in a known location.
======================================================================== -->
<target name="findbugs.install" description="download and install findbugs" depends="findbugs.download-check" unless="findbugs.exists">
<mkdir dir="${findbugs.build.cache.dir}" />
<get src="${findbugs.url}" dest="${findbugs.zip}" usetimestamp="true" />
<unzip src="${findbugs.zip}" dest="${findbugs.build.cache.dir}" />
<delete file="${findbugs.zip}" />
</target>
<!-- ===================================================================
findbugs
runs findbugs on the compiled project classes, generates an xml report
======================================================================== -->
<target name="findbugs" depends="findbugs.install,compile,findbugs.clean" description="executes findbugs">
<taskdef name="findbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask" classpath="${findbugs.home}/lib/findbugs-ant.jar" />
<mkdir dir="${findbugs.output-dir}"/>
<findbugs home="${findbugs.home}" output="xml" outputFile="${findbugs.output-file}">
<sourcePath path="${src.dir}" />
<class location="${bin.dir}" />
</findbugs>
</target>
<!-- ===================================================================
findbugs.clean
cleans up any previous findbugs reports
======================================================================== -->
<target name="findbugs.clean" description="cleans up any previous findbugs reports">
<delete dir="${findbugs.output-dir}"></delete>
</target>
</project>