This repository was archived by the owner on Apr 9, 2021. It is now read-only.
Repository navigation
Expand file tree
/
Copy pathbuild.xml
More file actions
265 lines (229 loc) · 10.3 KB
/
Copy pathbuild.xml
File metadata and controls
265 lines (229 loc) · 10.3 KB
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
<project name="PSOToolkit7x" default="dist" basedir="." xmlns:ivy="antlib:org.apache.ivy.ant">
<description>PSO Toolkit for Percussion CMS</description>
<!-- =================================
Download and install Ivy2 from http://ant.apache.org/ivy
Modify your Ant runtime preferences in Eclipse to include the Ivy JARs
Setup your ivy-local.properties for your user / environment (see the sample file)
To build for the first time:
1) Run the ivy-retrieve target
2) In Project Properties, add all JARs in the ivylib folder.
3) Build (using the testbuild and dist targets)
4) Run the ivy-publish target
You should occasionally refresh (with ivy-retrieve) and
do ivy-publish each time a new build is released.
-->
<!-- set global properties for this build -->
<property environment="env"/>
<!-- base directory of Percussion CMS installation -->
<property name="percussion.home" location="${env.PERCUSSION_HOME}"/>
<!-- name of Percussion CMS Service -->
<property name="percussion.service" value="${env.PERCUSSION_SERVICE}"/>
<!-- name of our output jar -->
<property name="jarname" value="PSOToolkit-2018-01-26.jar" />
<!-- name of our distribution zip -->
<property name="distfile" value="PSOToolkit-2018-01-26.zip" />
<property name="testdistfile" value="PSOToolkit-2018-01-26-test.zip" />
<property name="percussion.deploy" value="${percussion.home}/AppServer/server/rx/deploy" />
<property name="percussion.rxapp" value="${percussion.deploy}/rxapp.ear/rxapp.war" />
<property name="percussion.rxpub" value="${percussion.deploy}/RxServices.war"/>
<property name="percussion.rxapp.lib" value="${percussion.rxapp}/WEB-INF/lib"/>
<property name="percussion.server.lib" value="${percussion.home}/AppServer/server/rx/lib" />
<property name="percussion.rxapp.spring-config"
value="${percussion.rxapp}/WEB-INF/config/user/spring" />
<property name="percussion.rxapp.WEB-INF" value="${percussion.rxapp}/WEB-INF" />
<!-- relative paths -->
<property name="src" location="src"/>
<property name="lib" location="lib"/>
<property name="bin" location="bin"/>
<property name="ivylib" location="ivylib" />
<property name="javadoc" location="javadoc" />
<property name="zipprefix" value="PSOToolkit-2018-01-26" />
<!-- used for running Windows commands -->
<property name="comspec" location="${env.ComSpec}"/>
<property name="cdrive" location="${env.USERPROFILE}"/>
<property name="vbox.vmname" value="RXBase_1" />
<condition property="ivy.lib.exists">
<available file="${ivylib}" type="dir"/>
</condition>
<!-- Percussion CMS classpath -->
<path id="rx.class.path">
<fileset dir="${ivylib}">
<include name="**.jar"/>
</fileset>
</path>
<target name="init">
<!-- Create the time stamp -->
<tstamp/>
</target>
<target name="ivy-clean" depends="ivy-configure">
<ivy:cleancache />
<delete dir="${ivylib}" />
<mkdir dir="${ivylib}" />
</target>
<target name="clean" description="clean up">
<delete dir="${bin}"/>
<mkdir dir="${bin}"/>
</target>
<target name="ivy-configure">
<ivy:settings />
</target>
<target name="ivy-resolve" depends="ivy-configure" >
<ivy:resolve conf="test,optional"/>
</target>
<target name="ivy-retrieve" depends="ivy-resolve">
<ivy:retrieve pattern="${ivylib}/[artifact].[ext]" type="jar" conf="test" />
</target>
<!-- report on dependencies -->
<target name="ivy-report" depends="ivy-resolve">
<ivy:report conf="test,optional" graph="false" />
</target>
<target name="ivy-publish" depends="ivy-resolve" >
<ivy:publish resolver="foo-shared-sftp" forcedeliver="true"
pubrevision="7.0" overwrite="true" >
<artifacts pattern="${lib}/[artifact]-[revision].[ext]" />
</ivy:publish>
</target>
<target name="init.ivy.lib" unless="ivy.lib.exists">
<antcall target="ivy-retrieve"/>
</target>
<target name="compile" depends="init.ivy.lib" description="compile the source ">
<!-- Compile the java code from ${src} into ${bin} -->
<javac includeantruntime="false" srcdir="${src}" destdir="${bin}" debug="true" target="1.5" source="1.5" classpathref="rx.class.path" />
<copy todir="${bin}">
<fileset dir="${src}">
<include name="**/*.xml"/>
<include name="**/*.properties" />
<include name="**/*.jpg" />
<include name="**/*.gif" />
<include name="**/*.png" />
</fileset>
</copy>
</target>
<target name="javadoc" depends="compile">
<mkdir dir="javadoc"/>
<javadoc destdir="javadoc" private="true" use="yes"
windowtitle="${ant.project.name}">
<packageset dir="${src}" defaultexcludes="yes">
<include name="com/percussion/**"/>
</packageset>
<classpath refid="rx.class.path"/>
<link href="http://java.sun.com/j2se/1.5.0/docs/api/"/>
<link href="http://java.sun.com/j2ee/1.4/docs/api/" />
<link href="http://static.springframework.org/spring/docs/2.0.x/api/" />
<link href="http://commons.apache.org/logging/javadocs/" />
</javadoc>
</target>
<target name="test" depends="compile" description="run unit tests">
<property name="build-test-results" location="${bin}/test-results" />
<delete dir="${build-test-results}" />
<mkdir dir="${build-test-results}" />
<junit printsummary="yes" haltonerror="yes">
<classpath>
<path location="${bin}" />
<path refid="rx.class.path" />
</classpath>
<formatter type="plain" />
<batchtest fork="yes" todir="${build-test-results}">
<fileset dir="${src}">
<include name="test/percussion/**/*Test.java" />
</fileset>
</batchtest>
</junit>
</target>
<target name="jarbuilder" depends="compile" description="just build the jar, no server">
<propertyfile file="${bin}/build.properties">
<entry key="build.number" value="${build.number}"/>
<entry key="build.date" type="date" pattern="EEEE MMM dd yyyy" value="now"/>
</propertyfile>
<jar jarfile="${lib}/${jarname}" basedir="${bin}">
<include name="com/percussion/pso/**"/>
<exclude name="log4j.properties" />
<include name="build.properties" />
<include name="readme.txt" />
</jar>
</target>
<target name="installExtensions">
<java classname="com.percussion.util.PSExtensionInstallTool" fork="true">
<arg value="${percussion.home}" />
<arg value="${basedir}" />
<classpath>
<fileset dir="${percussion.rxapp.lib}">
<include name="rxserver.jar"/>
<include name="rxclient.jar"/>
<include name="rxutils.jar" />
<include name="rxservices.jar" />
<include name="rxbusiness.jar" />
<include name="commons-lang*.jar"/>
<include name="commons-jexl*.jar"/>
<include name="jcr*.jar" />
<include name="commons-logging*.jar" />
<include name="commons-collections*.jar" />
<include name="commons-httpclient*.jar" />
</fileset>
<fileset dir="${percussion.home}/AppServer/lib/endorsed" >
<include name="xml-apis.jar" />
</fileset>
<fileset dir="${percussion.home}/AppServer/server/rx/lib">
<include name="javax.servlet.jar" />
<include name="commons-collections*.jar" />
</fileset>
</classpath>
</java>
</target>
<target name="testbuild" description="build for local test">
<echo>Stopping ${percussion.service}</echo>
<exec executable="net.exe" failonerror="false">
<arg line="stop ${percussion.service}"/>
<env key="COMSPEC" path="${comspec}"/>
</exec>
<property name="build.number" value="test build" />
<antcall target="jarbuilder"/>
<delete file="${percussion.home}/AppServer/server/rx/log/server.log" verbose="true" failonerror="false" />
<copy file="${lib}/${jarname}" todir="${percussion.rxapp.lib}" verbose="true" />
<copy todir="${percussion.rxapp.WEB-INF}" verbose="true" >
<fileset dir="WEB-INF" />
</copy>
<!--copy file="mybeans.xml" todir="${percussion.rxapp.spring-config}" verbose="true" / -->
<echo>waiting for shutdown...</echo>
<sleep seconds="5" />
<echo>Restarting ${percussion.service}</echo>
<exec executable="net.exe" failonerror="true">
<arg line="start ${percussion.service}"/>
<env key="COMSPEC" path="${comspec}"/>
</exec>
</target>
<target name="remotetest" description="Build for remote test">
<property name="build.number" value="test build" />
<antcall target="jarbuilder"/>
<zip destfile="${testdistfile}">
<zipfileset dir="${lib}" includes="${jarname}" prefix="${zipprefix}/lib" />
<zipfileset dir="." includes="readme.txt, build.number, deploy.xml" prefix="${zipprefix}" />
<zipfileset dir="." includes="install.sh" filemode="755" prefix="${zipprefix}" />
<zipfileset dir="." includes="license.txt, Extensions.xml, install.sh, Install.bat" prefix="${zipprefix}" />
<zipfileset dir="WEB-INF" prefix="${zipprefix}/WEB-INF" />
</zip>
</target>
<target name="dist" depends="init, clean, javadoc" description="generate the distribution">
<buildnumber/>
<antcall target="jarbuilder"/>
<zip destfile="${distfile}">
<zipfileset dir="${lib}" includes="${jarname}" prefix="${zipprefix}/lib" />
<zipfileset dir="." includes="readme.txt, deploy.xml, install.sh" prefix="${zipprefix}" />
<zipfileset dir="." includes="license.txt, Extensions.xml, Install.bat" prefix="${zipprefix}" />
<zipfileset dir="${bin}" includes="build.properties" prefix="${zipprefix}" />
<zipfileset dir="WEB-INF" prefix="${zipprefix}/WEB-INF" />
<zipfileset dir="${javadoc}" prefix="${zipprefix}/javadoc" />
<zipfileset dir="InstallDir" prefix="${zipprefix}/InstallDir" />
</zip>
</target>
<target name="testdeliver" depends="" description="generate the distribution">
<exec executable="VBoxManage" failifexecutionfails="false" >
<arg line="guestcontrol execute ${vbox.vmname} /bin/bash --arguments '/mnt/hostdata/PSOToolkit66/install.sh /home/percussion/PercussionCMS' --username percussion --password demo --verbose --wait-for stdout"/>
</exec>
</target>
<target name="stoppercussion" depends="" description="generate the distribution">
<exec executable="VBoxManage" failifexecutionfails="false" >
<arg line="guestcontrol execute ${vbox.vmname} /bin/bash --arguments '/home/percussion/PercussionCMS/bin/RhythmyxDaemon stop /home/percussion/PercussionCMS/' --username percussion --password demo --verbose --wait-for stdout"/>
</exec>
</target>
</project>