Revision 122:464d27830931 pom.xml

View differences:

pom.xml
1 1
<?xml version="1.0"?>
2 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">
3
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4 4

  
5 5
	<modelVersion>4.0.0</modelVersion>
6 6

  
7
	<name>M2U UPass Admin</name>
8 7
	<groupId>net.penril</groupId>
9 8
	<artifactId>m2u-upass-admin</artifactId>
10 9
	<version>2.0-SNAPSHOT</version>
11 10
	<packaging>war</packaging>
12

  
11
	<name>M2U UPass Admin</name>
13 12
	<properties>
14 13
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
15 14
		<cobertura.version>1.9.4.1</cobertura.version>
16
		<config.postfix></config.postfix>
15
		<config.postfix />
16
		<m2u-upass-classifier />
17 17
	</properties>
18 18
	<reporting>
19 19
		<plugins>
......
24 24
			</plugin>
25 25
		</plugins>
26 26
	</reporting>
27

  
27
	<distributionManagement>
28
		<snapshotRepository>
29
			<id>penril.nexus.repo</id>
30
			<name>Penril Nexus Repo</name>
31
			<url>scp://staging.penril.net/usr/share/tomcat5/sonatype-work/nexus/storage/snapshots</url>
32
			<uniqueVersion>false</uniqueVersion>
33
		</snapshotRepository>
34
	</distributionManagement>
28 35
	<build>
29
		<sourceDirectory>src</sourceDirectory>
30
		<resources>
31
			<resource>
32
				<directory>resource</directory>
33
			</resource>
34
		</resources>
35
		<testSourceDirectory>test</testSourceDirectory>
36
		<!-- <outputDirectory>${basedir}/WebContent/WEB-INF/classes</outputDirectory> -->
37 36
		<pluginManagement>
38 37
			<plugins>
39 38
				<plugin>
39
					<groupId>org.codehaus.mojo</groupId>
40
					<artifactId>cobertura-maven-plugin</artifactId>
41
					<version>2.5.1</version>
42
				</plugin>
43
				<plugin>
40 44
					<groupId>org.apache.maven.plugins</groupId>
41 45
					<artifactId>maven-antrun-plugin</artifactId>
42 46
					<version>1.6</version>
43
				</plugin> 
47
				</plugin>
48
				<plugin>
49
					<groupId>org.glassfish</groupId>
50
					<artifactId>maven-embedded-glassfish-plugin</artifactId>
51
					<version>3.1.1</version>
52
					<configuration>
53
						<goalPrefix>embedded-glassfish</goalPrefix>
54
						<autoDelete>true</autoDelete>
55
						<ports>
56
							<http-listener>9100</http-listener>
57
							<https-listener>9103</https-listener>
58
						</ports>
59
						<contextRoot>${project.artifactId}</contextRoot>
60
					</configuration>
61
				</plugin>
44 62
				<plugin>
45 63
					<groupId>org.apache.maven.plugins</groupId>
46 64
					<artifactId>maven-compiler-plugin</artifactId>
......
50 68
						<target>1.6</target>
51 69
					</configuration>
52 70
				</plugin>
53
				<plugin>
54
					<groupId>org.codehaus.mojo</groupId>
55
					<artifactId>cobertura-maven-plugin</artifactId>
56
					<version>2.5.1</version>
57
				</plugin>
58
			</plugins> 
71
			</plugins>
59 72
		</pluginManagement>
73
		<sourceDirectory>src</sourceDirectory>
74
		<resources>
75
			<resource>
76
				<directory>resource</directory>
77
			</resource>
78
		</resources>
79
		<testSourceDirectory>test</testSourceDirectory>
80
		<!-- <outputDirectory>${basedir}/WebContent/WEB-INF/classes</outputDirectory> -->
60 81
		<plugins>
61 82
			<plugin>
62 83
				<groupId>org.apache.maven.plugins</groupId>
......
67 88
				</configuration>
68 89
			</plugin>
69 90
			<plugin>
