-
Notifications
You must be signed in to change notification settings - Fork 3
/
pom.xml
242 lines (224 loc) · 9.75 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
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2013 David Valeri.
Licensed 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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>valeri.blog.examples.cargo.tomcat</groupId>
<artifactId>cargo-tomcat-example-parent</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>David Valeri's Blog :: Examples :: Cargo Tomcat</name>
<licenses>
<license>
<name>The Apache Software License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
<comments>A business-friendly OSS license</comments>
</license>
</licenses>
<properties>
<junit.version>4.7</junit.version>
<log4j.version>1.2.17</log4j.version>
<slf4j.version>1.5.11</slf4j.version>
<!-- The Cargo container type -->
<cargo.container.id>tomcat6x</cargo.container.id>
<!-- The URL of the Zip file based installer for the container that Cargo is to deploy -->
<cargo.container.url>https://archive.apache.org/dist/tomcat/tomcat-6/v6.0.32/bin/apache-tomcat-6.0.32.zip</cargo.container.url>
<!-- The location where downloaded container Zip file installers are cached -->
<cargo.container.download.dir>${user.home}/.m2/cargo/containers</cargo.container.download.dir>
<!-- The port used by the forked container -->
<cargo.container.port>8080</cargo.container.port>
<!-- When using Tomcat, the AJP connector listen port -->
<cargo.container.tomcat.ajp.port>8009</cargo.container.tomcat.ajp.port>
<!-- The RMI port used on the container. For Tomcat, this is the value of the /Server/@port attribute. -->
<cargo.container.rmi.port>8205</cargo.container.rmi.port>
<!-- Optional JVM arguments for the forked container that are prepended to the option
that configures the Zommons config location and appended to any debugging
configuration set by cargo.container.jvmargs.debug (See cargo-debug profile.)-->
<cargo.container.jvmargs></cargo.container.jvmargs>
<!-- The port to use when the debugger is enabled. -->
<cargo.container.debug.port>8000</cargo.container.debug.port>
<!-- The suspend setting to use when the debugger is enabled. -->
<cargo.container.debug.suspend>n</cargo.container.debug.suspend>
<!-- The debug arguments used to enable debugging on the forked JVM. -->
<cargo.container.debug.jvmargs>-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=${cargo.container.debug.suspend},address=${cargo.container.debug.port} -Xnoagent -Djava.compiler=NONE</cargo.container.debug.jvmargs>
<cargo.container.jvmargs.debug></cargo.container.jvmargs.debug>
<cargo.deployable.default.groupId>${project.groupId}</cargo.deployable.default.groupId>
<cargo.deployable.default.artifactId>${project.artifactId}</cargo.deployable.default.artifactId>
<cargo.deployable.default.context>${project.artifactId}</cargo.deployable.default.context>
</properties>
<modules>
<module>app</module>
</modules>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>${log4j.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>${slf4j.version}</version>
<scope>runtime</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.5.1</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<executions>
<execution>
<id>verify</id>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<version>1.3.3</version>
<configuration>
<container>
<containerId>${cargo.container.id}</containerId>
<zipUrlInstaller>
<url>${cargo.container.url}</url>
<downloadDir>${cargo.container.download.dir}</downloadDir>
</zipUrlInstaller>
<log>${project.build.directory}/cargo/logs/cargo.log</log>
<output>${project.build.directory}/cargo/logs/container.log</output>
</container>
<deployables>
<deployable>
<groupId>${cargo.deployable.default.groupId}</groupId>
<artifactId>${cargo.deployable.default.artifactId}</artifactId>
<type>war</type>
<properties>
<context>${cargo.deployable.default.context}</context>
</properties>
</deployable>
</deployables>
</configuration>
<executions>
<execution>
<id>start-container</id>
<phase>pre-integration-test</phase>
<goals>
<goal>start</goal>
</goals>
<!-- We bring this configuration down into the start goal since this configuration
really only applies to the startup activities. This is particularly relevant
for forked JVM debugging since the stop goal will try to launch another JVM using
the same JVM args if we leave this configuration at the plug-in level. When the
debugger is in use, there will be a port collision and the build will hang. -->
<configuration>
<configuration>
<properties>
<cargo.jvmargs>
${cargo.container.jvmargs.debug}
${cargo.container.jvmargs}
</cargo.jvmargs>
<cargo.servlet.port>${cargo.container.port}</cargo.servlet.port>
<cargo.tomcat.ajp.port>${cargo.container.tomcat.ajp.port}</cargo.tomcat.ajp.port>
<cargo.rmi.port>${cargo.container.rmi.port}</cargo.rmi.port>
</properties>
</configuration>
</configuration>
</execution>
<execution>
<id>default-cli</id>
<goals>
<goal>run</goal>
</goals>
<!-- We bring this configuration down into the CLI run goal because we need it to apply to the
run goal too. See note in the start goal as to why it is needed in the first place. -->
<configuration>
<configuration>
<properties>
<cargo.jvmargs>
${cargo.container.jvmargs.debug}
${cargo.container.jvmargs}
</cargo.jvmargs>
<cargo.servlet.port>${cargo.container.port}</cargo.servlet.port>
<cargo.tomcat.ajp.port>${cargo.container.tomcat.ajp.port}</cargo.tomcat.ajp.port>
<cargo.rmi.port>${cargo.container.rmi.port}</cargo.rmi.port>
</properties>
</configuration>
</configuration>
</execution>
<execution>
<id>stop-container</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
<!-- We bring this configuration down into the stop goal because we need it to apply to the
stop goal too. -->
<configuration>
<configuration>
<properties>
<cargo.servlet.port>${cargo.container.port}</cargo.servlet.port>
<cargo.tomcat.ajp.port>${cargo.container.tomcat.ajp.port}</cargo.tomcat.ajp.port>
<cargo.rmi.port>${cargo.container.rmi.port}</cargo.rmi.port>
</properties>
</configuration>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
<profiles>
<profile>
<id>cargo-debug</id>
<activation>
<property>
<name>cargo.debug</name>
</property>
</activation>
<properties>
<cargo.container.jvmargs.debug>${cargo.container.debug.jvmargs}</cargo.container.jvmargs.debug>
</properties>
</profile>
</profiles>
</project>