Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

cdmlib / cdmlib-remote-webapp / pom.xml @ 960efe86

History | View | Annotate | Download (14.8 KB)

1
<?xml version="1.0" encoding="UTF-8"?>
2
<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">
3
  <modelVersion>4.0.0</modelVersion>
4
  <parent>
5
    <artifactId>cdmlib-parent</artifactId>
6
    <groupId>eu.etaxonomy</groupId>
7
    <version>5.17.0</version>
8
    <relativePath>../pom.xml</relativePath>
9
  </parent>
10
  <artifactId>cdmlib-remote-webapp</artifactId>
11
  <name>CDM Remote Webapp</name>
12
  <packaging>war</packaging>
13

    
14
  <properties>
15
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
16
    <!-- by default 
17
      no further args by now, see profiles for alternative run configurations -->
18
  </properties>
19

    
20
  <profiles>
21
    <profile>
22
      <id>local-repository</id>
23
      <activation>
24
        <property>
25
          <name>localrepo</name>
26
        </property>
27
      </activation>
28
      <repositories>
29
        <repository>
30
          <id>EditLocalRepository</id>
31
          <url>file://${localrepo}/eu/etaxonomy/</url>
32
          <releases>
33
            <enabled>false</enabled>
34
            <updatePolicy>always</updatePolicy>
35
          </releases>
36
          <snapshots>
37
            <enabled>true</enabled>
38
            <updatePolicy>always</updatePolicy>
39
          </snapshots>
40
        </repository>
41
      </repositories>
42
    </profile>
43
    <!-- ========================= PROFILE : db-create ========================= -->
44
    <!--  How to execute from parent project:
45
        1.) mvn package -DskipTests 
46
        2.) mvn integration-test -pl cdmlib-remote-webapp -Pdb-create
47
    -->
48
    <profile>
49
      <id>db-create</id>
50
      <activation>
51
        <property>
52
          <name>db-create</name>
53
        </property>
54
      </activation>
55
      <properties>
56
        <integrationTest.jvmArgs.cdm.datasource>h2_cdm_blank</integrationTest.jvmArgs.cdm.datasource>
57
        <integrationTest.jvmArgs.cdm.forceSchemaCreate>true</integrationTest.jvmArgs.cdm.forceSchemaCreate>
58
        <integrationTest.log4j.configuration>${project.build.directory}/target/test-classes/log4j.properties</integrationTest.log4j.configuration>
59
      </properties>
60
      <build>
61
        <plugins>
62
          <plugin>
63
            <artifactId>maven-failsafe-plugin</artifactId>
64
            <version>2.16</version>
65
            <configuration>
66
              <forkCount>3</forkCount>
67
              <reuseForks>true</reuseForks>
68
            </configuration>
69
            <executions>
70
              <execution>
71
                <goals>
72
                  <goal>integration-test</goal>
73
                  <goal>verify</goal>
74
                </goals>
75
                <configuration>
76
                  <includes>
77
                    <include>**/ForceSchemaCreateIT.java</include>
78
                  </includes>
79
                </configuration>
80
              </execution>
81
            </executions>
82
          </plugin>
83
        </plugins>
84
      </build>
85
    </profile>
86
    <!-- ========================= DEFAULT-PROFILE : db-use ========================= -->
87
     <profile>
88
      <id>db-use</id>
89
      <activation>
90
        <activeByDefault>true</activeByDefault>
91
        <property>
92
          <name>db-use</name>
93
        </property>
94
      </activation>
95
      <properties>
96
        <integrationTest.jvmArgs.cdm.datasource>h2_cdmTest</integrationTest.jvmArgs.cdm.datasource>
97
        <integrationTest.jvmArgs.cdm.forceSchemaCreate>false</integrationTest.jvmArgs.cdm.forceSchemaCreate>
98
        <integrationTest.log4j.configuration>${project.build.directory}/target/test-classes/log4j.properties</integrationTest.log4j.configuration>
99
      </properties>
100
      <build>
101
        <plugins>
102
          <plugin>
103
            <artifactId>maven-failsafe-plugin</artifactId>
104
            <version>2.16</version>
105
            <configuration>
106
              <forkCount>3</forkCount>
107
              <reuseForks>true</reuseForks>
108
            </configuration>