70
				<groupId>org.mortbay.jetty</groupId>
71
				<artifactId>maven-jetty-plugin</artifactId>
72
				<version>6.1.16</version>
91
				<groupId>org.apache.maven.plugins</groupId>
92
				<artifactId>maven-compiler-plugin</artifactId>
93
				<version>2.3.2</version>
73 94
				<configuration>
74
					<webAppSourceDirectory>${basedir}/WebContent</webAppSourceDirectory>
95
					<source>1.6</source>
96
					<target>1.6</target>
75 97
				</configuration>
76 98
			</plugin>
99
			<plugin>
100
				<artifactId>maven-failsafe-plugin</artifactId>
101
				<version>2.6</version>
102
				<executions>
103
					<execution>
104
						<goals>
105
							<goal>integration-test</goal>
106
							<goal>verify</goal>
107
						</goals>
108
					</execution>
109
				</executions>
110
				<configuration>
111
				<includes>
112
					<include>**/FirstTestWithSeleniumBuilder.java</include>
113
					<include>**/AnotherTestWithSeleniumBuilder.java</include>
114
				</includes>
115
				</configuration>
116
				<dependencies>
117
					<dependency>
118
						<groupId>net.sourceforge.cobertura</groupId>
119
						<artifactId>cobertura-runtime</artifactId>
120
						<version>${cobertura.version}</version>
121
						<!-- <scope>provided</scope> -->
122
						<scope>compile</scope>
123
						<type>pom</type>
124
					</dependency>
125
				</dependencies>
126
			</plugin>
77 127
		</plugins>
78 128
	</build>
129

  
130

  
131

  
79 132
	<profiles>
80 133
		<profile>
81
			<id>env-dev-penril</id>
134
			<id>env-staging-ci</id>
82 135
			<activation>
83 136
				<property>
84 137
					<name>env</name>
85
					<value>dev-penril</value>
138
					<value>staging-ci</value>
86 139
				</property>
87 140
			</activation>
88
			<distributionManagement>
89
				  <snapshotRepository>
90
					<id>penril.nexus.repo</id>
91
					<name>Penril Nexus Repo</name>
92
					<url>scp://staging.penril.net/usr/share/tomcat5/sonatype-work/nexus/storage/snapshots</url>
93
				  </snapshotRepository>
94
			</distributionManagement>
95 141
			<properties>
96
				<config.postfix>.dev-penril</config.postfix>
142
				<config.postfix>.staging-ci</config.postfix>
97 143
			</properties>
98
    	</profile>
144
			<build>
145
				<plugins>
146
					<plugin>
147
						<groupId>org.glassfish</groupId>
148
						<artifactId>maven-embedded-glassfish-plugin</artifactId>
149
						<configuration>
150
							<app>${project.build.directory}/${project.artifactId}-${project.version}-${m2u-upass-classifier}.war</app>
151
							<!-- <app>${project.build.directory}/${project.artifactId}-${project.version}</app> -->
152
						</configuration>
153
						<executions>
154
							<execution>
155
								<id>start-glassfish</id>
156
								<phase>pre-integration-test</phase>
157
								<goals>
158
									<goal>start</goal>
159
								</goals>
160
							</execution>
161
							<execution>
162
								<id>glassfish-deploy</id>
163
								<phase>pre-integration-test</phase>
164
								<goals>
165
									<goal>deploy</goal>
166
								</goals>
167
							</execution>
168
						</executions>
169
						<dependencies>
170
							<dependency>
171
								<groupId>net.sourceforge.cobertura</groupId>
172
								<artifactId>cobertura-runtime</artifactId>
173
								<version>${cobertura.version}</version>
174
								<!-- <scope>provided</scope> -->
175
								<scope>compile</scope>
176
								<type>pom</type>
177
							</dependency>
178
						</dependencies>
179
					</plugin>
180
					<plugin>
181
						<artifactId>maven-surefire-plugin</artifactId>
182
						<configuration>
