This repository has been archived by the owner on Dec 10, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.xml
executable file
·140 lines (114 loc) · 4.44 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
<project name="BIRTReport" default="deploy" basedir="." xmlns:ivy="antlib:org.apache.ivy.ant">
<property file="build.properties" />
<description>
BIRT Report plugin build file
</description>
<tstamp prefix="start"/>
<!-- system properties to use -->
<property name="cr" value="${line.separator}"/>
<!-- set global properties for this build -->
<property name="src" location="src"/>
<property name="classes" location="classes"/>
<property name="lib" location="lib"/>
<property name="distrib" location="distrib"/>
<property name="libkettle" location="${deploy.dest}/lib"/>
<property name="libswt" location="${deploy.dest}/libswt"/>
<target name="init" depends="clean" description="create timestamp and directories">
<echo>Init...</echo>
<tstamp/>
<mkdir dir="${classes}"/>
<mkdir dir="${lib}"/>
<mkdir dir="${distrib}"/>
<mkdir dir="${distrib}/lib"/>
</target>
<!--
==========================
Compile the code
==========================
-->
<target name="compile" depends="init" description="compile the source " >
<echo>Compiling BIRT Report Plugin...</echo>
<javac srcdir="${src}"
destdir="${classes}"
includeantruntime="false" >
<classpath id="cpath">
<fileset dir="${birt.reportengine.dir}/lib" includes="*.jar"/>
<fileset dir="${libkettle}" includes="*.jar"/>
<fileset dir="${libswt}" includes="*.jar"/>
<fileset dir="${libswt}/win32/" includes="*.jar"/>
</classpath>
</javac>
</target>
<!-- ==========================
Copy additional files
==========================
-->
<target name="copy" depends="compile" description="copy images etc to classes directory" >
<echo>Copying images etc to classes directory...</echo>
<copy todir="${classes}">
<fileset
dir="${src}"
includes="**/*.png,**/*.xml,**/*.properties"/>
</copy>
</target>
<!--
==========================
library
==========================
-->
<target name="lib" depends="copy" description="generate the BIRT Report Plugin library BIRT-plugin.jar">
<echo>Generating the BIRT Report library BIRT-plugin.jar ...</echo>
<jar
jarfile="${lib}/BIRT-plugin.jar"
basedir="${classes}"
includes="**/*"/>
</target>
<!--
==========================
distrib for plugin
==========================
-->
<target name="distrib" depends="lib" description="Create the distribution package..." >
<echo>Copying libraries to distrib directory...</echo>
<copy todir="${distrib}"> <fileset file="${lib}/BIRT-plugin.jar"/> </copy>
<copy todir="${distrib}/resources"> <fileset file="${src}/bi/know/pentaho/birt/images/birt.png"/> </copy>
<copy todir="${distrib}/lib"><fileset dir="${birt.reportengine.dir}/lib" /></copy>
</target>
<!--
==========================
zip file for plugin
==========================
-->
<target name="zip" depends="distrib" description="generate the Pentaho Reporting Plugin zip archive">
<echo>Generating the BIRT Report library PentahoBIRTOutput.zip ...</echo>
<zip destfile="zip/PentahoBIRTOutput.zip" update="true">
<zipfileset dir="distrib" prefix="plugins/BIRTOutput"/>
<zipfileset dir="samples" prefix="samples/transformations" />
</zip>
</target>
<!--
==========================
Default target: all
==========================
-->
<target name="default" depends="zip" description="default = build all"/>
<!--
==========================
C L E A N
==========================
-->
<target name="clean" description="clean up generated files" >
<delete dir="${classes}"/>
<delete dir="${lib}"/>
<delete dir="${distrib}"/>
<delete dir="zip"/>
</target>
<target name="deploy" depends="distrib" >
<copy todir="${deploy.dest}/plugins/BIRTOutput" >
<fileset dir="distrib" />
</copy>
<copy todir="${deploy.dest}/samples/transformations" >
<fileset dir="samples" />
</copy>
</target>
</project>