Statistics
| Branch: | Revision:

m2u-upass-ws / pom.xml @ 123:2bd7574cf669

History | View | Annotate | Download (26.6 KB)

1
<?xml version="1.0"?>
2
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3
        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4

    
5
        <modelVersion>4.0.0</modelVersion>
6

    
7
        <groupId>net.penril</groupId>
8
        <artifactId>m2u-upass-ws</artifactId>
9
        <version>2.0-SNAPSHOT</version>
10
        <packaging>war</packaging>
11
        <name>M2U UPass Web Services</name>
12
        <properties>
13
                <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
14
                <cobertura.version>1.9.4.1</cobertura.version>
15
                <config.postfix />
16
                <tomcat.home>/var/lib/jenkins/apache-tomcat-5.5.33</tomcat.home>
17
                <m2u-upass-classifier></m2u-upass-classifier>
18
        </properties>
19
        <pluginRepositories>
20
                <pluginRepository>
21
                        <id>eviwarePluginRepository</id>
22
                        <url>http://www.eviware.com/repository/maven2/</url>
23
                </pluginRepository>
24
        </pluginRepositories>
25
        <distributionManagement>
26
                <snapshotRepository>
27
                        <id>penril.nexus.repo</id>
28
                        <name>Penril Nexus Repo</name>
29
                        <url>scp://staging.penril.net/usr/share/tomcat5/sonatype-work/nexus/storage/snapshots</url>
30
                        <uniqueVersion>false</uniqueVersion>
31
                </snapshotRepository>
32
        </distributionManagement>
33
        <build>
34
                <pluginManagement>
35
                        <plugins>
36
                                <plugin>
37
                                        <groupId>org.codehaus.mojo</groupId>
38
                                        <artifactId>cobertura-maven-plugin</artifactId>
39
                                        <version>2.5.1</version>
40
                                </plugin>
41
                                <plugin>
42
                                        <groupId>org.apache.maven.plugins</groupId>
43
                                        <artifactId>maven-antrun-plugin</artifactId>
44
                                        <version>1.6</version>
45
                                </plugin>
46
                                <plugin>
47
                                        <groupId>org.mortbay.jetty</groupId>
48
                                        <artifactId>maven-jetty-plugin</artifactId>
49
                                        <version>6.1.16</version>
50
                                        <configuration>
51
                                                <connectors>
52
                                                        <connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
53
                                                                <port>9090</port>
54
                                                                <maxIdleTime>60000</maxIdleTime>
55
                                                        </connector>
56
                                                </connectors>
57
                                                <stopPort>9005</stopPort>
58
                                                <stopKey>STOP</stopKey>
59
                                                <contextPath>${project.artifactId}</contextPath>
60
                                                <jettyConfig>target/classes/jetty.xml</jettyConfig>
61
                                        </configuration>
62
                                </plugin>
63
                                <plugin>
64
                                        <groupId>org.glassfish</groupId>
65
                                        <artifactId>maven-embedded-glassfish-plugin</artifactId>
66
                                        <version>3.1.1</version>
67
                                        <configuration>
68
                                                <goalPrefix>embedded-glassfish</goalPrefix>
69
                                                <autoDelete>true</autoDelete>
70
                                                <ports>
71
                                                        <http-listener>9090</http-listener>
72
                                                        <https-listener>9093</https-listener>
73
                                                </ports>
74
                                                <contextRoot>${project.artifactId}</contextRoot>
75
                                        </configuration>
76
                                </plugin>
77
                        </plugins>
78
                </pluginManagement>
79
                <sourceDirectory>src</sourceDirectory>
80
                <resources>
81
                        <resource>
82
                                <directory>src</directory>
83
                                <excludes>
