pom.xml 15.1 KB
Newer Older
C
Calvin 已提交
1
<?xml version="1.0" encoding="UTF-8"?>
2 3
<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">
C
Calvin 已提交
4 5 6
	<modelVersion>4.0.0</modelVersion>
	<parent>
		<groupId>org.springside</groupId>
C
cleanup  
Calvin 已提交
7
		<artifactId>springside-parent</artifactId>
8 9
		<version>4.0.0.RC4-SNAPSHOT</version>
		<relativePath>../../modules/parent/</relativePath>
C
Calvin 已提交
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
	</parent>
	<groupId>org.springside.examples</groupId>
	<artifactId>showcase</artifactId>
	<packaging>war</packaging>
	<name>Springside :: Example :: Showcase</name>

	<!-- 项目属性 -->
	<properties>
		<jdbc.driver.groupId>com.h2database</jdbc.driver.groupId>
		<jdbc.driver.artifactId>h2</jdbc.driver.artifactId>
		<jdbc.driver.version>${h2.version}</jdbc.driver.version>
	</properties>

	<!-- 依赖项定义 -->
	<dependencies>
		<!-- SPRINGSIDE begin -->
		<dependency>
			<groupId>org.springside</groupId>
			<artifactId>springside-core</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springside</groupId>
			<artifactId>springside-extension</artifactId>
		</dependency>
		<!-- SPRINGSIDE end -->

		<!-- SPRING begin -->
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-aop</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-context-support</artifactId>
		</dependency>
		<dependency>
			<groupId>org.aspectj</groupId>
			<artifactId>aspectjrt</artifactId>
		</dependency>
		<dependency>
			<groupId>org.aspectj</groupId>
			<artifactId>aspectjweaver</artifactId>
		</dependency>
		<dependency>
			<groupId>cglib</groupId>
55 56 57 58 59
			<artifactId>cglib</artifactId>
		</dependency>
		<dependency>
			<groupId>asm</groupId>
			<artifactId>asm</artifactId>
C
Calvin 已提交
60 61 62 63 64 65 66 67 68
		</dependency>
		<!-- SPRING end -->

		<!-- PERSISTENCE begin -->
		<!-- hibernate -->
		<dependency>
			<groupId>org.hibernate</groupId>
			<artifactId>hibernate-core</artifactId>
		</dependency>
69
		<dependency>
C
Calvin 已提交
70 71 72
			<groupId>org.hibernate</groupId>
			<artifactId>hibernate-entitymanager</artifactId>
		</dependency>
73 74 75 76
		<dependency>
			<groupId>org.hibernate</groupId>
			<artifactId>hibernate-ehcache</artifactId>
		</dependency>
77 78 79 80 81 82 83 84 85 86
		
		<!-- mybatis -->
		<dependency>
			<groupId>org.mybatis</groupId>
			<artifactId>mybatis</artifactId>
		</dependency>
		<dependency>
			<groupId>org.mybatis</groupId>
			<artifactId>mybatis-spring</artifactId>
		</dependency>
87 88

		<!-- spring data access -->
C
Calvin 已提交
89
		<dependency>
90 91 92
			<groupId>org.springframework.data</groupId>
			<artifactId>spring-data-jpa</artifactId>
		</dependency>
C
Calvin 已提交
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-orm</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-jdbc</artifactId>
		</dependency>

		<!-- dbcp -->
		<dependency>
			<groupId>commons-dbcp</groupId>
			<artifactId>commons-dbcp</artifactId>
		</dependency>

		<!-- jdbc driver -->
		<dependency>
			<groupId>${jdbc.driver.groupId}</groupId>
			<artifactId>${jdbc.driver.artifactId}</artifactId>
			<version>${jdbc.driver.version}</version>
			<scope>runtime</scope>
		</dependency>
		<!-- PERSISTENCE end -->

		<!-- WEB begin -->
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-webmvc</artifactId>
		</dependency>
122

C
Calvin 已提交
123
		<dependency>
C
Calvin 已提交
124
			<groupId>opensymphony</groupId>
C
Calvin 已提交
125 126 127 128 129 130 131 132 133 134 135 136
			<artifactId>sitemesh</artifactId>
		</dependency>

		<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>jstl</artifactId>
		</dependency>
		<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>servlet-api</artifactId>
		</dependency>
		<!-- WEB end -->
C
Calvin 已提交
137
		
C
Calvin 已提交
138 139 140 141 142 143 144 145 146 147 148 149 150
		<!-- SECURITY begin -->
		<dependency>
			<groupId>org.apache.shiro</groupId>
			<artifactId>shiro-core</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.shiro</groupId>
			<artifactId>shiro-spring</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.shiro</groupId>
			<artifactId>shiro-web</artifactId>
		</dependency>
