forked from liferay/liferay-portal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild-test-plugins.xml
119 lines (103 loc) · 3.5 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
<?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-simple-server-plugins">
<if>
<equals arg1="${app.server.type}" arg2="websphere" />
<then>
<echo file="${lp.plugins.dir}/build.${user.name}.properties">app.server.type=websphere
app.server.dir=${app.server.dir}
app.server.deploy.dir=${app.server.dir}/profiles/liferay/wsadmin-deploy
app.server.lib.global.dir=${app.server.dir}/lib/ext
app.server.portal.dir=${app.server.dir}/profiles/liferay/installedApps/liferay-cell/liferay-portal.ear/liferay-portal.war
auto.deploy.dir=${liferay.home}/deploy
plugins.includes=${plugins.includes}</echo>
</then>
<else>
<echo file="${lp.plugins.dir}/build.${user.name}.properties">app.server.dir=${app.server.dir}
app.server.lib.global.dir=${app.server.lib.global.dir}
app.server.portal.dir=${app.server.portal.dir}
auto.deploy.dir=${liferay.home}/deploy
plugins.includes=${plugins.includes}</echo>
</else>
</if>
<if>
<equals arg1="${java.security}" arg2="true" />
<then>
<loadfile failonerror="false" property="liferay-plugin-package.properties.content" srcfile="${lp.plugins.dir}/${plugin.types}/${portlet.plugins.includes}/docroot/WEB-INF/liferay-plugin-package.properties" />
<if>
<not>
<contains string="${liferay-plugin-package.properties.content}" 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>
<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>
</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>
<ant dir="${lp.plugins.dir}/${plugin.types}" inheritAll="false">
<target name="clean" />
<target name="deploy" />
</ant>
</else>
</if>
<delete dir="${lp.plugins.dir}/dist" />
<mkdir dir="${lp.plugins.dir}/dist" />
</target>
</project>