84
                                        <exclude>**/*.java</exclude>
85
                                </excludes>
86
                        </resource>
87
                        <resource>
88
                                <directory>resources</directory>
89
                        </resource>
90
                </resources>
91
                <testSourceDirectory>test/java</testSourceDirectory>
92
                <testResources>
93
                        <testResource>
94
                                <directory>test/resources</directory>
95
                        </testResource>
96
                </testResources>
97
                <plugins>
98
                        <plugin>
99
                                <groupId>org.apache.maven.plugins</groupId>
100
                                <artifactId>maven-war-plugin</artifactId>
101
                                <version>2.1.1</version>
102
                                <configuration>
103
                                        <warSourceDirectory>${basedir}/WebContent</warSourceDirectory>
104
                                </configuration>
105
                        </plugin>
106
                        <plugin>
107
                                <groupId>org.apache.maven.plugins</groupId>
108
                                <artifactId>maven-compiler-plugin</artifactId>
109
                                <version>2.3.2</version>
110
                                <configuration>
111
                                        <source>1.6</source>
112
                                        <target>1.6</target>
113
                                </configuration>
114
                        </plugin>
115
                        <plugin>
116
                                <artifactId>maven-failsafe-plugin</artifactId>
117
                                <version>2.6</version>
118
                                <executions>
119
                                        <execution>
120
                                                <goals>
121
                                                        <goal>integration-test</goal>
122
                                                        <goal>verify</goal>
123
                                                </goals>
124
                                        </execution>
125
                                </executions>
126
                                <dependencies>
127
                                        <dependency>
128
                                                <groupId>net.sourceforge.cobertura</groupId>
129
                                                <artifactId>cobertura-runtime</artifactId>
130
                                                <version>${cobertura.version}</version>
131
                                                <!-- <scope>provided</scope> -->
132
                                                <scope>compile</scope>
133
                                                <type>pom</type>
134
                                        </dependency>
135
                                </dependencies>
136
                        </plugin>
137
                </plugins>
138
        </build>
139
        <profiles>
140
                <profile>
141
                        <id>env-staging-ci</id>
142
                        <activation>
143
                                <property>
144
                                        <name>env</name>
145
                                        <value>staging-ci</value>
146
                                </property>
147
                        </activation>
148
                        <properties>
149
                                <config.postfix>.staging-ci</config.postfix>
150
                        </properties>
151
                        <dependencies>
152
                                <dependency>
153
                                        <groupId>org.hibernate</groupId>
154
                                        <artifactId>hibernate-core</artifactId>
155
                                        <version>3.3.1.GA</version>
156
                                        <type>jar</type>
157
                                        <scope>compile</scope>
158
                                </dependency>
159
                                <dependency>
160
                                        <groupId>org.hibernate</groupId>
161
                                        <artifactId>hibernate-c3p0</artifactId>
162
                                        <version>3.3.1.GA</version>
163
                                </dependency>
164
                                <dependency>
165
                                        <groupId>axis</groupId>
166
                                        <artifactId>axis</artifactId>
167
                                        <version>1.4</version>
168
                                        <type>jar</type>
169
                                        <scope>compile</scope>
170
                                </dependency>
171
                        </dependencies>
172
                </profile>
173
                <profile>
174
                        <id>self-test</id>
175
                        <build>
176
                                <plugins>
177
<!-- 
178
                                        <plugin>
179
                                                <groupId>org.mortbay.jetty</groupId>
180
                                                <artifactId>maven-jetty-plugin</artifactId>
181
                                                <configuration>
182
                                                        <webAppSourceDirectory>${basedir}/WebContent</webAppSourceDirectory>
183
                                                        <classesDirectory>${project.build.directory}/generated-classes/cobertura</classesDirectory>
184
                                                </configuration>
185
                                                <executions>
186
                                                        <execution>
187
                                                                <id>start-jetty</id>
188
                                                                <phase>pre-integration-test</phase>
189
                                                                <goals>
190
                                                                        <goal>run</goal>
191
                                                                </goals>
192
                                                                <configuration>
193
                                                                        <scanIntervalSeconds>0</scanIntervalSeconds>
194
                                                                        <daemon>true</daemon>
195
                                                                </configuration>
196
                                                        </execution>
197
                                                        <execution>
198
                                                                <id>stop-jetty</id>
199
                                                                <phase>post-integration-test</phase>
200
                                                                <goals>
201
                                                                        <goal>stop</goal>
202
                                                                </goals>
203
                                                        </execution>
204
                                                </executions>
205
                                                <dependencies>
206
                                                        <dependency>
207
                                                                <groupId>net.sourceforge.cobertura</groupId>
208
                                                                <artifactId>cobertura-runtime</artifactId>
209
                                                                <version>${cobertura.version}</version>
210
                                                                <scope>compile</scope>
211
                                                                <type>pom</type>
212
                                                        </dependency>
213
                                                </dependencies>
214
                                        </plugin>
215
 -->
216
                                        <plugin>
217
                                                <groupId>org.glassfish</groupId>
218
                                                <artifactId>maven-embedded-glassfish-plugin</artifactId>
219
                                                <configuration>
220
                                                        <app>${project.build.directory}/${project.artifactId}-${project.version}-${m2u-upass-classifier}.war</app>
221
                                                        <!-- <app>${project.build.directory}/${project.artifactId}-${project.version}</app> -->
222
                                                </configuration>
223
                                                <executions>
224
                                                        <execution>
225
                                                                <id>start-glassfish</id>
226
                                                                <phase>pre-integration-test</phase>
227
                                                                <goals>
228
                                                                        <goal>start</goal>
229
                                                                </goals>
230
                                                        </execution>
231
                                                        <execution>
232
                                                                <id>glassfish-deploy</id>
233
                                                                <phase>pre-integration-test</phase>
234
                                                                <goals>
235
                                                                        <goal>deploy</goal>
236
                                                                </goals>
237
                                                        </execution>
238
                                                        <!--
239
                                                         <execution>
240
                                                                <id>glassfish-undeploy</id>
241
                                                                <phase>post-integration-test</phase>
242
                                                                <goals>
243
                                                                        <goal>undeploy</goal>
244
                                                                </goals>
245
                                                        </execution>
246
                                                        <execution>
247
                                                                <id>stop-glassfish</id>
248
                                                                <phase>post-integration-test</phase>
249
                                                                <goals>
250
                                                                        <goal>stop</goal>
251
                                                                </goals>
252
                                                        </execution>
253
                                                         -->
254
                                                </executions>
255
                                                <dependencies>
256
                                                        <dependency>
257
                                                                <groupId>net.sourceforge.cobertura</groupId>
258
                                                                <artifactId>cobertura-runtime</artifactId>
259
                                                                <version>${cobertura.version}</version>
260
                                                                <!-- <scope>provided</scope> -->
261
                                                                <scope>compile</scope>
262
                                                                <type>pom</type>
263
                                                        </dependency>
264
                                                </dependencies>
265
                                        </plugin>
266
                                        <plugin>
267
                                                <artifactId>maven-surefire-plugin</artifactId>
268
                                                <configuration>
269
                                                        <classesDirectory>${project.build.directory}/generated-classes/cobertura</classesDirectory>
270
                                                        <forkMode>none</forkMode>
271
                                                </configuration>
272
                                        </plugin>
273
                                        <plugin>
274
                                                <groupId>eviware</groupId>
275
                                                <artifactId>maven-soapui-plugin</artifactId>
276
                                                <version>4.5.1</version>
277
                                                <executions>
278
                                                        <execution>
279
                                                                <id>UPassWsTests</id>
280
                                                                <goals>
281
                                                                        <goal>test</goal>
282
                                                                </goals>
283
                                                                <phase>integration-test</phase>
284
                                                                <configuration>
285
                                                                        <projectFile>${basedir}/test/soap-ui/UPass-soapui-project.xml</projectFile>
286
<!--                                                                         
287
                                                                        <projectProperties>
288
                                                                                <projectProperty>invokerUsername=UpassAdmin</projectProperty>
289
                                                                                <projectProperty>invokerPassword=password</projectProperty>
290
                                                                        </projectProperties>
291
 -->
292
                                                                </configuration>
293
                                                        </execution>
294
                                                        <execution>
295
                                                                <id>MaybankFacadeTests</id>
296
                                                                <goals>
297
                                                                        <goal>test</goal>
298
                                                                </goals>
299
                                                                <phase>integration-test</phase>
300
                                                                <configuration>
301
                                                                        <projectFile>${basedir}/test/soap-ui/MaybankFacade-soapui-project.xml</projectFile>
302
                                                                </configuration>
303
                                                        </execution>
304
                                                </executions>
305
                                                <configuration>
306
                                                        <host>localhost</host>
307
                                                        <!-- <port>8080</port> -->
308
                                                        <port>9090</port>
309
                                                        <outputFolder>${project.build.directory}/surefire-reports</outputFolder>
310
                                                        <junitReport>true</junitReport>
311
                                                        <printReport>false</printReport>
312
                                                </configuration>
313
                                        </plugin>
314
                                </plugins>
315
                        </build>
316
                </profile>
317
                <profile>
318
                        <id>env-ant</id>
319
                        <activation>
320
                                <property>
321
                                        <name>env</name>
322
                                </property>
323
                        </activation>
324
                        <build>
325
                                <plugins>
326
                                        <plugin>
327
                                                <artifactId>maven-antrun-plugin</artifactId>
328
                                                <executions>
329
                                                        <execution>
330
                                                                <id>env-config</id>
331
                                                                <phase>process-resources</phase>
332
                                                                <configuration>
333
                                                                        <target>
334
                                                                                <delete file="${project.build.outputDirectory}/upassMin.properties" />
335
                                                                                <copy file="resources/upassMin${config.postfix}.properties" tofile="${project.build.outputDirectory}/upassMin.properties" />
336

    
337
                                                                                <delete>
338
                                                                                        <fileset dir="${project.build.outputDirectory}" includes="upassMin.*.properties" />
339
                                                                                </delete>
340
                                                                                <delete file="${project.build.outputDirectory}/hibernate.cfg.xml" />
341
                                                                                <copy file="resources/hibernate${config.postfix}.cfg.xml" tofile="${project.build.outputDirectory}/hibernate.cfg.xml" />
342

    
343
                                                                                <delete>
344
                                                                                        <fileset dir="${project.build.outputDirectory}" includes="hibernate.*.cfg.xml" />
345
                                                                                </delete>
346

    
347
                                                                                <delete file="${project.build.outputDirectory}/spring-ldap.xml" />
348
                                                                                <copy file="resources/spring-ldap${config.postfix}.xml" tofile="${project.build.outputDirectory}/spring-ldap.xml" />
349
                                                                                <delete>
350
                                                                                        <fileset dir="${project.build.outputDirectory}" includes="spring-ldap.*.xml" />
351
                                                                                </delete>
352

    
353
                                                                                <delete file="${project.build.outputDirectory}/log4j.xml" />
354
                                                                                <copy file="resources/log4j${config.postfix}.xml" tofile="${project.build.outputDirectory}/log4j.xml" />
355

    
356
                                                                                <delete>
357
                                                                                        <fileset dir="${project.build.outputDirectory}" includes="log4j.*.xml" />
358
                                                                                </delete>
359
                                                                        </target>
360
                                                                </configuration>
361
                                                                <goals>
362
                                                                        <goal>run</goal>
363
                                                                </goals>
364
                                                        </execution>
365
                                                </executions>
366
                                        </plugin>
367
                                </plugins>
368
                        </build>
369
                </profile>
370
                <profile>
371
                        <id>env-dev-penril</id>
372
                        <activation>
373
                                <property>
374
                                        <name>env</name>
375
                                        <value>dev-penril</value>
376
                                </property>
377
                        </activation>
378
                        <properties>
379
                                <config.postfix>.dev-penril</config.postfix>
380
                        </properties>
381
                        <dependencies>
382
                                <dependency>
383
                                        <groupId>org.hibernate</groupId>
384
                                        <artifactId>hibernate-core</artifactId>
385
                                        <version>3.3.1.GA</version>
386
                                        <type>jar</type>
387
                                        <scope>compile</scope>
388
                                </dependency>
389
                                <dependency>
390
                                        <groupId>axis</groupId>
391
                                        <artifactId>axis</artifactId>
392
                                        <version>1.4</version>
393
                                        <type>jar</type>
394
                                        <scope>compile</scope>
395
                                </dependency>
396
                        </dependencies>
397
                </profile>
398
                <profile>
399
                        <id>env-maybank-dev</id>
400
                        <activation>
401
                                <property>
402
                                        <name>env</name>
403
                                        <value>maybank-dev</value>
404
                                </property>
405
                        </activation>
406
                        <properties>
407
                                <config.postfix>.maybank-dev</config.postfix>
408
                        </properties>
409
                        <dependencies>
410
                                <dependency>
411
                                        <groupId>org.hibernate</groupId>
412
                                        <artifactId>hibernate-core</artifactId>
413
                                        <version>3.3.1.GA</version>
414
                                        <type>jar</type>
415
                                        <scope>compile</scope>
416
                                        <exclusions>
417
                                                <exclusion>
418
                                                        <groupId>xml-apis</groupId>
419
                                                        <artifactId>xml-apis</artifactId>
420
                                                </exclusion>
421
                                        </exclusions>
422
                                </dependency>
423
                                <dependency>
424
                                        <groupId>org.hibernate</groupId>
425
                                        <artifactId>hibernate-c3p0</artifactId>
426
                                        <version>3.3.1.GA</version>
427
                                </dependency>
428
                                <dependency>
429
                                        <groupId>axis</groupId>
430
                                        <artifactId>axis</artifactId>
431
                                        <version>1.4</version>
432
                                        <type>jar</type>
433
                                        <scope>compile</scope>
434
                                        <exclusions>
435
                                                <exclusion>
436
                                                        <artifactId>axis-jaxrpc</artifactId>
437
                                                        <groupId>org.apache.axis</groupId>
438
                                                </exclusion>
439
                                                <exclusion>
440
                                                        <artifactId>axis-saaj</artifactId>
441
                                                        <groupId>org.apache.axis</groupId>
442
                                                </exclusion>
443
                                        </exclusions>
444
                                </dependency>
445
                        </dependencies>
446
                </profile>
447
                <profile>
448
                        <id>env-maybank-prod</id>
449
                        <activation>
450
                                <property>
451
                                        <name>env</name>
452
                                        <value>maybank-prod</value>
453
                                </property>
454
                        </activation>
455
                        <properties>
456
                                <config.postfix>.maybank-prod</config.postfix>
457
                        </properties>
458
                        <dependencies>
459
                                <dependency>
460
                                        <groupId>org.hibernate</groupId>
461
                                        <artifactId>hibernate-core</artifactId>
462
                                        <version>3.3.1.GA</version>
463
                                        <type>jar</type>
464
                                        <scope>compile</scope>
465
                                        <exclusions>
466
                                                <exclusion>
467
                                                        <groupId>xml-apis</groupId>
468
                                                        <artifactId>xml-apis</artifactId>
469
                                                </exclusion>
470
                                        </exclusions>
471
                                </dependency>
472
                                <dependency>
473
                                        <groupId>org.hibernate</groupId>
474
                                        <artifactId>hibernate-c3p0</artifactId>
475
                                        <version>3.3.1.GA</version>
476
                                </dependency>
477
                                <dependency>
478
                                        <groupId>axis</groupId>
479
                                        <artifactId>axis</artifactId>
480
                                        <version>1.4</version>
481
                                        <type>jar</type>
482
                                        <scope>compile</scope>
483
                                        <exclusions>
484
                                                <exclusion>
485
                                                        <artifactId>axis-jaxrpc</artifactId>
486
                                                        <groupId>org.apache.axis</groupId>
487
                                                </exclusion>
488
                                                <exclusion>
489
                                                        <artifactId>axis-saaj</artifactId>
490
                                                        <groupId>org.apache.axis</groupId>
491
                                                </exclusion>
492
                                        </exclusions>
493
                                </dependency>
494
                        </dependencies>
495
                        <build>
496
                                <plugins>
497
                                        <plugin>
498
                                                <groupId>org.glassfish</groupId>
499
                                                <artifactId>maven-embedded-glassfish-plugin</artifactId>
500
                                                <configuration>
501
                                                        <app>${project.build.directory}/${project.artifactId}-${project.version}.war</app>
502
                                                </configuration>
503
                                        </plugin>
504
                                </plugins>
505
                        </build>
506
                </profile>
507
                <profile>
508
                        <id>cobertura-instrument</id>
509
                        <activation>
510
                                <property>
511
                                        <name>cobertura-build</name>
512
                                </property>
513
                        </activation>
514
                        <properties>
515
                                <m2u-upass-classifier>instrumented</m2u-upass-classifier>
516
                        </properties>
517
                        <distributionManagement>
518
                                <snapshotRepository>
519
                                        <id>penril.nexus.repo.coverage</id>
520
                                        <name>Penril Nexus Repo Coverage</name>
521
                                        <url>scp://staging.penril.net/usr/share/tomcat5/sonatype-work/nexus/storage/snapshots-coverage</url>
522
                                </snapshotRepository>
523
                        </distributionManagement>
524
                        <build>
525
                                <plugins>
526
                                        <plugin>
527
                                                <artifactId>maven-war-plugin</artifactId>
528
                                                <configuration>
529
                                                        <classifier>${m2u-upass-classifier}</classifier>
530
                                                        <packagingExcludes>WEB-INF/lib/m2u-upass-*SNAPSHOT.jar</packagingExcludes>
531
                                                </configuration>
532
                                        </plugin>
533
                                        <plugin>
534
                                                <groupId>org.codehaus.mojo</groupId>
535
                                                <artifactId>cobertura-maven-plugin</artifactId>
536
                                                <configuration>
537
                                                        <formats>
538
                                                                <format>html</format>
539
                                                                <format>xml</format>
540
                                                        </formats>
541

    
542
                                                        <!-- TODO: To be configured... -->
543
                                                        <instrumentation>
544
                                                                <ignores>
545
                                                                        <ignore>com.example.boringcode.*</ignore>
546
                                                                </ignores>
547
                                                                <excludes>
548
                                                                        <exclude>com/example/dullcode/**/*.class</exclude>