151 152 153 154
		<dependency>
			<groupId>org.apache.shiro</groupId>
			<artifactId>shiro-ehcache</artifactId>
		</dependency>
C
Calvin 已提交
155
		<!-- SECURITY end -->
156 157 158 159 160 161 162 163 164 165 166
		
		<!-- SOAP begin -->
		<dependency>
			<groupId>org.apache.cxf</groupId>
			<artifactId>cxf-rt-frontend-jaxws</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.cxf</groupId>
			<artifactId>cxf-rt-transports-http</artifactId>
		</dependency>
		<!-- SOAP end -->
C
Calvin 已提交
167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197

		<!-- JMS begin -->
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-jms</artifactId>
		</dependency>

		<dependency>
			<groupId>org.apache.activemq</groupId>
			<artifactId>activemq-core</artifactId>
		</dependency>
		<!-- JMS end -->

		<!-- TIMER -->
		<dependency>
			<groupId>org.quartz-scheduler</groupId>
			<artifactId>quartz</artifactId>
		</dependency>

		<!-- CACHE begin -->
		<dependency>
			<groupId>spy</groupId>
			<artifactId>spymemcached</artifactId>
		</dependency>

		<dependency>
			<groupId>com.thimbleware.jmemcached</groupId>
			<artifactId>jmemcached-core</artifactId>
			<!-- 为演示而改为runtime -->
			<scope>runtime</scope>
		</dependency>
198

C
Calvin 已提交
199 200 201 202 203
		<dependency>
			<groupId>net.sf.ehcache</groupId>
			<artifactId>ehcache-core</artifactId>
		</dependency>
		<!-- CACHE end -->
C
Calvin 已提交
204 205 206 207 208 209 210 211 212 213 214 215 216
		
		<!-- jolokia Restful JMX -->
		<dependency>
			<groupId>org.jolokia</groupId>
			<artifactId>jolokia-core</artifactId>
		</dependency>
				
		<!-- JSR303  BeanValidator -->
		<dependency>
			<groupId>org.hibernate</groupId>
			<artifactId>hibernate-validator</artifactId>
		</dependency>
		
C
Calvin 已提交
217 218
		<!-- JSON -->
		<dependency>
219 220 221
			<groupId>com.fasterxml.jackson.core</groupId>
			<artifactId>jackson-databind</artifactId>
		</dependency>
222 223 224 225 226
		<dependency>
			<groupId>com.fasterxml.jackson.module</groupId>
			<artifactId>jackson-module-jaxb-annotations</artifactId>
		</dependency>
		
C
Calvin 已提交
227 228 229 230 231 232 233 234 235 236
		<!-- XML begin -->
		<dependency>
			<groupId>dom4j</groupId>
			<artifactId>dom4j</artifactId>
		</dependency>

		<dependency>
			<groupId>jaxen</groupId>
			<artifactId>jaxen</artifactId>
		</dependency>
C
Calvin 已提交
237 238
		<!-- XML end -->	
		
C
Calvin 已提交
239 240 241 242 243 244 245 246 247 248 249 250
		<!-- LOGGING begin -->
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-log4j12</artifactId>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>jcl-over-slf4j</artifactId>
251
		</dependency>
C
Calvin 已提交
252 253 254 255 256
		<dependency>
			<groupId>log4j</groupId>
			<artifactId>log4j</artifactId>
		</dependency>
		<dependency>
257 258
			<groupId>org.lazyluke</groupId>
			<artifactId>log4jdbc-remix</artifactId>
259
		</dependency>
C
Calvin 已提交
260 261 262 263 264 265 266
		<!-- LOGGING end -->

		<!-- GENERAL UTILS begin -->
		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-lang3</artifactId>
		</dependency>
C
Calvin 已提交
267 268 269 270
		<dependency>
			<groupId>commons-io</groupId>
			<artifactId>commons-io</artifactId>
		</dependency>
C
Calvin 已提交
271 272 273 274
		<dependency>
			<groupId>commons-codec</groupId>
			<artifactId>commons-codec</artifactId>
		</dependency>
C
Calvin 已提交
275 276 277 278 279 280 281 282 283 284
		<dependency>
			<groupId>com.google.guava</groupId>
			<artifactId>guava</artifactId>
		</dependency>

		<dependency>
			<groupId>joda-time</groupId>
			<artifactId>joda-time</artifactId>
		</dependency>
		<!-- GENERAL UTILS end -->
285

C
Calvin 已提交
286
		<!-- OTHER TOOLS begin -->
C
Calvin 已提交
287
		<dependency>
C
Calvin 已提交
288 289
			<groupId>org.freemarker</groupId>
			<artifactId>freemarker</artifactId>
C
Calvin 已提交
290
		</dependency>
291

