
	<!--
		Licensed to the Apache Software Foundation (ASF) under one or more
		contributor license agreements. See the NOTICE file distributed with
		this work for additional information regarding copyright ownership.
		The ASF licenses this file to you under the Apache License, Version
		2.0 (the "License"); you may not use this file except in compliance
		with the License. You may obtain a copy of the License at

		http://www.apache.org/licenses/LICENSE-2.0 Unless required by
		applicable law or agreed to in writing, software distributed under the
		License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
		CONDITIONS OF ANY KIND, either express or implied. See the License for
		the specific language governing permissions and limitations under the
		License.
	-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<groupId>org.jboss.wise</groupId>
	<artifactId>wise-integration</artifactId>
	<version>1.1</version>
	<name>Wise Integration Test</name>
	<url>http://www.jboss.org/wise</url>

	<parent>
		<groupId>org.jboss.wise</groupId>
		<artifactId>wise-parent</artifactId>
		<version>1.1</version>
	</parent>

	<dependencies>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>javax.ejb</groupId>
			<artifactId>ejb-api</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.jboss.wise</groupId>
			<artifactId>wise-core</artifactId>
			<version>1.1</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>jboss</groupId>
			<artifactId>jbossall-client</artifactId>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.jboss.ws.native</groupId>
			<artifactId>jbossws-native-client</artifactId>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>xalan</groupId>
			<artifactId>xalan</artifactId>
			<scope>test</scope>
		</dependency>

	</dependencies>


	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<executions>
					<execution>
						<phase>package</phase>
						<goals>
							<goal>jar</goal>
						</goals>
						<configuration>
							<finalName>mtom-tests</finalName>
							<outputDirectory>${basedir}/target/test-classes/</outputDirectory>
							<testClassesDirectory>${basedir}/target/test-classes/</testClassesDirectory>
							<includes>
								<include>**/mtom/*</include>
							</includes>
							<excludes>
								<exclude>**/*Test.class</exclude>
							</excludes>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-war-plugin</artifactId>
				<executions>
					<execution>
						<id>war-it</id>
						<phase>pre-integration-test</phase>
						<goals>
							<goal>war</goal>
						</goals>
						<configuration>
							<webXml>${basedir}/src/test/resources/WEB-INF/basic/web.xml
							</webXml>
							<warName>basic</warName>
							<outputDirectory>${basedir}/target/test-classes/
							</outputDirectory>
							<webappDirectory>${basedir}/target/basic
							</webappDirectory>
							<webResources>
								<webResource>
									<targetPath>WEB-INF/classes</targetPath>
									<directory>${basedir}/target/test-classes/
									</directory>
									<includes>
										<include>**/basic/*.class</include>
									</includes>
									<excludes>
										<exclude>**/*Test.class</exclude>
									</excludes>
								</webResource>
							</webResources>
						</configuration>
					</execution>

					<execution>
						<id>war-wsse</id>
						<phase>pre-integration-test</phase>
						<goals>
							<goal>war</goal>
						</goals>
						<configuration>
							<webXml>${basedir}/src/test/resources/WEB-INF/wsse/web.xml
							</webXml>
							<warName>wsse</warName>
							<outputDirectory>${basedir}/target/test-classes/
							</outputDirectory>
							<webappDirectory>${basedir}/target/wsse
							</webappDirectory>
							<packagingIncludes></packagingIncludes>
							<webResources>
								<webResource>
									<targetPath>WEB-INF/classes</targetPath>
									<directory>${basedir}/target/test-classes/
									</directory>
									<includes>
										<include>**/wsse/*.class</include>
									</includes>
									<excludes>
										<exclude>**/*Test.class</exclude>
									</excludes>
								</webResource>

								<webResource>
									<targetPath>WEB-INF</targetPath>
									<directory>${basedir}/src/test/resources/WEB-INF/wsse/
									</directory>
									<includes>
										<include>**/*.*</include>
									</includes>
								</webResource>
							</webResources>
						</configuration>
					</execution>

					<execution>
						<id>war-wsdlResolver</id>
						<phase>pre-integration-test</phase>
						<goals>
							<goal>war</goal>
						</goals>
						<configuration>
							<webXml>${basedir}/src/test/resources/WEB-INF/wsdlResolver/web.xml
							</webXml>
							<warName>wsdlResolver</warName>
							<outputDirectory>${basedir}/target/test-classes/
							</outputDirectory>
							<webappDirectory>${basedir}/target/wsdlResolver
							</webappDirectory>
							<packagingIncludes></packagingIncludes>
							<webResources>
								<webResource>
									<targetPath>WEB-INF/classes</targetPath>
									<directory>${basedir}/target/test-classes/
									</directory>
									<includes>
										<include>**/wsdlResolver/*.class</include>
									</includes>
									<excludes>
										<exclude>**/*Test.class</exclude>
									</excludes>
								</webResource>

								<webResource>
									<targetPath>WEB-INF</targetPath>
									<directory>${basedir}/src/test/resources/WEB-INF/wsdlResolver/
									</directory>
									<includes>
										<include>**/*.*</include>
									</includes>
								</webResource>
							</webResources>
						</configuration>
					</execution>

					<execution>
						<id>war-wsaddress</id>
						<phase>pre-integration-test</phase>
						<goals>
							<goal>war</goal>
						</goals>
						<configuration>
							<webXml>${basedir}/src/test/resources/WEB-INF/wsa/web.xml
							</webXml>
							<warName>wsa</warName>
							<outputDirectory>${basedir}/target/test-classes/
							</outputDirectory>
							<webappDirectory>${basedir}/target/wsa
							</webappDirectory>
							<packagingIncludes></packagingIncludes>
							<webResources>
								<webResource>
									<targetPath>WEB-INF/classes</targetPath>
									<directory>${basedir}/target/test-classes/
									</directory>
									<includes>
										<include>**/wsaddressing/*.class</include>
									</includes>
									<excludes>
										<exclude>**/*Test.class</exclude>
									</excludes>
								</webResource>
							</webResources>
						</configuration>
					</execution>

					<execution>
						<id>war-wsaandwsse</id>
						<phase>pre-integration-test</phase>
						<goals>
							<goal>war</goal>
						</goals>
						<configuration>
							<webXml>${basedir}/src/test/resources/WEB-INF/wsaandwsse/web.xml
							</webXml>
							<warName>wsaandwsse</warName>
							<outputDirectory>${basedir}/target/test-classes/
							</outputDirectory>
							<webappDirectory>${basedir}/target/wsaandwsse
							</webappDirectory>
							<packagingIncludes></packagingIncludes>
							<webResources>
								<webResource>
									<targetPath>WEB-INF/classes</targetPath>
									<directory>${basedir}/target/test-classes/
									</directory>
									<includes>
										<include>**/wsaandwsse/*.class</include>
									</includes>
									<excludes>
										<exclude>**/*Test.class</exclude>
									</excludes>
								</webResource>
								<webResource>
									<targetPath>WEB-INF</targetPath>
									<directory>${basedir}/src/test/resources/WEB-INF/wsaandwsse/
									</directory>
									<includes>
										<include>**/*.*</include>
									</includes>
								</webResource>
							</webResources>

						</configuration>
					</execution>
					<execution>
						<id>war-smooks</id>
						<phase>pre-integration-test</phase>
						<goals>
							<goal>war</goal>
						</goals>
						<configuration>
							<webXml>${basedir}/src/test/resources/WEB-INF/smooks/web.xml
                            </webXml>
							<warName>smooks</warName>
							<outputDirectory>${basedir}/target/test-classes/
                            </outputDirectory>
							<webappDirectory>${basedir}/target/smooks
                            </webappDirectory>
							<webResources>
								<webResource>
									<targetPath>WEB-INF/classes</targetPath>
									<directory>${basedir}/target/test-classes/
                                    </directory>
									<includes>
										<include>**/smooks/**/*.class</include>
									</includes>
									<excludes>
										<exclude>**/*Test.class</exclude>
									</excludes>
								</webResource>
							</webResources>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<artifactId>maven-surefire-plugin</artifactId>
				<configuration>
					<skip>true</skip>
				</configuration>
				<executions>
					<execution>
						<id>unit-tests</id>
						<phase>test</phase>
						<goals>
							<goal>test</goal>
						</goals>
						<configuration>
							<skip>false</skip>
							<excludes>
								<exclude>**/integration/**/*Test.java</exclude>
								<exclude>**/*StressTest.java</exclude>
								<exclude>**/*$*.java</exclude>
							</excludes>
						</configuration>
					</execution>
					<execution>
						<id>integration-tests</id>
						<phase>integration-test</phase>
						<goals>
							<goal>test</goal>
						</goals>
						<configuration>
							<skip>false</skip>
							<excludes>
								<exclude>**/*StressTest.java</exclude>
								<exclude>**/*$*.java</exclude>
							</excludes>
							<includes>
								<include>**/*Integration*Test.java</include>
							</includes>
							<systemProperties>
								<property>
									<name>log4j.configuration</name>
									<value>integration-test-log4j.xml</value>
								</property>
							</systemProperties>
						</configuration>

					</execution>
				</executions>
			</plugin>
		</plugins>

	</build>
	<profiles>
		<profile>
			<id>skip.tests</id>
			<activation>
				<property>
					<name>!jboss.bind.address</name>
				</property>
			</activation>
			<build>
				<plugins>
					<plugin>
						<artifactId>maven-surefire-plugin</artifactId>
						<executions>
							<execution>
								<id>integration-tests</id>
								<phase>integration-test</phase>
								<goals>
									<goal>test</goal>
								</goals>
								<configuration>
									<skip>true</skip>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>

		<profile>
			<id>use.endorsed.dir</id>
			<activation>
				<property>
					<name>endorsed.dir</name>
				</property>
			</activation>
			<build>
				<plugins>
					<plugin>
						<artifactId>maven-surefire-plugin</artifactId>
						<configuration>
							<argLine>-Djava.endorsed.dirs=${endorsed.dir}</argLine>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>

		<profile>
			<id>stress.tests</id>
			<build>
				<plugins>
					<plugin>
						<artifactId>maven-surefire-plugin</artifactId>
						<executions>
							<execution>
								<id>integration-tests</id>
								<phase>integration-test</phase>
								<goals>
									<goal>test</goal>
								</goals>
								<configuration>
									<systemProperties>
										<property>
											<name>wise.stress.threads</name>
											<value>300</value>
										</property>
										<property>
											<name>wise.stress.threadPoolSize</name>
											<value>50</value>
										</property>
										<property>
											<name>wise.stress.expensive.threads</name>
											<value>30</value>
										</property>
										<property>
											<name>wise.stress.expensive.threadPoolSize</name>
											<value>5</value>
										</property>
									</systemProperties>
									<excludes>
										<exclude>**/*Integration*Test.java</exclude>
										<exclude>**/*$*.java</exclude>
									</excludes>
									<includes>
										<include>**/*StressTest.java</include>
									</includes>

								</configuration>
							</execution>
						</executions>
					</plugin>

				</plugins>
			</build>
		</profile>
	</profiles>
</project>