549
                                                                        <exclude>com/example/**/*Test.class</exclude>
550
                                                                </excludes>
551
                                                        </instrumentation>
552

    
553
                                                        <!-- TODO: To be configured... -->
554
                                                        <check>
555
                                                                <branchRate>85</branchRate>
556
                                                                <lineRate>85</lineRate>
557
                                                                <haltOnFailure>true</haltOnFailure>
558
                                                                <totalBranchRate>85</totalBranchRate>
559
                                                                <totalLineRate>85</totalLineRate>
560
                                                                <packageLineRate>85</packageLineRate>
561
                                                                <packageBranchRate>85</packageBranchRate>
562
                                                                <regexes>
563
                                                                        <regex>
564
                                                                                <pattern>com.example.reallyimportant.*</pattern>
565
                                                                                <branchRate>90</branchRate>
566
                                                                                <lineRate>80</lineRate>
567
                                                                        </regex>
568
                                                                        <regex>
569
                                                                                <pattern>com.example.boringcode.*</pattern>
570
                                                                                <branchRate>40</branchRate>
571
                                                                                <lineRate>30</lineRate>
572
                                                                        </regex>
573
                                                                </regexes>
574
                                                        </check>
575
                                                </configuration>
576
                                                <executions>
577
                                                        <execution>
