forked from Xiaoying/BIRT
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBuildOdaUI.xml
271 lines (249 loc) · 9.09 KB
/
BuildOdaUI.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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
<?xml version="1.0"?>
<!--
*************************************************************************
* Copyright (c) 2004, 2005 Actuate Corporation.
* 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:
* Actuate Corporation - initial API and implementation
*
*************************************************************************
*
* Build.xml
*
* Build script for project org.eclipse.birt.report.data.oda.xml.ui
*
*
* The following are public targets callable by external users.
*
* "Clean" - Clean all objects created by this script. Individual project build script can not call this target;
* "Jar" - Compile source code and generate jars for this project.
* The compile dependency on other projects should be defined explicitly.
* eclipse.home should be passed in when Individual project build script call this target;
* the property of "failonerror" should be set true(default) when compiling source code
* "Export" - Export the project, for instance, jar files are copied to a designated folder.
* this task must be called after calling Jar task, so it needn't depend on Jar explicitly
*
* Usage:
* ant [any one or more of the public targets]
* -Declipse.home=<your eclipse home>
*
* Default target is "Jar".
*
*
* This script may also additional targets. These targets are private to this build script only.
*
*
*
* Notes:
* 1. classpath need to be set for junit.jar
* 2. This file now requires Ant 1.6
*
* Change History:
*
* 1. 04/15/2005: initial version
*
-->
<project name="JDBC DataSource UI" default="Jar" basedir=".">
<description>BIRT JDBC ML DataSource UI Plugin</description>
<!-- set global properties for this build -->
<!-- Public properties, used by public targets, top level build script
will pass on the value at runtime. Properties will have there default
value.
eclipse.home
utest.report.dir
javadoc.dir
plugin.version
-->
<property file="../birt-build.properties" />
<property name="dtp.home" location=".." />
<!-- ===== Default value for public properties ============= -->
<property name="module.name" value="org.eclipse.birt.report.data.oda.jdbc.ui"/>
<property name="export.dir" value="exports"/>
<property name="dir.bin" value="bin"/>
<property name="dir.src" value="src"/>
<property name="dir.utest" value="utest"/>
<property name="oda.jdbc.dir" location="../org.eclipse.birt.report.data.oda.jdbc"/>
<property name="oda.jdbc.jar" value="oda-jdbc.jar"/>
<property name="org.apache.commons.codec.dir" location="../org.apache.commons.codec"/>
<property name="oda.connectivity.ui.dir" location="../org.eclipse.datatools.connectivity.ui"/>
<property name="oda.connectivity.ui.jar" value="connectivityui.jar"/>
<property name="oda.designer.dir" location="../org.eclipse.datatools.connectivity.oda.design"/>
<property name="oda.designer.jar" value="odadesign.jar"/>
<property name="oda.designer.ui.dir" location="../org.eclipse.datatools.connectivity.oda.design.ui"/>
<property name="oda.designer.ui.jar" value="odadesignui.jar"/>
<property name="plugin.jar" value="jdbcui.jar"/>
<path id="class.path">
<pathelement path="${dir.bin}" />
<fileset dir="${oda.jdbc.dir}">
<include name="${oda.jdbc.jar}"/>
</fileset>
<!-- <fileset dir="${birt.core.dir}">
<include name="${birt.core.jar}"/>
</fileset>
<fileset dir="${oda.connectivity.ui.dir}">
<include name="${oda.connectivity.ui.jar}" />
</fileset>
<fileset dir="${oda.designer.dir}">
<include name="${oda.designer.jar}" />
</fileset>
<fileset dir="${oda.designer.ui.dir}">
<include name="${oda.designer.ui.jar}" />
</fileset>
--> <fileset dir="${org.apache.commons.codec.dir}">
<include name="*/*.jar"/>
</fileset>
<!-- dependend on eclipse due to Plugin class -->
<fileset dir="${eclipse.home}/plugins">
<include name="org.eclipse.core.runtime_*/runtime.jar"/>
<include name="org.eclipse.core.runtime*.jar"/>
<include name="org.eclipse.core.commands*.jar"/>
<include name="org.eclipse.osgi*.jar"/>
<include name="org.eclipse.equinox*.jar"/>
<include name="org.eclipse.emf*.jar"/>
<include name="org.eclipse.ui*.jar"/>
<include name="org.eclipse.jface*.jar"/>
<include name="org.eclipse.text*.jar"/>
<include name="org.eclipse.swt*.jar" />
<include name="org.eclipse.datatools.connectivity*.jar"/>
<include name="org.eclipse.datatools.connectivity*/*.jar"/>
<include name="com.ibm.icu*.jar"/>
</fileset>
</path>
<!-- Compile source code and generate jar for this project.
Input parameters:
eclipse.home
-->
<target name="Jar" depends="compileSource">
<jar destfile="${plugin.jar}">
<fileset dir="${dir.bin}">
<include name="**/*.class" />
<include name="**/*.txt" />
<include name="**/*.xml" />
<include name="**/*.def" />
<include name="**/*.properties" />
<exclude name="**/*Test.class" />
<include name="**/*.properties" />
<include name="**/*.gif"/>
</fileset>
</jar>
</target>
<!-- Export the project, for instance, jar files are copied to a designated folder
the dependency on Jar should implement in top level script by call sequence
Parameters:
- ${export.dir} target directory to put the plugin binaries
- ${plugin.version} the version of plugin exported
-->
<target name="Export">
<mkdir dir="${export.dir}" />
<property file="META-INF/MANIFEST.MF" />
<xmlproperty file="plugin.xml" collapseAttributes="true" />
<jar destfile="${export.dir}/${module.name}_${Bundle-Version}.jar" manifest="META-INF/MANIFEST.MF">
<fileset dir="${dir.bin}">
<include name="**/*.class" />
<include name="**/*.txt" />
<include name="**/*.xml" />
<include name="**/*.def" />
<include name="**/*.properties" />
<include name="**/*.gif"/>
<exclude name="**/*Test.class" />
</fileset>
<fileset dir=".">
<include name="plugin.xml" />
<include name="plugin*.properties" />
<include name="about.html" />
<include name=".options" />
<include name="META-INF/MANIFEST.MF" />
<include name="icons/*.*" />
</fileset>
</jar>
</target>
<target name="i18n">
<native2ascii
encoding="Cp1252"
src="."
dest="."
includes="plugin_de_DE.msg" ext=".properties"/>
<native2ascii
encoding="Cp1252"
src="."
dest="."
includes="plugin_es_ES.msg" ext=".properties"/>
<native2ascii
encoding="Cp1252"
src="."
dest="."
includes="plugin_fr_FR.msg" ext=".properties"/>
<native2ascii
encoding="GBK"
src="."
dest="."
includes="plugin_zh_CN.msg" ext=".properties"/>
<native2ascii
encoding="SJIS"
src="."
dest="."
includes="plugin_ja_JP.msg" ext=".properties"/>
<native2ascii
encoding="MS949"
src="."
dest="."
includes="plugin_ko_KR.msg" ext=".properties"/>
</target>
<!-- public task UnitTest will not explicitly depend on complie, Top level script should call compile before calling UnitTest -->
<!-- Run Unit test.
Parameters:
- ${utest.report.dir} target directory to put the unit test report
-->
<target name="UnitTest" description="run all the unit tests" />
<!-- Clean all objects created by this script -->
<target name="Clean" description="clean up">
<!-- Delete the ${dir.bin} and ${dir.utest} directory trees -->
<delete dir="${dir.bin}" />
<delete dir="${dir.utest}" />
<delete>
<fileset dir="." includes="*junit*" />
</delete>
<!-- Delete the target jar file -->
<delete file="${plugin.jar}" />
</target>
<target name="Javadoc" />
<target name="apiJavaDoc" />
<target name="buildDependency">
<echo message="start call Jar task in ${oda.jdbc.dir}"/>
<ant dir="${oda.jdbc.dir}" antfile="BuildOdaJdbc.xml" target="Jar" inheritAll="false">
<property name="eclipse.home" value="${eclipse.home}" />
</ant>
<echo message="end call Jar task in ${oda.jdbc.dir}"/>
<!-- <echo message="start call Jar task in ${oda.designer.ui.dir}"/>
<ant dir="${oda.designer.ui.dir}" antfile="build.xml" target="build.jars" inheritAll="false">
<property name="dtp.home" value="${dtp.home}"/>
</ant>
<echo message="end call Jar task in ${oda.designer.ui.dir}"/>
<echo message="start call Jar task in ${oda.designer.dir}"/>
<ant dir="${oda.designer.dir}" antfile="build.xml" target="build.jars" inheritAll="false">
<property name="dtp.home" value="${dtp.home}"/>
</ant>
<echo message="end call Jar task in ${oda.designer.dir}"/>
--> </target>
<target name="compileSource" depends="buildDependency" description="compile the source ">
<mkdir dir="${dir.bin}" />
<copy todir="${dir.bin}">
<fileset dir="${dir.src}">
<include name="**/*.properties"/>
<include name="**/*.gif"/>
</fileset>
</copy>
<!-- Compile the java code from ${dir.src} into ${dir.bin} -->
<javac srcdir="${dir.src}"
destdir="${dir.bin}"
encoding="utf-8"
source="1.4"
debug="true">
<classpath refid="class.path" />
</javac>
</target>
</project>