This repository has been archived by the owner on Jun 1, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
deploy.xml
151 lines (135 loc) · 6.02 KB
/
deploy.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
<project name="PSO Image Editor Deploy" default="dist" basedir=".">
<description>
Install extensions on a Percussion server
The RHYTHMYX_HOME environment variable must be set
</description>
<property environment="env"/>
<!-- base directory of Rhythmyx installation -->
<property name="rhythmyx.home" location="${env.RHYTHMYX_HOME}"/>
<property name="rhythmyx.WEB-INF" value="${rhythmyx.home}/AppServer/server/rx/deploy/rxapp.ear/rxapp.war/WEB-INF"/>
<property name="rhythmyx.rx_resources" value="${rhythmyx.home}/rx_resources" />
<property name="rhythmyx.lib" value="${rhythmyx.WEB-INF}/lib"/>
<property name="rhythmyx.spring" value="${rhythmyx.WEB-INF}/config/user/spring" />
<property name="rx.lib" value="${rhythmyx.home}/AppServer/server/rx/lib" />
<!-- Jetty Properties -->
<property name="jetty.home" value="${rhythmyx.home}/jetty"/>
<property name="jetty.base" value="${rhythmyx.home}/jetty/base"/>
<property name="jetty.webapp" value="${rhythmyx.home}/jetty/base/webapps/Rhythmyx"/>
<property name="stylesheet" location="addProp.xslt" />
<!-- relative paths -->
<property name="lib" location="${basedir}/lib"/>
<target name="jarcopy" description="copy the jar files from the lib folder" >
<fail unless="env.RHYTHMYX_HOME" message="You must set the RHYTHMYX_HOME environment variable"/>
<copy todir="${rhythmyx.lib}" overwrite="true" verbose="true">
<fileset dir="${lib}">
<include name="**.jar" />
</fileset>
<fileset dir="${basedir}">
<include name="**.jar" />
</fileset>
</copy>
<copy todir="${jetty.webapp}/WEB-INF/lib" overwrite="true" verbose="true">
<fileset dir="${lib}">
<include name="**.jar" />
</fileset>
<fileset dir="${basedir}">
<include name="**.jar" />
</fileset>
</copy>
</target>
<target name="WEB-INF" description="Copy any configuration files to the Web App" >
<fail unless="env.RHYTHMYX_HOME" message="You must set the RHYTHMYX_HOME environment variable"/>
<copy todir="${rhythmyx.WEB-INF}" overwrite="true" verbose="true">
<fileset dir="WEB-INF" />
</copy>
<copy todir="${jetty.webapp}/WEB-INF" overwrite="true" verbose="true">
<fileset dir="WEB-INF" />
</copy>
</target>
<target name="rx_resources" description="Copy the resource files">
<fail unless="env.RHYTHMYX_HOME" message="You must set the RHYTHMYX_HOME environment variable"/>
<copy todir="${rhythmyx.rx_resources}" overwrite="true" verbose="true" >
<fileset dir="rx_resources" />
</copy>
</target>
<target name="installExtensions">
<fail unless="env.RHYTHMYX_HOME" message="You must set the RHYTHMYX_HOME environment variable"/>
<java classname="com.percussion.util.PSExtensionInstallTool" fork="true">
<arg value="${rhythmyx.home}"/>
<arg value="${basedir}"/>
<classpath>
<fileset dir="${rhythmyx.lib}">
<include name="rxserver.jar"/>
<include name="rxclient.jar"/>
<include name="rxutils.jar" />
<include name="rxservices.jar" />
<include name="rxbusiness.jar" />
<include name="commons-jexl*.jar" />
<include name="commons-lang*.jar"/>
<include name="jcr*.jar" />
<include name="commons-logging*.jar" />
<include name="commons-collections*.jar" />
<include name="commons-httpclient*.jar" />
</fileset>
<fileset dir="${rhythmyx.home}/AppServer/lib/endorsed" >
<include name="xml-apis.jar" />
</fileset>
<fileset dir="${rhythmyx.home}/AppServer/server/rx/lib">
<include name="javax.servlet.jar" />
<include name="log4j.jar" />
<include name="commons-jexl*.jar" />
<include name="commons-lang*.jar"/>
<include name="jcr*.jar" />
<include name="commons-logging*.jar" />
<include name="commons-collections*.jar" />
<include name="commons-httpclient*.jar" />
</fileset>
</classpath>
</java>
</target>
<!-- this needs to be done only ONCE, to add the include to the UserDispatcher-servlet.xml file" -->
<property name="dispatch.stylesheet" value="addProp.xslt" />
<target name="addWebApp" description="adds the necessary property to the UserDispatcher-servlet and copies the new file">
<echo>Transforming web.xml</echo>
<copy file="${rhythmyx.WEB-INF}/web.xml" todir=""/>
<xslt in="web.xml" style="${stylesheet}" out="Output.xml" force="yes" />
<!-- echo>Deleted extraneous files</echo -->
<!-- delete file="${stylesheet}"/ -->
<move file="Output.xml" tofile="web.xml" />
<copy file="web.xml" todir="${rhythmyx.WEB-INF}"/>
<!-- delete file="web.xml"/ -->
<echo>Updated web.xml</echo>
<echo>Transforming jetty web.xml</echo>
<copy file="${jetty.webapp}/WEB-INF/web.xml" todir=""/>
<xslt in="web.xml" style="${stylesheet}" out="Output.xml" force="yes" />
<!-- echo>Deleted extraneous files</echo -->
<!-- delete file="${stylesheet}"/ -->
<move file="Output.xml" tofile="web.xml" />
<copy file="web.xml" todir="${jetty.webapp}/WEB-INF/"/>
<!-- delete file="web.xml"/ -->
<echo>Updated jetty web.xml</echo>
</target>
<!-- Remove Prior Versions -->
<target name="uninstall">
<echo message="Uninstalling previous version..."/>
<delete casesensitive="false" failonerror="false" verbose="true">
<fileset>
<filename name="${rhythmyx.home}/AppServer/server/rx/rxapp.ear/rxapp.war/WEB-INF/lib/pso-image-editor*.jar"/>
<filename name="${jetty.webapp}/WEB-INF/lib/pso-image-editor*.jar"/>
</fileset>
</delete>
</target>
<!--
pso-image-editor-1.0.jar
-->
<target name="dist">
<fail unless="env.RHYTHMYX_HOME" message="You must set the RHYTHMYX_HOME environment variable"/>
<echo>Installing Extensions to ${rhythmyx.home}</echo>
<antcall target="uninstall"/>
<antcall target="jarcopy"/>
<antcall target="WEB-INF" />
<antcall target="rx_resources" />
<antcall target="installExtensions"/>
<antcall target="addWebApp" />
</target>
</project>