578
                                                                <id>instrument-code</id>
579
                                                                <phase>process-classes</phase>
580
                                                                <goals>
581
                                                                        <goal>instrument</goal>
582
                                                                </goals>
583
                                                                <configuration>
584
                                                                        <attach>true</attach>
585
                                                                </configuration>
586
                                                        </execution>
587
                                                </executions>
588
                                        </plugin>
589
                                        <plugin>
590
                                                <artifactId>maven-source-plugin</artifactId>
591
                                                <executions>
592
                                                        <execution>
593
                                                                <id>attach-sources</id>
594
                                                                <goals>
595
                                                                        <goal>jar</goal>
596
                                                                </goals>
597
                                                        </execution>
598
                                                </executions>
599
                                                <inherited>true</inherited>
600
                                        </plugin>
601
                                </plugins>
602
                        </build>
603
                        <dependencies>
604
                                <dependency>
605
                                        <groupId>net.sourceforge.cobertura</groupId>
606
                                        <artifactId>cobertura-runtime</artifactId>
607
                                        <version>${cobertura.version}</version>
608
                                        <!-- <scope>provided</scope> -->
609
                                        <scope>compile</scope>
610
                                        <type>pom</type>
611
                                </dependency>
612
                        </dependencies>
613
                </profile>
614
                <profile>
