-
Notifications
You must be signed in to change notification settings - Fork 0
/
pom.xml
354 lines (342 loc) · 14.2 KB
/
pom.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
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.apache.jspwiki</groupId>
<artifactId>jspwiki-builder</artifactId>
<version>2.11.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jspwiki-portable</artifactId>
<name>Apache JSPWiki portable</name>
<properties>
<jspwiki.woas.language>en</jspwiki.woas.language>
<jspwiki.native-launchers.macos.download>woas:download-appbundler-for-mac</jspwiki.native-launchers.macos.download>
<jspwiki.native-launchers.macos.generate>woas:mac-app-oracle-jdk</jspwiki.native-launchers.macos.generate>
<jspwiki.native-launchers.windows.download>woas:download-launch4j-for-mac</jspwiki.native-launchers.windows.download>
<jspwiki.native-launchers.windows.generate>woas:create-windows-app</jspwiki.native-launchers.windows.generate>
</properties>
<build>
<plugins>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<configuration>
<filesets>
<fileset>
<directory>${basedir}/logs</directory>
</fileset>
</filesets>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>generate-tomcat-launcher</id>
<phase>generate-resources</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<appendAssemblyId>false</appendAssemblyId>
<archive>
<manifest>
<mainClass>org.apache.catalina.startup.Bootstrap</mainClass>
</manifest>
</archive>
<descriptors>
<descriptor>${basedir}/src/main/assembly/tomcat-launcher.xml</descriptor>
</descriptors>
<finalName>tomcat-launcher-${tomcat.version}</finalName>
<outputDirectory>./target/launchers</outputDirectory>
<!--
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters> -->
</configuration>
</execution>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<tarLongFileMode>gnu</tarLongFileMode>
<descriptors>
<descriptor>${basedir}/src/main/assembly/woas-dist.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>woas:copy-woas</id>
<phase>process-resources</phase>
<configuration>
<target>
<property name="jspwiki.woas.version" value="${project.version}" />
<property name="jspwiki.tomcat.version" value="${tomcat.version}" />
<ant antfile="${basedir}/build.xml" target="woas:info" />
<ant antfile="${basedir}/build.xml" target="woas:copy-woas" />
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
<execution>
<id>woas:copy-tomcat</id>
<phase>prepare-package</phase>
<configuration>
<target>
<property name="jspwiki.woas.version" value="${project.version}" />
<property name="jspwiki.tomcat.version" value="${tomcat.version}" />
<ant antfile="${basedir}/build.xml" target="woas:copy-tomcat" />
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
<execution>
<id>woas:copy-launchers</id>
<phase>prepare-package</phase>
<configuration>
<target>
<property name="jspwiki.woas.version" value="${project.version}" />
<property name="jspwiki.tomcat.version" value="${tomcat.version}" />
<ant antfile="${basedir}/build.xml" target="woas:info" />
<ant antfile="${basedir}/build.xml" target="woas:copy-tomcat-launchers" />
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<!-- Unpack the JSP Wiki web archive -->
<execution>
<id>unpack-jspwiki-war</id>
<phase>generate-resources</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.apache.jspwiki</groupId>
<artifactId>jspwiki-war</artifactId>
<version>${project.version}</version>
<type>war</type>
</artifactItem>
</artifactItems>
<outputDirectory>${project.build.directory}/unpack/jspwiki-war</outputDirectory>
</configuration>
</execution>
<!-- Unpack the JSP Wiki Pages for the "personal" wiki -->
<execution>
<id>unpack-wikipages-personal</id>
<phase>generate-resources</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.apache.jspwiki.wikipages</groupId>
<artifactId>jspwiki-wikipages-${jspwiki.woas.language}</artifactId>
<version>${project.version}</version>
</artifactItem>
</artifactItems>
<excludes>META-INF/**</excludes>
<outputDirectory>${project.build.directory}/woas/data/personal</outputDirectory>
</configuration>
</execution>
<!-- Unpack the JSP Wiki Pages for the "department" wiki -->
<execution>
<id>unpack-wikipages-department</id>
<phase>generate-resources</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.apache.jspwiki.wikipages</groupId>
<artifactId>jspwiki-wikipages-${jspwiki.woas.language}</artifactId>
<version>${project.version}</version>
</artifactItem>
</artifactItems>
<excludes>META-INF/**</excludes>
<outputDirectory>${project.build.directory}/woas/data/department</outputDirectory>
</configuration>
</execution>
<!-- Unpack the tomcat distribution -->
<execution>
<id>unpack-tomcat-zip</id>
<phase>generate-resources</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat</artifactId>
<version>${tomcat.version}</version>
<type>zip</type>
</artifactItem>
</artifactItems>
<outputDirectory>${project.build.directory}/unpack/tomcat</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency><!-- added so we can issue safe, parallel builds -->
<groupId>${project.groupId}</groupId>
<artifactId>jspwiki-war</artifactId>
<version>${project.version}</version>
<type>war</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-core</artifactId>
<version>${tomcat.version}</version>
</dependency>
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-jsp-api</artifactId>
<version>${tomcat.version}</version>
</dependency>
</dependencies>
<profiles>
<profile>
<id>generate-launchers</id>
<!-- Native launchers generation need a previous build to be run, so the ant script is able to locate all -->
<!-- needed files. In order to do that, we launch another module build, as early as possible, and generate the -->
<!-- launchers over it. That way, the main build will be able to pick up the launchers in one run, without -->
<!-- needing to manually issue another build again. As generating the native launchers takes some time, this -->
<!-- feature must be explicitly activated. -->
<activation>
<activeByDefault>false</activeByDefault>
<property>
<name>generate-native-launchers</name>
<value>true</value>
</property>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-invoker-plugin</artifactId>
<configuration>
<logDirectory>${project.build.directory}</logDirectory>
<pom>./pom.xml</pom>
<properties><build-native-launchers>true</build-native-launchers></properties>
<streamLogs>true</streamLogs>
</configuration>
<executions>
<execution>
<id>woas:generate-native-launchers</id>
<phase>validate</phase>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>build-native-launchers</id>
<activation>
<activeByDefault>false</activeByDefault>
<property>
<name>build-native-launchers</name>
<value>true</value>
</property>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>woas:build-native-launchers</id>
<phase>package</phase>
<configuration>
<target>
<!-- <property name="jspwiki.woas.version" value="${project.version}" /> -->
<property name="jspwiki.tomcat.version" value="${tomcat.version}" />
<ant antfile="${basedir}/build.xml" target="woas:info" />
<ant antfile="${basedir}/build.xml" target="${jspwiki.native-launchers.macos.download}" />
<ant antfile="${basedir}/build.xml" target="${jspwiki.native-launchers.macos.generate}" />
<ant antfile="${basedir}/build.xml" target="${jspwiki.native-launchers.windows.download}" />
<ant antfile="${basedir}/build.xml" target="${jspwiki.native-launchers.windows.generate}" />
<ant antfile="${basedir}/build.xml" target="woas:update-tomcat-launchers" />
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency><!-- enable support with JDK >= 9, see https://sourceforge.net/p/launch4j/bugs/172/ and https://sourceforge.net/p/launch4j/bugs/206/ -->
<groupId>com.thoughtworks.xstream</groupId>
<artifactId>xstream</artifactId>
<version>1.4.18</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>native-launchers-on-windows-build</id>
<activation>
<os><family>windows</family></os>
</activation>
<properties>
<jspwiki.native-launchers.macos.download>woas:download-appbundler-for-mac-on-windows</jspwiki.native-launchers.macos.download>
<jspwiki.native-launchers.macos.generate>woas:create-mac-app</jspwiki.native-launchers.macos.generate>
<jspwiki.native-launchers.windows.download>woas:download-launch4j-for-win</jspwiki.native-launchers.windows.download>
<jspwiki.native-launchers.windows.generate>woas:create-windows-app</jspwiki.native-launchers.windows.generate>
</properties>
</profile>
</profiles>
</project>