109
            <executions>
110
              <execution>
111
                <goals>
112
                  <goal>integration-test</goal>
113
                  <goal>verify</goal>
114
                </goals>
115
                <configuration>
116
                  <systemPropertyVariables>
117
                    <cdm.datasource>h2_cdmTest</cdm.datasource>
118
                  </systemPropertyVariables>
119
                  <excludes>
120
                    <exclude>**/ForceSchemaCreateIT.java</exclude>
121
                  </excludes>
122
                </configuration>
123
              </execution>
124
            </executions>
125
          </plugin>
126
        </plugins>
127
      </build>
128
    </profile>
129
  </profiles>
130
  <dependencies>
131
    <dependency>
132
      <groupId>eu.etaxonomy</groupId>
133
      <artifactId>cdmlib-remote</artifactId>
134
      <exclusions>
135
        <!-- exclude all jdbc drivers from the war. Jdbc drivers must only 
136
          be added to {APPLICATION_CONTAINER}/lib see http://dev.e-taxonomy.eu/trac/ticket/4955 
137
          and http://stackoverflow.com/questions/6981564/why-must-the-jdbc-driver-be-put-in-tomcat-home-lib-folder -->
138
        <exclusion>
139
          <groupId>eu.etaxonomy</groupId>
140
          <artifactId>cdmlib-db</artifactId>
141
        </exclusion>
142
      </exclusions>
143
    </dependency>
144
    <dependency>
145
      <groupId>commons-io</groupId>
146
      <artifactId>commons-io</artifactId>
147
    </dependency>
148
    <dependency>
149
      <groupId>eu.etaxonomy</groupId>
150
      <artifactId>cdmlib-test</artifactId>
151
      <scope>test</scope>
152
    </dependency>
153
    <dependency>
154
      <!-- TODO this is also offered by cdmlib-remote, can it be removed? 
155
        What does provided mean? -->
156
      <groupId>javax.servlet</groupId>
157
      <artifactId>javax.servlet-api</artifactId>
158
      <scope>provided</scope>
159
    </dependency>
160

    
161
    <dependency>
162
      <groupId>xmlunit</groupId>
163
      <artifactId>xmlunit</artifactId>
164
    </dependency>
165
    <!-- JsonView -->
166
    <!-- -->
167
    <dependency>
168
      <groupId>org.springframework</groupId>
169
      <artifactId>spring-oxm</artifactId>
170
    </dependency>
171

    
172
    <!-- XmlView -->
173
    <dependency>
174
      <!-- this is also offered by cdmlib-remote. Can it be removed? -->
175
      <groupId>com.thoughtworks.xstream</groupId>
176
      <artifactId>xstream</artifactId>
177
      <exclusions>
178
        <!-- https://stackoverflow.com/questions/17077922/maven-xpp3-versus-xpp3-min -->
179
        <!-- But maybe we can exclude xpp3 instead, not sure if it is directly needed or only for xstream -->
180
        <exclusion>
181
            <groupId>xpp3</groupId>
182
            <artifactId>xpp3_min</artifactId>
183
        </exclusion>
184
      </exclusions>
185
    </dependency>
186
    <dependency>
187
      <groupId>xpp3</groupId>
188
      <artifactId>xpp3</artifactId>
189
    </dependency>
190
    <dependency>
191
      <groupId>stax</groupId>
192
      <artifactId>stax</artifactId>
193
    </dependency>
194

    
195
    <!-- JSP TAG LIBS -->
196
    <dependency>
197
      <groupId>taglibs</groupId>
198
      <artifactId>standard</artifactId>
199
      <version>1.1.2</version>
200
    </dependency>
201
    <dependency>
202
      <groupId>taglibs</groupId>
203
      <artifactId>x</artifactId>
204
      <version>1.1.2</version>
205
      <type>tld</type>
206
    </dependency>
207
    <!-- swagger -->
208
    <dependency>
209
      <groupId>io.springfox</groupId>
210
      <artifactId>springfox-swagger2</artifactId>
211
      <scope>test</scope>
212
    </dependency>
213
    <!-- dependencies for springfox-swagger2, added explicitly to pin the 
214
      version these dependencies are also required by the cdmlib! -->
215
    <dependency>
216
      <groupId>com.fasterxml.jackson.core</groupId>