615
                        <id>custom-war-deploy</id>
616
                        <activation>
617
                                <property>
618
                                        <name>custom-war-deploy</name>
619
                                </property>
620
                        </activation>
621
                        <build>
622
                                <plugins>
623
                                        <plugin>
624
                                                <artifactId>maven-antrun-plugin</artifactId>
625
                                                <executions>
626
                                                        <execution>
627
                                                                <id>tomcat-deployment</id>
628
                                                                <phase>install</phase>
629
                                                                <configuration>
630
                                                                        <target>
631
                                                                                <!-- <echo>Shutting down the Tomcat</echo> <exec dir="${tomcat.home}/bin" 
632
                                                                                        executable="${tomcat.home}/bin/shutdown.sh" /> -->
633
                                                                                <copy file="${basedir}/target/${project.artifactId}-${project.version}.war" tofile="${tomcat.home}/webapps/${project.artifactId}.war"
634
                                                                                        overwrite="true" />
635
                                                                                <!-- <echo>Starting up the Tomcat</echo> <exec dir="${tomcat.home}/bin" 
636
                                                                                        executable="${tomcat.home}/bin/startup.sh" /> -->
637
                                                                        </target>
638
                                                                </configuration>
639
                                                                <goals>
640
                                                                        <goal>run</goal>
