forked from comundus/opencms-basic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpom.xml
282 lines (276 loc) · 14.9 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
<?xml version="1.0" encoding="UTF-8"?>
<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">
<!--
in order to make the parent pom smaller some information were put into a separate pom (general-pom.xml)
-->
<parent>
<groupId>com.comundus.opencms</groupId>
<artifactId>parent</artifactId>
<version>${revision}</version>
<relativePath>parent</relativePath>
</parent>
<!--
Parent POM for OpenCms-Basic. Database support can be triggered by
Maven profiles. Currently mysql, postgresql and db2 are supported.
tomcat and mysql profiles are activated by default (see activate section of the two profiles).
We do not use the <activeByDefault> directive within the profile itself because it will be
ignored if another profile from this POM will be activated by other
ways.
-->
<modelVersion>4.0.0</modelVersion>
<artifactId>opencms-basic</artifactId>
<packaging>pom</packaging>
<name>OpenCms Basic Root</name>
<description>OpenCms</description>
<!--
<url>http://projectsites.intra.comundus.de/projects/cm-comundus/opencms-basic/content</url>
-->
<url>http://opencms-maven.comundus.com</url>
<prerequisites>
<maven>3.5.4</maven>
</prerequisites>
<inceptionYear>2007</inceptionYear>
<developers>
<developer>
<id>ar</id>
<name>Adrian Rodriguez</name>
<email>a.rodriguez@comundus.com</email>
<url />
<organization>comundus GmbH</organization>
<organizationUrl>http://www.comundus.com</organizationUrl>
<roles>
<role>lead developer</role>
</roles>
<timezone>1</timezone>
<properties />
</developer>
</developers>
<scm>
<connection>scm:git:https://github.com/comundus/opencms-basic.git</connection>
<developerConnection>scm:git:https://github.com/comundus/opencms-basic.git</developerConnection>
<url>https://github.com/comundus/opencms-basic.git</url>
<tag />
</scm>
<properties />
<profiles>
<!-- in OpenCms Basic the release build does not work because we only have example
release files which refer to imaginary resources -->
<profile>
<id>release</id>
<properties>
<release.opencmsBase>${basedir}/webapp/target/webapp/WEB-INF</release.opencmsBase>
<release.webappLibCP>${release.opencmsBase}/lib/*</release.webappLibCP>
<release.tomcatLibCP>target/servletlib/*</release.tomcatLibCP>
<release.webappClassesDir>${release.opencmsBase}/classes</release.webappClassesDir>
<release.cmsShellScript>src/release-scripts/release-${project.version}/exportopencms-commands.txt</release.cmsShellScript>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<inherited>false</inherited>
<executions>
<execution>
<id>copy-servlet-jars</id>
<phase>initialize</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>4.0.1</version>
<type>jar</type>
<overWrite>false</overWrite>
</artifactItem>
<artifactItem>
<groupId>javax.servlet.jsp</groupId>
<artifactId>javax.servlet.jsp-api</artifactId>
<version>2.3.3</version>
<type>jar</type>
<overWrite>false</overWrite>
</artifactItem>
</artifactItems>
<outputDirectory>${project.build.directory}/servletlib</outputDirectory>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>true</overWriteSnapshots>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<inherited>false</inherited>
<executions>
<execution>
<id>assembly-release</id>
<phase>initialize</phase>
<goals>
<goal>directory-single</goal>
</goals>
</execution>
</executions>
<configuration>
<finalName>opencms</finalName>
<descriptors>
<descriptor>src/release-scripts/release-${project.version}/release-assembly.xml</descriptor>
</descriptors>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.6.0</version>
<inherited>false</inherited>
<executions>
<execution>
<id>export-opencms</id>
<phase>initialize</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>java</executable>
<arguments>
<argument>-classpath</argument>
<argument>"${release.webappLibCP};${release.tomcatLibCP};${release.webappClassesDir}"</argument>
<argument>org.opencms.main.CmsShell</argument>
<argument>-base=${release.opencmsBase}</argument>
<argument>-script=${release.cmsShellScript}</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
<inherited>false</inherited>
<executions>
<execution>
<id>prepare-tree</id>
<phase>validate</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<mkdir dir="target/opencms-release/modules" />
</target>
</configuration>
</execution>
<execution>
<id>copy-modules</id>
<phase>initialize</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<!-- Copies modules from webapp to the assembly, replacing ampersands with the XML entity in manifest.xml -->
<taskdef resource="net/sf/antcontrib/antlib.xml" classpathref="maven.plugin.classpath"/>
<for param="filepath">
<path>
<fileset dir="webapp/target/webapp/WEB-INF/packages/modules" includes="**/*.zip"/>
</path>
<sequential>
<var name="for.filename" unset="true" />
<basename property="for.filename" file="@{filepath}" />
<unzip src="@{filepath}" dest="target/opencms-release-temp/modules/${for.filename}" encoding="UTF8" />
<replace file="target/opencms-release-temp/modules/${for.filename}/manifest.xml" token="&" value="&amp;" encoding="UTF8" />
<zip basedir="target/opencms-release-temp/modules/${for.filename}" destfile="target/opencms-release/modules/${for.filename}" encoding="UTF8" />
</sequential>
</for>
</target>
</configuration>
</execution>
<!--
copy comundus and customer jars and remove version number
comment in, if customer wants it and change/add the included files names
-->
<!--execution>
<id>rename-jars</id>
<phase>initialize</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<copy toDir="target/opencms-release-${project.version}/webapp/WEB-INF/lib">
<fileset dir="webapp/target/webapp/WEB-INF/lib"
includes="*com.customer.project.module.*-${project.version}.jar,*com.comundus.*-${project.version}.jar"
/>
<globmapper from="*-${project.version}.jar" to="*.jar"/>
</copy>
</target>
</configuration>
</execution-->
<execution>
<id>zip-release</id>
<phase>initialize</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<!-- Zips release directory and renames it afterwards -->
<zip destfile="target/opencms-release-${project.version}.zip" basedir="target/opencms-release" encoding="UTF8" />
<move file="target/opencms-release" tofile="target/opencms-release-${project.version}"/>
</target>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>ant-contrib</groupId>
<artifactId>ant-contrib</artifactId>
<version>1.0b3</version>
<exclusions>
<exclusion>
<groupId>ant</groupId>
<artifactId>ant</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</profile>
<!--
separating the vfs from the java modules allows us to
build all java modules without building the whole project
actually we don't need it in the opencms-basic project, because there are no java projects
-->
<profile>
<id>vfs</id>
<modules>
<!-- vfs modules -->
<module>webapp</module> <!-- this must always come first -->
<module>system</module> <!-- containing categories, but not orgunits -->
<module>content</module> <!-- requires categories from system -->
<module>orgunits</module> <!-- requires content -->
</modules>
</profile>
</profiles>
<modules>
<module>webapp</module> <!-- this must always come first -->
<module>system</module> <!-- containing categories, but not orgunits -->
<module>content</module> <!-- requires categories from system -->
<module>orgunits</module> <!-- requires content -->
<module>parent</module> <!-- requires content -->
<module>parent/general-pom.xml</module> <!-- requires content -->
<!-- the following modules are additional modules which originally do not belong to the OpenCms Basic project -->
<!-- module>../template3_vfs</module -->
</modules>
<distributionManagement>
<site>
<url>file:////Data02/projectsites/projects/cm-comundus/opencms-basic</url>
</site>
</distributionManagement>
</project>