183
							<classesDirectory>${project.build.directory}/generated-classes/cobertura</classesDirectory>
184
							<forkMode>none</forkMode>
185
							<skipTests>true</skipTests>
186
						</configuration>
187
					</plugin>
188
				</plugins>
189
			</build>
190
			<dependencies>
191
				<dependency>
192
					<groupId>axis</groupId>
193
					<artifactId>axis</artifactId>
194
					<version>1.4</version>
195
					<type>jar</type>
196
					<scope>compile</scope>
197
				</dependency>
198
			</dependencies>
199
		</profile>
99 200
		<profile>
100
		      <id>env-dev-m2u</id>
101
		      <activation>
201
			<id>env-dev-m2u</id>
202
			<activation>
102 203
				<property>
103
					  <name>env</name>
104
					  <value>dev-m2u</value>
204
					<name>env</name>
205
					<value>dev-m2u</value>
105 206
				</property>
106
		      </activation>
107
		      <properties>
207
			</activation>
208
			<properties>
108 209
				<config.postfix>.dev-m2u</config.postfix>
109
		      </properties>
110
    	</profile>
210
			</properties>
211
		</profile>
111 212
		<profile>
112 213
			<id>env-ant</id>
113 214
			<activation>
......
124 225
								<id>env-config</id>
125 226
								<phase>process-resources</phase>
126 227
								<configuration>
127
		 							<target>
228
									<target>
128 229
										<delete file="${project.build.outputDirectory}/com/ib/hibernate/configuration/hibernate.cfg.xml" />
129
										<copy file="resource/com/ib/hibernate/configuration/hibernate${config.postfix}.cfg.xml"
130
											tofile="${project.build.outputDirectory}/com/ib/hibernate/configuration/hibernate.cfg.xml" />
131
		
132
									  	<delete>
133
		    								<fileset dir="${project.build.outputDirectory}/com/ib/hibernate/configuration" includes="hibernate.*.cfg.xml"/>
134
		   								</delete>
135
		
230
										<copy file="resource/com/ib/hibernate/configuration/hibernate${config.postfix}.cfg.xml" tofile="${project.build.outputDirectory}/com/ib/hibernate/configuration/hibernate.cfg.xml" />
231

  
232
										<delete>
233
											<fileset dir="${project.build.outputDirectory}/com/ib/hibernate/configuration" includes="hibernate.*.cfg.xml" />
234
										</delete>
235

  
136 236
										<delete file="${project.build.outputDirectory}/UPassClient.cfg" />
137
										<copy file="resource/UPassClient${config.postfix}.cfg"
138
											tofile="${project.build.outputDirectory}/UPassClient.cfg" />
139
		
237
										<copy file="resource/UPassClient${config.postfix}.cfg" tofile="${project.build.outputDirectory}/UPassClient.cfg" />
238

  
140 239
										<delete>
141 240
											<fileset dir="${project.build.outputDirectory}" includes="UPassClient.*.cfg" />
142 241
										</delete>
143
		
242

  
144 243
										<delete file="${project.build.outputDirectory}/AppConfig.properties" />
145
										<copy file="resource/AppConfig${config.postfix}.properties"
146
											tofile="${project.build.outputDirectory}/AppConfig.properties" />
147
		
244
										<copy file="resource/AppConfig${config.postfix}.properties" tofile="${project.build.outputDirectory}/AppConfig.properties" />
245

  
148 246
										<delete>
149 247
											<fileset dir="${project.build.outputDirectory}" includes="AppConfig.*.properties" />
150
										</delete>								
151
		
248
										</delete>
249

  
152 250
										<delete file="${project.build.outputDirectory}/log4j.xml" />
153
										<copy file="resource/log4j${config.postfix}.xml"
154
											tofile="${project.build.outputDirectory}/log4j.xml" />
155
		
251
										<copy file="resource/log4j${config.postfix}.xml" tofile="${project.build.outputDirectory}/log4j.xml" />
252

  
156 253
										<delete>