641
                                                                </goals>
642
                                                        </execution>
643
                                                </executions>
644
                                        </plugin>
645
                                </plugins>
646
                        </build>
647
                </profile>
648
                <profile>
649
                        <id>load-test</id>
650
                        <build>
651
                                <plugins>
652
                                        <plugin>
653
                                                <groupId>org.mortbay.jetty</groupId>
654
                                                <artifactId>maven-jetty-plugin</artifactId>
655
                                                <configuration>
656
                                                        <webAppSourceDirectory>${basedir}/WebContent</webAppSourceDirectory>
657
                                                        <classesDirectory>${project.build.directory}/classes</classesDirectory>
658
                                                        <daemon>true</daemon>
659
                                                </configuration>
660
                                        </plugin>
661
                                        <plugin>
662
                                                <groupId>org.glassfish</groupId>
663
                                                <artifactId>maven-embedded-glassfish-plugin</artifactId>
664
                                                <configuration>
665
                                                        <app>${project.build.directory}/${project.artifactId}-${project.version}-${m2u-upass-classifier}.war</app>
666
                                                </configuration>
667
                                                <executions>
668
                                                        <execution>
669
                                                                <id>start-glassfish</id>
670
                                                                <phase>pre-integration-test</phase>
671
                                                                <goals>
672
                                                                        <goal>start</goal>
673
                                                                </goals>
674
                                                        </execution>
675
                                                        <execution>
676
                                                                <id>glassfish-deploy</id>
677
                                                                <phase>pre-integration-test</phase>
678
                                                                <goals>
679
                                                                        <goal>deploy</goal>
680
                                                                </goals>
681
                                                        </execution>
682
                                                        <execution>
683
                                                                <id>glassfish-undeploy</id>
684
                                                                <phase>post-integration-test</phase>
685
                                                                <goals>
686
                                                                        <goal>undeploy</goal>
687
                                                                </goals>
688
                                                        </execution>
689
                                                        <execution>
690
                                                                <id>stop-glassfish</id>
691
                                                                <phase>post-integration-test</phase>
692
                                                                <goals>
693
                                                                        <goal>stop</goal>
694
                                                                </goals>
695
                                                        </execution>
696
                                                </executions>
697
                                                <dependencies>
698
                                                        <dependency>
699
                                                                <groupId>net.sourceforge.cobertura</groupId>
