forked from liferay/liferay-portal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-test-workspace.xml
64 lines (49 loc) · 1.77 KB
/
build-test-workspace.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
<?xml version="1.0"?>
<project basedir="." name="portal-test-workspace" xmlns:antelope="antlib:ise.antelope.tasks">
<import file="build-test.xml" />
<fail message="Please set the property ${workspace.name}." unless="workspace.name" />
<propertycopy from="workspace.client.extension.names[${workspace.name}]" name="workspace.client.extension.names" />
<macrodef name="deploy-workspace-client-extension">
<attribute name="workspace.client.extension.name" />
<sequential>
<local name="workspace.client.extension.dir" />
<property name="workspace.client.extension.dir" value="${workspace.dir}/client-extensions/@{workspace.client.extension.name}" />
<if>
<available file="${workspace.client.extension.dir}" />
<then>
<gradle-execute dir="${workspace.client.extension.dir}" task="clean" />
<gradle-execute dir="${workspace.client.extension.dir}" task="assemble" />
<copy
file="${workspace.client.extension.dir}/dist/@{workspace.client.extension.name}.zip"
todir="${liferay.home}/deploy"
/>
</then>
</if>
</sequential>
</macrodef>
<macrodef name="deploy-workspace-client-extensions">
<sequential>
<for list="${workspace.client.extension.names}" param="workspace.client.extension.name">
<sequential>
<deploy-workspace-client-extension workspace.client.extension.name="@{workspace.client.extension.name}" />
</sequential>
</for>
</sequential>
</macrodef>
<macrodef name="start-workspace">
<sequential>
<deploy-workspace-client-extensions />
</sequential>
</macrodef>
<macrodef name="stop-workspace">
<sequential>
</sequential>
</macrodef>
<target name="start-workspace">
<stop-workspace />
<start-workspace />
</target>
<target name="stop-workspace">
<stop-workspace />
</target>
</project>