157 254
											<fileset dir="${project.build.outputDirectory}" includes="log4j.*.xml" />
158
										</delete>	
159
										
255
										</delete>
256

  
160 257
									</target>
161 258
								</configuration>
162 259
								<goals>
......
169 266
			</build>
170 267
		</profile>
171 268
		<profile>
172
			<id>env-staging-penril</id>
269
			<id>env-dev-penril</id>
173 270
			<activation>
174 271
				<property>
175
					  <name>env</name>
176
					  <value>staging-penril</value>
272
					<name>env</name>
273
					<value>dev-penril</value>
177 274
				</property>
178 275
			</activation>
179
			<distributionManagement>
180
				  <snapshotRepository>
181
					<id>penril.nexus.repo</id>
182
					<name>Penril Nexus Repo</name>
183
					<url>scp://staging.penril.net/usr/share/tomcat5/sonatype-work/nexus/storage/snapshots</url>
184
				  </snapshotRepository>
185
			</distributionManagement>
186 276
			<properties>
187
				<config.postfix>.staging-penril</config.postfix>
277
				<config.postfix>.dev-penril</config.postfix>
188 278
			</properties>
189
			<build>
190
				<plugins>
191
					<plugin>
192
						<artifactId>maven-antrun-plugin</artifactId>
193
						<configuration>
194
							<target>
195
						        <copy file="${basedir}/target/${artifactId}-${version}.war" 
196
						        	tofile="/var/lib/jenkins/was-workspace/{artifactId}/${artifactId}-${version}.war"/>
197
							</target>
198
						</configuration>
199
						<executions>
200
							<execution>
201
								<id>was-deployer</id>
202
								<phase>install</phase>
203
								<goals>
204
									<goal>run</goal>
205
								</goals>
206
							</execution>
207
						</executions>
208
					</plugin>			
209

  
210
				</plugins>
211
			</build>			
212 279
		</profile>
213 280
		<profile>
214 281
			<id>env-maybank-dev</id>
......
221 288
			<properties>
222 289
				<config.postfix>.maybank-dev</config.postfix>
223 290
			</properties>
291
			<build>
292
				<plugins>
293
					<plugin>
294
						<groupId>org.glassfish</groupId>
295
						<artifactId>maven-embedded-glassfish-plugin</artifactId>
296
						<configuration>
297
							<app>${project.build.directory}/${project.artifactId}-${project.version}.war</app>
298
						</configuration>
299
					</plugin>
300
				</plugins>
301
			</build>
224 302
		</profile>
225
	</profiles>	
303

  
304

  
305

  
306
		<profile>
307
			<id>env-staging-penril</id>
308
			<activation>
309
				<property>
310
					<name>env</name>
311
					<value>staging-penril</value>
312
				</property>
313
			</activation>
314
			<properties>
315
				<config.postfix>.staging-penril</config.postfix>
316
			</properties>
317
			<build>
318
				<plugins>
319
					<plugin>
320
						<artifactId>maven-antrun-plugin</artifactId>
321
						<configuration>
322
							<target>
323
								<copy file="${basedir}/target/${artifactId}-${version}.war" tofile="/var/lib/jenkins/was-workspace/{artifactId}/${artifactId}-${version}.war" />
324
							</target>
325
						</configuration>
326
						<executions>
327
							<execution>
328
								<id>was-deployer</id>
329
								<phase>install</phase>
330
								<goals>
331
									<goal>run</goal>
332
								</goals>
333
							</execution>
334
						</executions>
335
					</plugin>
336

  
337
				</plugins>
338
			</build>
339
		</profile>
340

  
341

  
342

  
343
		<profile>
344
			<id>cobertura-instrument</id>
345
			<activation>
346
				<property>
347
					<name>cobertura-build</name>
348
				</property>
349
			</activation>
350
			<properties>
351
				<m2u-upass-classifier>instrumented</m2u-upass-classifier>
352
			</properties>
353
			<distributionManagement>
354
				<snapshotRepository>
