/
pom.xml
336 lines (312 loc) · 15.3 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
<?xml version="1.0" encoding="UTF-8"?>
<!--
| Copyright 2015 Adobe Systems Incorporated
|
| 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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>projectlogin</groupId>
<artifactId>projectlogin</artifactId>
<version>1.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<!-- ====================================================================== -->
<!-- P R O J E C T D E S C R I P T I O N -->
<!-- ====================================================================== -->
<artifactId>projectlogin.it.launcher</artifactId>
<packaging>jar</packaging>
<name>projectlogin - Integration Tests Launcher</name>
<description>Integration Tests Launcher for projectlogin</description>
<!-- <scm>
<connection></connection>
<developerConnection></developerConnection>
<url></url>
<tag>HEAD</tag>
</scm-->
<!--
To keep the instance under test running and run individual tests
against it, use:
mvn clean verify -DkeepJarRunning=true -Dhttp.port=8080
optionally using jar.executor.vm.options to enable remote debugging,
and in another console:
mvn -o verify -Dtests.to.run=**/**Test.java -Dtest.server.url=http://localhost:8080
optionally using -Dmaven.surefire.debug to enable debugging.
-->
<properties>
<!-- Set this to run the server on a specific port
<http.port></http.port>
-->
<!-- URL of a server against which to run tests -->
<test.server.url>http://${aem.host}:${aem.port}</test.server.url>
<!-- Set this to run tests against an existing server instance -->
<keepJarRunning>false</keepJarRunning>
<!-- Set this to run tests against a specific hostname, if test.server.url is not set-->
<test.server.hostname />
<!-- Set this to use a different username for remote execution of sling junit tests -->
<test.server.username />
<!-- Set this to use a different password for remote execution of sling junit tests -->
<test.server.password />
<!-- Options for the VM that executes our runnable jar -->
<jar.executor.vm.options>-Xmx512m</jar.executor.vm.options>
<!-- Change this to use longer or shorter timeouts for testing -->
<sling.testing.timeout.multiplier>1.0</sling.testing.timeout.multiplier>
<!-- Set this to run the executable jar in a specified filesystem folder -->
<jar.executor.work.folder />
<!-- Options for the jar to execute. $JAREXEC_SERVER_PORT$ is replaced by the
selected port number -->
<jar.executor.jar.options>-p $JAREXEC_SERVER_PORT$</jar.executor.jar.options>
<!-- Change this to run selected tests only -->
<tests.to.run>**/**Test.java</tests.to.run>
</properties>
<build>
<plugins>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<configuration>
<filesets>
<fileset>
<directory>${basedir}</directory>
<includes>
<!-- sling folder is the workdir of the executable jar that we test -->
<include>sling/**</include>
</includes>
</fileset>
</filesets>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy-runnable-jar</id>
<goals>
<goal>copy-dependencies</goal>
</goals>
<phase>process-resources</phase>
<configuration>
<includeArtifactIds>org.apache.sling.launchpad</includeArtifactIds>
<excludeTransitive>true</excludeTransitive>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>false</overWriteSnapshots>
</configuration>
</execution>
<execution>
<!--
Consider all dependencies as candidates to be installed
as additional bundles. We use system properties to define
which bundles to install in which order.
-->
<id>copy-additional-bundles</id>
<goals>
<goal>copy-dependencies</goal>
</goals>
<phase>process-resources</phase>
<configuration>
<outputDirectory>${project.build.directory}/sling/additional-bundles</outputDirectory>
<excludeTransitive>true</excludeTransitive>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>false</overWriteSnapshots>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<!-- Find free ports to run our server -->
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>reserve-server-port</id>
<goals>
<goal>reserve-network-port</goal>
</goals>
<phase>process-resources</phase>
<configuration>
<portNames>
<portName>http.port</portName>
</portNames>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<!-- We run all tests in the integration-tests phase -->
<excludes>
<exclude>**</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>integrationTests</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<executions>
<execution>
<id>integration-test</id>
<goals>
<goal>integration-test</goal>
</goals>
</execution>
<execution>
<id>verify</id>
<goals>
<goal>verify</goal>
</goals>
</execution>
</executions>
<configuration>
<debugForkedProcess>${maven.surefire.debug}</debugForkedProcess>
<includes>
<include>${tests.to.run}</include>
</includes>
<systemPropertyVariables>
<test.server.url>${test.server.url}</test.server.url>
<test.server.hostname>${test.server.hostname}</test.server.hostname>
<test.server.username>${test.server.username}</test.server.username>
<test.server.password>${test.server.password}</test.server.password>
<jar.executor.server.port>${http.port}</jar.executor.server.port>
<jar.executor.vm.options>${jar.executor.vm.options}</jar.executor.vm.options>
<jar.executor.jar.folder>${project.basedir}/target/dependency</jar.executor.jar.folder>
<jar.executor.jar.name.regexp>org.apache.sling.launchpad.*jar$</jar.executor.jar.name.regexp>
<jar.executor.work.folder>${jar.executor.work.folder}</jar.executor.work.folder>
<jar.executor.jar.options>${jar.executor.jar.options}</jar.executor.jar.options>
<additional.bundles.path>${project.basedir}/target/sling/additional-bundles</additional.bundles.path>
<keepJarRunning>${keepJarRunning}</keepJarRunning>
<server.ready.timeout.seconds>90</server.ready.timeout.seconds>
<sling.testing.timeout.multiplier>${sling.testing.timeout.multiplier}</sling.testing.timeout.multiplier>
<server.ready.path.1>/projects.html:html</server.ready.path.1>
<start.bundles.timeout.seconds>40</start.bundles.timeout.seconds>
<bundle.install.timeout.seconds>30</bundle.install.timeout.seconds>
<!--
Define additional bundles to install by specifying the beginning of their artifact name.
The bundles are installed in lexical order of these property names.
All bundles must be listed as dependencies in this pom, or they won't be installed.
-->
<sling.additional.bundle.1>org.apache.sling.junit.core</sling.additional.bundle.1>
<sling.additional.bundle.2>org.apache.sling.junit.scriptable</sling.additional.bundle.2>
<sling.additional.bundle.3>projectlogin.it.tests</sling.additional.bundle.3>
<sling.additional.bundle.4>projectlogin.core</sling.additional.bundle.4>
<sling.additional.bundle.5>org.apache.sling.junit.remote</sling.additional.bundle.5>
<sling.additional.bundle.6>org.apache.sling.testing.tools</sling.additional.bundle.6>
<sling.additional.bundle.7>httpclient-osgi</sling.additional.bundle.7>
<sling.additional.bundle.8>httpcore-osgi</sling.additional.bundle.8>
</systemPropertyVariables>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<dependencies>
<!-- Additional bundles needed by the Sling instance under test -->
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.junit.core</artifactId>
<version>1.0.8</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.junit.scriptable</artifactId>
<version>1.0.8</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.junit.remote</artifactId>
<version>1.0.8</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.testing.tools</artifactId>
<version>1.0.8</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.servlets.post</artifactId>
<version>2.3.4</version>
<scope>provided</scope>
</dependency>
<!-- sling testing tools bundles requires httpclient -->
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient-osgi</artifactId>
<version>4.5.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore-osgi</artifactId>
<version>4.4.5</version>
<scope>provided</scope>
</dependency>
<!-- actual dependencies -->
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.commons.json</artifactId>
<version>2.0.6</version>
</dependency>
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.launchpad</artifactId>
<classifier>standalone</classifier>
<version>6</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>projectlogin</groupId>
<artifactId>projectlogin.it.tests</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>projectlogin</groupId>
<artifactId>projectlogin.core</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
</dependencies>
</project>