C
Calvin 已提交
292 293 294 295 296 297
		<dependency>
			<groupId>org.apache.httpcomponents</groupId>
			<artifactId>httpclient</artifactId>
		</dependency>

		<dependency>
C
Calvin 已提交
298 299
			<groupId>net.sf.dozer</groupId>
			<artifactId>dozer</artifactId>
300 301
		</dependency>

C
Calvin 已提交
302 303 304 305 306 307 308 309 310
		<!-- email -->
		<dependency>
			<groupId>javax.mail</groupId>
			<artifactId>mail</artifactId>
		</dependency>
		<dependency>
			<groupId>javax.activation</groupId>
			<artifactId>activation</artifactId>
		</dependency>
C
Calvin 已提交
311
		<!-- OTHER TOOLS end -->
312

313
		<!-- TEST begin -->		
C
Calvin 已提交
314 315 316 317 318 319
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<!-- for xxxDemo class -->
			<scope>compile</scope>
		</dependency>
320

C
Calvin 已提交
321 322 323 324
		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-core</artifactId>
		</dependency>
325

326 327 328 329 330 331 332 333
		<dependency>
			<groupId>org.powermock</groupId>
			<artifactId>powermock-module-junit4</artifactId>
		</dependency>
		<dependency>
			<groupId>org.powermock</groupId>
			<artifactId>powermock-api-mockito</artifactId>
		</dependency>
C
Calvin 已提交
334

335 336 337 338 339 340 341
		<dependency>
			<groupId>org.springside</groupId>
			<artifactId>springside-test</artifactId>
			<!-- for xxxDemo class -->
			<scope>compile</scope>
		</dependency>

C
Calvin 已提交
342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-test</artifactId>
			<!-- for xxxDemo class -->
			<scope>compile</scope>
		</dependency>

		<!-- selenium 2.0 -->
		<dependency>
			<groupId>org.seleniumhq.selenium</groupId>
			<artifactId>selenium-java</artifactId>
		</dependency>
		<dependency>
			<groupId>org.seleniumhq.selenium</groupId>
			<artifactId>selenium-remote-driver</artifactId>
		</dependency>

		<dependency>
			<groupId>org.dbunit</groupId>
			<artifactId>dbunit</artifactId>
		</dependency>

C
Calvin 已提交
364
		<!-- jetty for functional test and executable war -->
C
Calvin 已提交
365 366 367
		<dependency>
			<groupId>org.eclipse.jetty.aggregate</groupId>
			<artifactId>jetty-webapp</artifactId>
368
			<scope>provided</scope>
C
Calvin 已提交
369 370 371 372
		</dependency>
		<dependency>
			<groupId>org.eclipse.jetty</groupId>
			<artifactId>jetty-jsp</artifactId>
373
			<scope>provided</scope>
C
Calvin 已提交
374
		</dependency>
C
Calvin 已提交
375 376 377 378 379 380 381 382 383 384 385 386
		
		<!-- h2 -->
		<dependency>
			<groupId>com.h2database</groupId>
			<artifactId>h2</artifactId>
		</dependency>

		<!-- mail server simulator -->
		<dependency>
			<groupId>com.icegreen</groupId>
			<artifactId>greenmail</artifactId>
		</dependency>
C
Calvin 已提交
387 388 389 390 391
		<!-- TEST end -->
	</dependencies>

	<build>
		<plugins>
392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410
			<!-- 增加functional test的Source目录 -->
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>build-helper-maven-plugin</artifactId>
				<executions>
					<execution>
						<id>add-source</id>
						<phase>generate-sources</phase>
						<goals>
							<goal>add-test-source</goal>
						</goals>
						<configuration>
							<sources>
								<source>src/test/functional</source>
							</sources>
						</configuration>
					</execution>
				</executions>
			</plugin>
411 412
			
			<!-- test插件,设定內存 -->
C
Calvin 已提交
413 414 415 416 417 418 419
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<configuration>
					<argLine>-Xmx256M</argLine>
				</configuration>
			</plugin>
420

C
Calvin 已提交
421 422 423 424 425 426 427
			<!-- cobertura插件 ,取消不需要计算覆盖率的类 -->
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>cobertura-maven-plugin</artifactId>
				<configuration>
					<instrumentation>
						<excludes>
428 429
							<exclude>**/entity/*.class</exclude>
							<exclude>**/dto/*.class</exclude>
430
							<exclude>**/*Controller.class</exclude>