700
                                                                <artifactId>cobertura-runtime</artifactId>
701
                                                                <version>${cobertura.version}</version>
702
                                                                <!-- <scope>provided</scope> -->
703
                                                                <scope>compile</scope>
704
                                                                <type>pom</type>
705
                                                        </dependency>
706
                                                </dependencies>
707
                                        </plugin>
708
                                        <plugin>
709
                                                <artifactId>maven-antrun-plugin</artifactId>
710
                                                <executions>
711
                                                        <execution>
712
                                                                <phase>process-resources</phase>
713
                                                                <configuration>
714
                                                                        <target>
715
                                                                                <echo message="Creating a directory required by our JMeter test plan." />
716
                                                                                <mkdir dir="${basedir}/target/jmeter/responses/add" />
717
                                                                                <mkdir dir="${basedir}/target/jmeter/responses/auth" />
718
                                                                        </target>
719
                                                                </configuration>
720
                                                                <goals>
721
                                                                        <goal>run</goal>
722
                                                                </goals>
723
                                                        </execution>
724
                                                </executions>
725
                                        </plugin>
726
                                        <plugin>
727
                                                <groupId>org.codehaus.mojo</groupId>
728
                                                <artifactId>exec-maven-plugin</artifactId>
729
                                                <executions>
730
                                                        <execution>
731
                                                                <id>upass-load-test</id>
732
                                                                <phase>integration-test</phase>
733
                                                                <goals>
734
                                                                        <goal>exec</goal>
735
                                                                </goals>
736
                                                                <configuration>
737
                                                                        <executable>${JMETER_HOME}/bin/jmeter.sh</executable>
738
                                                                        <arguments>
739
                                                                                <argument>-n</argument>
740
                                                                                <argument>-t</argument>
741
                                                                                <argument>${basedir}/test/jmeter/UPass-test-plan.jmx</argument>
742
                                                                                <argument>-l</argument>
743
                                                                                <argument>${project.build.directory}/jmeter/result.jtl</argument>
744
                                                                                <argument>-J</argument>
745
                                                                                <argument>jmeter.save.saveservice.output_format=xml</argument>
746
                                                                                <argument>-J</argument>
747
                                                                                <argument>jmeter.save.saveservice.thread_counts=true</argument>
748
                                                                                <argument>-j</argument>
749
                                                                                <argument>${project.build.directory}/jmeter/jmeter.log</argument>
750
                                                                        </arguments>
751
                                                                </configuration>
752
                                                        </execution>
753
                                                        <execution>
754
                                                                <id>maybank-load-test</id>
755
                                                                <phase>integration-test</phase>
756
                                                                <goals>
757
                                                                        <goal>exec</goal>
758
                                                                </goals>
759
                                                                <configuration>
760
                                                                        <executable>${JMETER_HOME}/bin/jmeter.sh</executable>
761
                                                                        <arguments>
762
                                                                                <argument>-n</argument>
763
                                                                                <argument>-t</argument>
764
                                                                                <argument>${basedir}/test/jmeter/Maybank-facade-test-plan.jmx</argument>
765
                                                                                <argument>-l</argument>
766
                                                                                <argument>${project.build.directory}/jmeter/resultMaybank.jtl</argument>
767
                                                                                <argument>-J</argument>
768
                                                                                <argument>jmeter.save.saveservice.output_format=xml</argument>
769
                                                                                <argument>-J</argument>
770
                                                                                <argument>jmeter.save.saveservice.thread_counts=true</argument>
771
                                                                                <argument>-j</argument>
772
                                                                                <argument>${project.build.directory}/jmeter/jmeterMaybank.log</argument>
773
                                                                        </arguments>
774
                                                                </configuration>
775
                                                        </execution>
776
                                                </executions>
777
                                        </plugin>
778
                                </plugins>
779
                        </build>
780
                        <dependencies>
781
                                <dependency>
782
                                        <groupId>axis</groupId>
783
                                        <artifactId>axis</artifactId>
784
                                        <version>1.4</version>
785
                                        <type>jar</type>
786
                                        <scope>compile</scope>
787
                                </dependency>
788
                        </dependencies>
789
                </profile>
790
                <profile>
791
                        <id>wstools</id>
792
                        <build>
793
                                <plugins>
794
                                        <plugin>
795
                                                <groupId>org.apache.maven.plugins</groupId>
796
                                                <artifactId>maven-antrun-plugin</artifactId>
797
                                                <executions>
798
                                                        <execution>
799
                                                                <phase>generate-resources</phase>
800
                                                                <configuration>
801
                                                                        <target>
802
                                                                                <mkdir dir="${project.build.directory}/wsdl" />
803
                                                                                <property name="compile_classpath" refid="maven.compile.classpath" />
