Repository navigation
Expand file tree
/
Copy pathbuild.xml
More file actions
164 lines (136 loc) · 4.66 KB
/
Copy pathbuild.xml
File metadata and controls
164 lines (136 loc) · 4.66 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
<?xml version="1.0"?>
<!DOCTYPE project>
<project basedir="." default="deploy" name="ext" xmlns:antelope="antlib:ise.antelope.tasks">
<import file="../build-common-plugins.xml" />
<target name="clean">
<antcall target="loop-exts">
<param name="loop.exts.cmd" value="clean-ext" />
</antcall>
</target>
<target name="clean-ext">
<ant dir="${ext.name}" inheritAll="false" target="clean" />
</target>
<target name="create">
<if>
<not>
<isset property="ext.name" />
</not>
<then>
<fail>This task must be called by the create script.</fail>
</then>
</if>
<property name="ext.parent.dir" value="${user.dir}" />
<property name="ext.plugin.dir" value="${ext.parent.dir}/${ext.name}-ext" />
<if>
<available file="${ext.plugin.dir}" />
<then>
<fail>${ext.name}-ext already exists.</fail>
</then>
</if>
<copy todir="${ext.plugin.dir}">
<fileset
dir="${sdk.dir}/tools/templates/ext_tmpl"
/>
</copy>
<mkdir dir="${ext.plugin.dir}/docroot/WEB-INF/ext-impl/src" />
<mkdir dir="${ext.plugin.dir}/docroot/WEB-INF/ext-kernel/src" />
<mkdir dir="${ext.plugin.dir}/docroot/WEB-INF/ext-lib/global" />
<mkdir dir="${ext.plugin.dir}/docroot/WEB-INF/ext-lib/portal" />
<mkdir dir="${ext.plugin.dir}/docroot/WEB-INF/ext-util-bridges/src" />
<mkdir dir="${ext.plugin.dir}/docroot/WEB-INF/ext-util-java/src" />
<mkdir dir="${ext.plugin.dir}/docroot/WEB-INF/ext-util-taglib/src" />
<replace dir="${ext.plugin.dir}">
<replacefilter token="@ext.display.name@" value="${ext.display.name}" />
<replacefilter token="@ext.name@" value="${ext.name}" />
<replacefilter token="@plugin.type.dir@" value="${plugin.type.dir}" />
</replace>
</target>
<target name="deploy">
<antcall target="loop-exts">
<param name="loop.exts.cmd" value="deploy-ext" />
</antcall>
</target>
<target name="deploy-ext">
<ant dir="${ext.name}" inheritAll="false" target="deploy" />
</target>
<target name="loop-exts">
<if>
<not>
<equals arg1="${plugins.includes}" arg2="" />
</not>
<then>
<for param="ext.name">
<path>
<dirset dir="." excludes="${plugins.excludes}" includes="${plugins.includes}" />
</path>
<sequential>
<antelope:stringutil property="ext.name.unix" string="@{ext.name}">
<antelope:replace regex="\\" replacement="/" />
</antelope:stringutil>
<antelope:grep group="2" in="${ext.name.unix}" property="ext.name" regex="(.*/)(.*)" />
<antcall target="${loop.exts.cmd}" />
</sequential>
</for>
</then>
</if>
</target>
<target name="upgrade-ext">
<if>
<not>
<isset property="ext.name" />
</not>
<then>
<fail>
.
Usage: ant upgrade-ext -Dext.dir=C:\ext -Dext.name=hello-world -Dext.display.name="Hello World"
The arguments "ext.dir", "ext.name", and "ext.display.name" are not properly
specified.
This task will build an EXT plugin from a legacy EXT environment. The files in
the directory denoted by "ext.dir" will be copied into the EXT plugin directory
called "ext.name"-ext. The property "ext.dir" must point to a legacy EXT
environment and the EXT plugin directory called "ext-name"-ext must not already
exist.
</fail>
</then>
</if>
<if>
<available file="${ext.name}-ext" />
<then>
<fail>${ext.name}-ext already exists.</fail>
</then>
</if>
<antcall target="create">
<param name="ext.display.name" value="${ext.display.name}" />
<param name="ext.name" value="${ext.name}" />
</antcall>
<copy failonerror="false" todir="${ext.name}-ext/docroot/WEB-INF/ext-impl/src">
<fileset dir="${ext.dir}/ext-impl/src" />
</copy>
<copy failonerror="false" todir="${ext.name}-ext/docroot/WEB-INF/ext-lib/global">
<fileset dir="${ext.dir}/ext-lib/global" />
</copy>
<copy failonerror="false" todir="${ext.name}-ext/docroot/WEB-INF/ext-lib/portal">
<fileset dir="${ext.dir}/ext-lib/portal" />
</copy>
<copy failonerror="false" todir="${ext.name}-ext/docroot/WEB-INF/ext-kernel/src">
<fileset dir="${ext.dir}/ext-kernel/src" />
</copy>
<copy failonerror="false" overwrite="true" todir="${ext.name}-ext/docroot/WEB-INF/ext-web/docroot">
<fileset
dir="${ext.dir}/ext-web/docroot"
excludes="**/struts-config.xml,**/tiles-defs.xml"
/>
</copy>
<copy
file="${ext.dir}/ext-web/docroot/WEB-INF/struts-config.xml"
tofile="${ext.name}-ext/docroot/WEB-INF/ext-web/docroot/WEB-INF/struts-config-ext.xml"
/>
<copy
file="${ext.dir}/ext-web/docroot/WEB-INF/tiles-defs.xml"
tofile="${ext.name}-ext/docroot/WEB-INF/ext-web/docroot/WEB-INF/tiles-defs-ext.xml"
/>
<copy failonerror="false" todir="${ext.name}-ext/docroot/WEB-INF/sql">
<fileset dir="${ext.dir}/sql" />
</copy>
</target>
</project>