217
      <artifactId>jackson-databind</artifactId>
218
    </dependency>
219
    <dependency>
220
      <groupId>com.fasterxml.jackson.core</groupId>
221
      <artifactId>jackson-core</artifactId>
222
    </dependency>
223
    <dependency>
224
      <groupId>com.fasterxml.jackson.core</groupId>
225
      <artifactId>jackson-annotations</artifactId>
226
    </dependency>
227
    <!-- END of dependencies for swagger-springmvc, added explicitely -->
228

    
229
    <!-- testing -->
230
    <dependency>
231
      <groupId>junit</groupId>
232
      <artifactId>junit</artifactId>
233
      <scope>test</scope>
234
    </dependency>
235

    
236
    <!-- Connection Pooling and jdbc -->
237
    <dependency>
238
      <groupId>org.hibernate</groupId>
239
      <artifactId>hibernate-c3p0</artifactId>
240
      <scope>test</scope>
241
    </dependency>
242
    <!-- <dependency> -->
243
    <!-- <groupId>com.mchange</groupId> -->
244
    <!-- <artifactId>c3p0</artifactId> -->
245
    <!-- <scope>test</scope> -->
246
    <!-- </dependency> -->
247
    <!-- Profiling -->
248
    <dependency>
249
      <groupId>com.yourkit</groupId>
250
      <artifactId>yjp-controller-api-redist</artifactId>
251
      <scope>test</scope>
252
    </dependency>
253
  </dependencies>
254

    
255
  <build>
256
    <resources>
257
      <resource>
258
        <!-- replace the place holders like ${...} in datasources.xml -->
259
        <filtering>true</filtering>
260
        <directory>src/test/resources</directory>
261
        <targetPath>../test-classes</targetPath>
262
        <includes>
263
          <include>datasources.xml</include>
264
        </includes>
265
      </resource>
266
      <resource>
267
        <!-- all other test resources without filtering -->
268
        <directory>src/test/resources</directory>
269
        <targetPath>../test-classes</targetPath>
270
        <excludes>
271
          <exclude>datasources.xml</exclude>
272
        </excludes>
273
      </resource>
274
      <resource>
275
        <!-- all main resources without filtering -->
276
        <directory>src/main/resources</directory>
277
      </resource>
278
    </resources>
279
    <plugins>
280
      <plugin>
281
        <artifactId>maven-failsafe-plugin</artifactId>
282
        <version>2.16</version>
283
        <!-- configuration per maven profile -->
284
        
285
<!--         <configuration> -->
286
<!--           <forkCount>3</forkCount> -->
287
<!--           <reuseForks>true</reuseForks> -->
288
<!--         </configuration> -->
289
<!--         <executions> -->
290
<!--           <execution> -->
291
<!--             <id>default</id> -->
292
<!--             <goals> -->
293
<!--               <goal>integration-test</goal> -->
294
<!--               <goal>verify</goal> -->
295
<!--             </goals> -->
296
<!--             <configuration> -->
297
<!--               <systemPropertyVariables> -->
298
<!--                 <cdm.datasource>h2_cdmTest</cdm.datasource> -->
299
<!--               </systemPropertyVariables> -->
300
<!--               <excludes> -->
301
<!--                 <exclude>**/ForceSchemaCreateIT.java</exclude> -->
302
<!--               </excludes> -->
303
<!--             </configuration> -->
304
<!--           </execution> -->
305
<!--         </executions> -->
306
      </plugin>
307
      <plugin>
308
        <groupId>org.eclipse.jetty</groupId>
309
        <artifactId>jetty-maven-plugin</artifactId>
310
        <version>9.4.15.v20190215</version>
311
        <configuration>
312
          <stopKey>stop</stopKey>
313
          <stopPort>9199</stopPort>
314
          <scanIntervalSeconds>10</scanIntervalSeconds>
315
          <useTestScope>true</useTestScope>
316
          <!-- jvmArgs will only be used when running mvn jetty:run-forked -->
317
          <jvmArgs>-Xmx2000M 
318
            -Dcdm.datasource=${integrationTest.jvmArgs.cdm.datasource}
319
            -Duser.home=${basedir}/target/target/
320
            -Dcdm.beanDefinitionFile=${project.build.directory}/test-classes/datasources.xml
