forked from liferay/liferay-portal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-test-plugins.xml
163 lines (141 loc) · 4.21 KB
/
build-test-plugins.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
<?xml version="1.0"?>
<project name="portal-test-plugins" basedir="." default="test" xmlns:antelope="antlib:ise.antelope.tasks">
<import file="build-test.xml" />
<target name="deploy-extra-apps">
<fail message="Please set the property ${extra.apps.zip.file.name}" unless="extra.apps.zip.file.name" />
<unzip
dest="${liferay.home}/deploy"
src="${extra.apps.zip.file.name}"
/>
</target>
<target name="deploy-simple-server-plugins">
<if>
<equals arg1="${app.server.type}" arg2="jboss" />
<then>
<echo file="${lp.plugins.dir}/build.${user.name}.properties">app.server.parent.dir=${app.server.parent.dir}
app.server.type=${app.server.type}
app.server.jboss.dir=${app.server.dir}
auto.deploy.dir=${liferay.home}/deploy
plugins.includes=${plugins.includes}</echo>
</then>
<else>
<echo file="${lp.plugins.dir}/build.${user.name}.properties">app.server.parent.dir=${app.server.parent.dir}
app.server.type=${app.server.type}
auto.deploy.dir=${liferay.home}/deploy
plugins.includes=${plugins.includes}</echo>
</else>
</if>
<if>
<equals arg1="${java.security}" arg2="true" />
<then>
<if>
<not>
<resourcecontains
resource="${lp.plugins.dir}/${plugin.types}/${portlet.plugins.includes}/docroot/WEB-INF/liferay-plugin-package.properties"
substring="security-manager-enabled=true"
/>
</not>
<then>
<echo append="true" file="${lp.plugins.dir}/${plugin.types}/${portlet.plugins.includes}/docroot/WEB-INF/liferay-plugin-package.properties">
security-manager-enabled=true</echo>
</then>
</if>
</then>
</if>
<if>
<equals arg1="${liferay.portal.bundle}" arg2="6.1.20" />
<then>
<echo file="${lp.plugins.dir}/build.${user.name}.properties" append="true">
app.server.tomcat.dir=${app.server.parent.dir}/tomcat-7.0.27</echo>
</then>
</if>
<for list="${plugins.includes}" param="plugin">
<sequential>
<if>
<isset property="portlet.properties.@{plugin}" />
<then>
<propertycopy
from="portlet.properties.@{plugin}"
name="portlet.properties"
override="true"
/>
<echo file="${lp.plugins.dir}/${plugin.types}/@{plugin}/docroot/WEB-INF/src/portlet-ext.properties">${portlet.properties}</echo>
</then>
<else>
<delete file="${lp.plugins.dir}/${plugin.types}/@{plugin}/docroot/WEB-INF/src/portlet-ext.properties" />
</else>
</if>
<if>
<equals arg1="@{plugin}" arg2="so-portlet" />
<then>
<echo file="${lp.plugins.dir}/${plugin.types}/@{plugin}/overwrite/META-INF/custom_jsps/html/portlet/dockbar/license_warning.jsp" />
</then>
</if>
</sequential>
</for>
<if>
<matches pattern="http" string="${test.build.plugins.war.zip.url}" />
<then>
<for list="${plugins.includes}" param="plugin.includes">
<sequential>
<pathconvert pathsep="," property="plugin.war" setonempty="false">
<path>
<fileset
dir="plugins"
includes="@{plugin.includes}*.war"
/>
</path>
</pathconvert>
<propertyregex
input="${plugin.war}"
override="true"
property="plugin.war"
regexp=",.*"
replace=""
/>
<if>
<isset property="plugin.war" />
<then>
<copy file="${plugin.war}" todir="${liferay.home}/deploy" />
<var name="plugin.war" unset="true" />
</then>
<else>
<ant dir="${lp.plugins.dir}/${plugin.types}/@{plugin.includes}" inheritAll="false">
<target name="clean" />
<target name="deploy" />
</ant>
</else>
</if>
</sequential>
</for>
</then>
<else>
<if>
<isset property="plugin.types" />
<then>
<ant-execute
ant.dir="${lp.plugins.dir}/${plugin.types}"
ant.target="clean"
/>
<ant-execute
ant.dir="${lp.plugins.dir}/${plugin.types}"
ant.target="deploy"
/>
</then>
<else>
<ant-execute
ant.dir="${lp.plugins.dir}"
ant.target="clean"
/>
<ant-execute
ant.dir="${lp.plugins.dir}"
ant.target="deploy"
/>
</else>
</if>
</else>
</if>
<delete dir="${lp.plugins.dir}/dist" />
<mkdir dir="${lp.plugins.dir}/dist" />
</target>
</project>