355
					<id>penril.nexus.repo.coverage</id>
356
					<name>Penril Nexus Repo Coverage</name>
357
					<url>scp://staging.penril.net/usr/share/tomcat5/sonatype-work/nexus/storage/snapshots-coverage</url>
358
				</snapshotRepository>
359
			</distributionManagement>
360
			<build>
361
				<plugins>
362
					<plugin>
363
						<artifactId>maven-war-plugin</artifactId>
364
						<configuration>
365
							<classifier>${m2u-upass-classifier}</classifier>
366
							<packagingExcludes>WEB-INF/lib/m2u-upass-*SNAPSHOT.jar</packagingExcludes>
367
						</configuration>
368
					</plugin>
369
					<plugin>
370
						<groupId>org.codehaus.mojo</groupId>
371
						<artifactId>cobertura-maven-plugin</artifactId>
372
						<configuration>
373
							<formats>
374
								<format>html</format>
375
								<format>xml</format>
376
							</formats>
377

  
378
							<!-- TODO: To be configured... -->
379
							<instrumentation>
380
								<ignores>
381
									<ignore>com.example.boringcode.*</ignore>
382
								</ignores>
383
								<excludes>
384
									<exclude>com/example/dullcode/**/*.class</exclude>
385
									<exclude>com/example/**/*Test.class</exclude>
386
								</excludes>
387
							</instrumentation>
388

  
389
							<!-- TODO: To be configured... -->
390
							<check>
391
								<branchRate>85</branchRate>
392
								<lineRate>85</lineRate>
393
								<haltOnFailure>true</haltOnFailure>
394
								<totalBranchRate>85</totalBranchRate>
395
								<totalLineRate>85</totalLineRate>
396
								<packageLineRate>85</packageLineRate>
397
								<packageBranchRate>85</packageBranchRate>
398
								<regexes>
399
									<regex>
400
										<pattern>com.example.reallyimportant.*</pattern>
401
										<branchRate>90</branchRate>
402
										<lineRate>80</lineRate>
403
									</regex>
404
									<regex>
405
										<pattern>com.example.boringcode.*</pattern>
406
										<branchRate>40</branchRate>
407
										<lineRate>30</lineRate>
408
									</regex>
409
								</regexes>
410
							</check>
411
						</configuration>
412
						<executions>
413
							<execution>
414
								<id>instrument-code</id>
415
								<phase>process-classes</phase>
416
								<goals>
417
									<goal>instrument</goal>
418
								</goals>
419
								<configuration>
420
									<attach>true</attach>
421
								</configuration>
422
							</execution>
423
						</executions>
424
					</plugin>
425
					<plugin>
426
						<artifactId>maven-source-plugin</artifactId>
427
						<executions>
428
							<execution>
429
								<id>attach-sources</id>
430
								<goals>
431
									<goal>jar</goal>
432
								</goals>
433
							</execution>
434
						</executions>
435
						<inherited>true</inherited>
436
					</plugin>
437
				</plugins>
438
			</build>
439
			<dependencies>
440
				<dependency>
441
					<groupId>net.sourceforge.cobertura</groupId>
442
					<artifactId>cobertura-runtime</artifactId>
443
					<version>${cobertura.version}</version>
444
					<!-- <scope>provided</scope> -->
445
					<scope>compile</scope>
446
					<type>pom</type>
447
				</dependency>
448
			</dependencies>
449
		</profile>
450
	</profiles>
451

  
452

  
453

  
226 454
	<dependencies>
227 455
		<dependency>
456
			<groupId>junit</groupId>
457
			<artifactId>junit</artifactId>
458
			<version>4.8.2</version>
459
			<type>jar</type>
460
			<scope>test</scope>
461
		</dependency>
462
		<dependency>
463
			<groupId>net.penril</groupId>
464
			<artifactId>m2u-upass-core</artifactId>
465
			<version>2.0-SNAPSHOT</version>
466
			<classifier>${m2u-upass-classifier}</classifier>