321
            -Dspring.profiles.active=remoting
322
            -Dcdm.forceSchemaCreate=${integrationTest.jvmArgs.cdm.forceSchemaCreate}
323
            -Dlog4j.configuration=${integrationTest.jvmArgs.log4j.configuration}
324
            -Dorg.eclipse.jetty.annotations.AnnotationParser.LEVEL=OFF
325
           </jvmArgs>
326
          <jettyXml>${basedir}/src/test/resources/etc/jetty/jetty.xml,${basedir}/src/test/resources/etc/jetty/jetty-http.xml</jettyXml>
327
          <!-- <jettyXml>./src/test/resources/etc/jetty/jetty.xml,./src/test/resources/etc/jetty/jetty-http.xml,./src/test/resources/etc/jetty/jetty-ssl.xml,./src/test/resources/etc/jetty/jetty-https.xml</jettyXml> -->
328
          <systemProperties>
329
            <force>true</force>
330
            <systemProperty>
331
              <name>cdm.datasource</name>
332
              <value>${integrationTest.jvmArgs.cdm.datasource}</value>
333
            </systemProperty>
334
            <systemProperty>
335
              <!-- The lucene index should be placed into the target folder, 
336
                so user.home needs to be set to this folder. user.home needs to be overridden 
337
                since it already exists, thus the force option is turned on above -->
338
              <name>user.home</name>
339
              <value>${basedir}/target/</value>
340
            </systemProperty>
341
            <systemProperty>
342
              <!-- datasources.xml is prepared by <plugins><resources>..</resources> above -->
343
              <name>cdm.beanDefinitionFile</name>
344
              <value>${project.build.directory}/test-classes/datasources.xml</value>
345
            </systemProperty>
346
            <systemProperty>
347
                <name>cdm.forceSchemaCreate</name>
348
                <value>${integrationTest.jvmArgs.cdm.forceSchemaCreate}</value>
349
            </systemProperty>
350
            <systemProperty>
351
              <!-- start with swagger profile so that the swagger doc can 
352
                be generated -->
353
              <name>spring.profiles.active</name>
354
              <value>swagger</value>
355
            </systemProperty>
356
            <systemProperty>
357
                <name>log4j.configuration</name>
358
                <value>${integrationTest.jvmArgs.log4j.configuration}</value>
359
            </systemProperty>
360
          </systemProperties>
361
        </configuration>
362
        <executions>
363
          <execution>
364
            <id>start-jetty</id>
365
            <phase>pre-integration-test</phase>
366
            <goals>
367
              <goal>start</goal>
368
            </goals>
369
            <configuration>
370
              <scanIntervalSeconds>0</scanIntervalSeconds>
371
              <daemon>true</daemon>
372
            </configuration>
373
          </execution>
374
          <execution>
375
            <id>stop-jetty</id>
376
            <phase>post-integration-test</phase>
377
            <goals>
378
              <goal>stop</goal>
379
            </goals>
380
          </execution>
381
        </executions>
382
        <dependencies>
383
            <dependency>
384
                <groupId>org.apache.taglibs</groupId>
385
                <artifactId>taglibs-standard-impl</artifactId>
386
                <version>1.2.5</version>
387
            </dependency>
388
        </dependencies>
389
      </plugin>
390
      <plugin>
391
        <groupId>org.apache.maven.plugins</groupId>
392
        <artifactId>maven-war-plugin</artifactId>
393
        <version>2.6</version>
394
        <executions>
395
          <execution>
396
            <!-- The war must be created after running the integration-tests, 
397
              since the SwaggerGroupsIT test populates the classes/api-docs-static/ folder 
398
              with static swagger doc files. They are otherwise not packed into the war 
399
              file. -->
400
            <phase>verify</phase>
401
            <goals>
402
              <goal>war</goal>
403
            </goals>
404
          </execution>
405
        </executions>
406
      </plugin>
407
      <plugin>
408
        <artifactId>maven-resources-plugin</artifactId>
409
        <version>2.7</version>
410
        <configuration>
411
          <escapeWindowsPaths>false</escapeWindowsPaths>
412
        </configuration>
413
      </plugin>
414
    </plugins>
415
  </build>
416
</project>
Add picture from clipboard (Maximum size: 40 MB)