C
Calvin 已提交
431
							<exclude>**/*Demo.class</exclude>
C
Calvin 已提交
432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448
						</excludes>
					</instrumentation>
				</configuration>
			</plugin>

			<!-- eclipse插件, 设定wtp版本并添加springIDE nature -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-eclipse-plugin</artifactId>
				<configuration>
					<wtpversion>2.0</wtpversion>
					<additionalProjectnatures>
						<projectnature>org.springframework.ide.eclipse.core.springnature</projectnature>
					</additionalProjectnatures>
				</configuration>
			</plugin>

449
			<!-- jetty插件, 设定context path与spring profile -->
C
Calvin 已提交
450 451 452 453
			<plugin>
				<groupId>org.mortbay.jetty</groupId>
				<artifactId>jetty-maven-plugin</artifactId>
				<configuration>
454 455 456 457 458 459 460
					<systemProperties>
						<systemProperty>
							<name>spring.profiles.active</name>
							<value>development</value>
						</systemProperty>
					</systemProperties>
					<useTestClasspath>true</useTestClasspath>
C
Calvin 已提交
461 462 463 464 465
					<webAppConfig>
						<contextPath>/${project.artifactId}</contextPath>
					</webAppConfig>
				</configuration>
			</plugin>
466 467 468 469 470 471
			
			<!-- enforcer, 规则统一定义在parent -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-enforcer-plugin</artifactId>
			</plugin>
C
Calvin 已提交
472 473 474 475
		</plugins>
	</build>

	<profiles>
C
Calvin 已提交
476
		<!-- 执行functional test -->
C
Calvin 已提交
477
		<profile>
478
			<id>functional-test</id>
C
Calvin 已提交
479 480 481 482 483 484
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-surefire-plugin</artifactId>
						<configuration>
485
							<argLine>-Xmx256M -XX:MaxPermSize=128m</argLine>
C
Calvin 已提交
486
							<includes>
487
								<include>**/*FT.java</include>
C
Calvin 已提交
488
							</includes>
489
							<!-- 支持taglib tld文件查找的必要设置 -->
490
							<useSystemClassLoader>false</useSystemClassLoader>
491
							<!-- 将由mvn命令行-Dselenium.driver传到surefire的JVM中 -->
C
#29 fix  
Calvin 已提交
492 493 494
							<systemPropertyVariables>
								<selenium.driver>${selenium.driver}</selenium.driver>
							</systemPropertyVariables>
C
Calvin 已提交
495
						</configuration>
496
					</plugin>
C
Calvin 已提交
497 498 499
				</plugins>
			</build>
		</profile>
500

C
Calvin 已提交
501
		<!-- 刷新开发环境数据库 -->
C
Calvin 已提交
502 503
		<profile>
			<id>refresh-db</id>
504 505 506 507
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
508 509 510
						<artifactId>maven-antrun-plugin</artifactId>
						<configuration>
							<target>
C
Calvin 已提交
511 512
								<property file="src/main/resources/application.development-local.properties" />
								<property file="src/main/resources/application.development.properties" />
513
								<property file="src/main/resources/application.properties" />
514 515 516 517 518

								<property name="sql.type" value="h2" />
								<property name="dbunit.datatype" value="org.dbunit.ext.h2.H2DataTypeFactory" />

								<taskdef name="dbunit" classname="org.dbunit.ant.DbUnitTask" classpathref="maven.test.classpath" />
519
						
520 521
								<sql driver="${jdbc.driver}" url="${jdbc.url}" userid="${jdbc.username}" password="${jdbc.password}"
									src="src/main/resources/sql/${sql.type}/schema.sql" onerror="continue">
522 523
									<classpath refid="maven.test.classpath" />
								</sql>
524 525
								<sql driver="${quartz.jdbc.driver}" url="${quartz.jdbc.url}" userid="${quartz.jdbc.username}" password="${quartz.jdbc.password}"
									src="src/main/resources/sql/${sql.type}/quartz.sql" onerror="continue">
C
Calvin 已提交
526 527
									<classpath refid="maven.test.classpath" />
								</sql>
528 529 530 531 532 533

								<dbunit driver="${jdbc.driver}" url="${jdbc.url}" userid="${jdbc.username}" password="${jdbc.password}">
									<dbconfig>
										<property name="datatypeFactory" value="${dbunit.datatype}" />
									</dbconfig>
									<classpath refid="maven.test.classpath" />
534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567
									<operation type="CLEAN_INSERT" src="src/test/resources/data/sample-data.xml" format="flat" transaction="true" />
								</dbunit>
							</target>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>

		<profile>
			<id>standalone</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-assembly-plugin</artifactId>
						<executions>
							<execution>
								<phase>package</phase>
								<goals>
									<goal>single</goal>
								</goals>
								<configuration>
									<descriptors>
										<descriptor>assembly-standalone.xml</descriptor>
									</descriptors>
									<archive>
										<manifest>
											<mainClass>org.springside.examples.showcase.Main</mainClass>
										</manifest>
									</archive>
								</configuration>
							</execution>
						</executions>
568 569 570
					</plugin>
				</plugins>
			</build>
571
		</profile>
C
Calvin 已提交
572 573
	</profiles>
</project>