467
		</dependency>
468
		<dependency>
469
			<groupId>net.penril</groupId>
470
			<artifactId>m2u-upass-admin-core</artifactId>
471
			<version>2.0-SNAPSHOT</version>
472
			<exclusions>
473
				<exclusion>
474
					<artifactId>saaj-api</artifactId>
475
					<groupId>javax.xml.soap</groupId>
476
				</exclusion>
477
				<exclusion>
478
					<artifactId>axis-jaxrpc</artifactId>
479
					<groupId>org.apache.axis</groupId>
480
				</exclusion>
481
				<exclusion>
482
					<artifactId>axis-saaj</artifactId>
483
					<groupId>org.apache.axis</groupId>
484
				</exclusion>
485
			</exclusions>
486
		</dependency>
487
		<dependency>
228 488
			<groupId>net.penril.onlineapps</groupId>
229 489
			<artifactId>oa-mailbox</artifactId>
230 490
			<version>0.9-SNAPSHOT</version>
......
237 497
			<type>jar</type>
238 498
			<scope>system</scope>
239 499
			<systemPath>${basedir}/WebContent/WEB-INF/lib/aal2wrap.jar</systemPath>
240
		</dependency>		
500
		</dependency>
241 501
		<dependency>
242 502
			<groupId>com.microsoft</groupId>
243 503
			<artifactId>mssql-jdbc</artifactId>
......
341 601
			<type>jar</type>
342 602
			<scope>compile</scope>
343 603
		</dependency>
344
 		<dependency>
604
		<dependency>
345 605
			<groupId>struts</groupId>
346 606
			<artifactId>struts-legacy</artifactId>
347 607
			<version>1.1</version>
......
390 650
			<scope>compile</scope>
391 651
		</dependency>
392 652
		<dependency>
393
		    <groupId>commons-io</groupId>
394
		    <artifactId>commons-io</artifactId>
395
		    <version>1.4</version>
653
			<groupId>commons-io</groupId>
654
			<artifactId>commons-io</artifactId>
655
			<version>1.4</version>
396 656
		</dependency>
397 657
		<dependency>
398 658
			<groupId>commons-lang</groupId>
......
416 676
			<scope>compile</scope>
417 677
		</dependency>
418 678
		<dependency>
419
			<groupId>junit</groupId>
420
			<artifactId>junit</artifactId>
421
			<version>4.8.2</version>
422
			<type>jar</type>
423
			<scope>test</scope>
424
		</dependency>
425
		<dependency>
426 679
			<groupId>javax.sql</groupId>
427 680
			<artifactId>jdbc-stdext</artifactId>
428 681
			<version>2.0</version>
......
481 734
			<version>0.2a-20111103</version>
482 735
		</dependency>
483 736
		<dependency>
484
			<groupId>net.penril</groupId>
485
			<artifactId>m2u-upass-core</artifactId>
486
			<version>2.0-SNAPSHOT</version>
487
		</dependency>
488
		<dependency>
489
			<groupId>net.penril</groupId>
490
			<artifactId>m2u-upass-admin-core</artifactId>
491
			<version>2.0-SNAPSHOT</version>
492
			<exclusions>
493
				<exclusion>
494
					<artifactId>saaj-api</artifactId>
495
					<groupId>javax.xml.soap</groupId>
496
				</exclusion>
497
				<exclusion>
498
					<artifactId>axis-jaxrpc</artifactId>
499
					<groupId>org.apache.axis</groupId>
500
				</exclusion>
501
				<exclusion>
502
					<artifactId>axis-saaj</artifactId>
503
					<groupId>org.apache.axis</groupId>
504
				</exclusion>
505
			</exclusions>
737
			<groupId>org.seleniumhq.selenium</groupId>
738
			<artifactId>selenium-server</artifactId>
739
			<version>2.35.0</version>
740
			<scope>test</scope>
506 741
		</dependency>
507 742
	</dependencies>
508 743
</project>

Also available in: Unified diff