804
                                                                                <taskdef name="wsgen" classname="com.sun.tools.ws.ant.WsGen" />
805
                                                                                <wsgen sei="my.com.upass.maybank.MaybankFacadeImpl" classpath="${compile_classpath}" genWsdl="true"
806
                                                                                        encoding="UTF-8" keep="false" verbose="true" inlineSchemas="false" resourcedestdir="${project.build.directory}/wsdl"
807
                                                                                        xendorsed="true" />
808
                                                                                <replace file="${project.build.directory}/wsdl/MaybankFacade.wsdl" token="REPLACE_WITH_ACTUAL_URL"
809
                                                                                        value="http://dummy.endpoint.url" />
810
                                                                        </target>
811
                                                                </configuration>
812
                                                                <goals>
813
                                                                        <goal>run</goal>
814
                                                                </goals>
815
                                                        </execution>
816
                                                </executions>
817
                                                <dependencies>
818
                                                        <dependency>
819
                                                                <groupId>com.sun.xml.ws</groupId>
820
                                                                <artifactId>jaxws-tools</artifactId>
821
                                                                <version>2.2.6</version>
822
                                                        </dependency>
823
                                                </dependencies>
824
                                        </plugin>
825
                                </plugins>
826
                        </build>
827
                </profile>
828
        </profiles>
829
        <dependencies>
830
                <dependency>
831
                        <groupId>junit</groupId>
832
                        <artifactId>junit</artifactId>
833
                        <version>3.8.1</version>
834
                        <scope>test</scope>
835
                </dependency>
836
                <dependency>
837
                        <groupId>net.penril</groupId>
838
                        <artifactId>m2u-upass-core</artifactId>
839
                        <version>2.0-SNAPSHOT</version>
840
                        <classifier>${m2u-upass-classifier}</classifier>
841
                        <exclusions>
842
                                <exclusion>
843
                                        <groupId>net.penril</groupId>
844
                                        <artifactId>m2u-upass-min</artifactId>
845
                                </exclusion>
846
                        </exclusions>
847
                </dependency>
848
                <dependency>
849
                        <groupId>net.penril</groupId>
850
                        <artifactId>m2u-upass-min</artifactId>
851
                        <version>2.0-SNAPSHOT</version>
852
                        <classifier>${m2u-upass-classifier}</classifier>
853
                        <exclusions>
854
                                <exclusion>
855
                                        <artifactId>xml-apis</artifactId>
856
                                        <groupId>xml-apis</groupId>
857
                                </exclusion>
858
                        </exclusions>
859
                </dependency>
860
                <dependency>
861
                        <groupId>commons-discovery</groupId>
862
                        <artifactId>commons-discovery</artifactId>
863
                        <version>0.2</version>
864
                        <type>jar</type>
865
                        <scope>compile</scope>
866
                </dependency>
867
                <dependency>
868
                        <groupId>commons-logging</groupId>
869
                        <artifactId>commons-logging</artifactId>
870
                        <version>1.1.1</version>
871
                        <type>jar</type>
872
                        <scope>compile</scope>
873
                </dependency>
874
                <dependency>
875
                        <groupId>wsdl4j</groupId>
876
                        <artifactId>wsdl4j</artifactId>
877
                        <version>1.6.2</version>
878
                        <type>jar</type>
879
                        <scope>compile</scope>
880
                </dependency>
881
                <dependency>
882
                        <groupId>commons-io</groupId>
883
                        <artifactId>commons-io</artifactId>
884
                        <version>1.4</version>
885
                </dependency>
886
                <dependency>
887
                        <groupId>net.sourceforge.cobertura</groupId>
888
                        <artifactId>cobertura-runtime</artifactId>
889
                        <version>${cobertura.version}</version>
890
                        <!-- <scope>provided</scope> -->
891
                        <scope>test</scope>
892
                        <type>pom</type>
893
                </dependency>
894
                <dependency>
895
                        <groupId>com.sun.jersey</groupId>
896
                        <artifactId>jersey-core</artifactId>
897
                        <version>1.8</version>
898
                        <scope>provided</scope>
899
                </dependency>
900
                <dependency>
901
                        <groupId>com.sun.jersey</groupId>
902
                        <artifactId>jersey-json</artifactId>
903
                        <version>1.8</version>
904
                        <scope>provided</scope>
905
                </dependency>
906
                <dependency>
907
                        <groupId>javax.servlet</groupId>
908
                        <artifactId>servlet-api</artifactId>
909
                        <version>2.4</version>
910
                        <scope>provided</scope>
911
                </dependency>
912
                <dependency>
913
                        <groupId>javax.annotation</groupId>
914
                        <artifactId>jsr250-api</artifactId>
915
                        <version>1.0</version>
916
                        <scope>provided</scope>
917
                </dependency>
918
        </dependencies>
919
</project>