<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>
	<parent>
		<groupId>gov.va.med.repositories</groupId>
		<artifactId>fpds</artifactId>
		<version>6.0.1-SNAPSHOT</version>
		<relativePath>../pom.xml</relativePath>
	</parent>
	<artifactId>fpds-ear</artifactId>
	<name>fpds-ear</name>
	<packaging>ear</packaging>
	<description>Enterprise Application Deployment Module for Federating Patient Data Service</description>
	<properties>
		<earFileName>${project.artifactId}-${project.version}</earFileName>
		<fpds.deploy.bounce.weblogic>False</fpds.deploy.bounce.weblogic>
	</properties>
	<dependencies>
		<dependency>
			<groupId>gov.va.med.repositories</groupId>
			<artifactId>fpds-ws</artifactId>
			<type>war</type>
		</dependency>
		<dependency>
			<groupId>gov.va.med.repositories</groupId>
			<artifactId>fpds-ejb</artifactId>
			<type>ejb</type>
		</dependency>
		<dependency>
			<groupId>${repos.lib.groupid}</groupId>
			<artifactId>common</artifactId>
		</dependency>
		<dependency>
			<groupId>gov.va.med.cds</groupId>
			<artifactId>cds-client</artifactId>
		</dependency>
		<dependency>
			<groupId>${repos.lib.groupid}</groupId>
			<artifactId>hapi-ext</artifactId>
		</dependency>
		<dependency>
			<groupId>gov.va.med.repos.lib</groupId>
			<artifactId>log4j-ext</artifactId>
		</dependency>
		<dependency>
			<groupId>gov.va.med.cds.ws</groupId>
			<artifactId>common-ws</artifactId>
		</dependency>
		<dependency>
			<groupId>xerces</groupId>
			<artifactId>xercesImpl</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.cxf</groupId>
			<artifactId>cxf-rt-frontend-jaxrs</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.cxf</groupId>
			<artifactId>cxf-rt-transports-http</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.cxf</groupId>
			<artifactId>cxf-rt-rs-extension-providers</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.cxf</groupId>
			<artifactId>cxf-rt-bindings-xml</artifactId>
		</dependency>
		<dependency>
  			<groupId>org.apache.cxf</groupId>
  			<artifactId>cxf-rt-rs-security-xml</artifactId>
		</dependency>
		<!-- <dependency>
			<groupId>org.apache.cxf</groupId>
        	<artifactId>cxf-rt-rs-client</artifactId>
		</dependency>  -->
		<dependency>
			<groupId>javax.jws</groupId>
			<artifactId>jsr181-api</artifactId>
		</dependency>
		<dependency>
			<groupId>javax.ws.rs</groupId>
			<artifactId>jsr311-api</artifactId>
		</dependency>
		<dependency>
			<groupId>javax.ws.rs</groupId>
			<artifactId>javax.ws.rs-api</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.cxf</groupId>
			<artifactId>cxf-rt-frontend-jaxws</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.cxf</groupId>
			<artifactId>cxf-rt-frontend-simple</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.cxf</groupId>
			<artifactId>cxf-rt-wsdl</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.ws.xmlschema</groupId>
			<artifactId>xmlschema-core</artifactId>
		</dependency>	
		<dependency>
			<groupId>org.apache.cxf</groupId>
			<artifactId>cxf-rt-databinding-jaxb</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.cxf</groupId>
			<artifactId>cxf-rt-bindings-soap</artifactId>
		</dependency>
		
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-core</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-context</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-web</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-webmvc</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-aop</artifactId>
		</dependency>
		<dependency>
			<groupId>aopalliance</groupId>
			<artifactId>aopalliance</artifactId>
		</dependency>
		<dependency>
			<groupId>xml-apis</groupId>
			<artifactId>xml-apis</artifactId>
			<!-- Don't upgrade to version 2.0.2 it's a non-standard version -->
		</dependency>
		<dependency>
			<groupId>commons-logging</groupId>
			<artifactId>commons-logging</artifactId>
		</dependency>
		<dependency>
			<groupId>org.aspectj</groupId>
			<artifactId>aspectjweaver</artifactId>
		</dependency>
		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-all</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<scope>test</scope>
		</dependency>
		<!-- The below jars are essential for CXF clients to look up UDDI -->
		<dependency>
			<groupId>com.sun.xml.bind</groupId>
			<artifactId>jaxb-impl</artifactId>
		</dependency>
		<dependency>
			<groupId>com.sun.xml.bind</groupId>
			<artifactId>jaxb-core</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.neethi</groupId>
			<artifactId>neethi</artifactId>
		</dependency>
		<dependency>
			<groupId>jaxm-api</groupId>
			<artifactId>jaxm-api</artifactId>
			<scope>runtime</scope>
		</dependency>
		<dependency>
			<groupId>saaj-api</groupId>
			<artifactId>saaj-api</artifactId>
		</dependency>
		<dependency>
			<groupId>org.codehaus.woodstox</groupId>
			<artifactId>woodstox-core-asl</artifactId>
			<exclusions>
				<exclusion>
					<groupId>javax.xml.stream</groupId>
					<artifactId>stax-api</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>org.codehaus.woodstox</groupId>
			<artifactId>stax2-api</artifactId>
		</dependency>
		<!-- End -->
	</dependencies>
	<profiles>
		<profile>
			<!-- Profile for stopping and starting the server that is being deployed to. -->
			<id>bounce-weblogic</id>
			<properties>
				<fpds.deploy.bounce.weblogic>False</fpds.deploy.bounce.weblogic>
			</properties>
		</profile>
		<profile>
			<id>soapui-tests</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.codehaus.mojo</groupId>
						<artifactId>properties-maven-plugin</artifactId>
						<executions>
							<execution>
								<phase>initialize</phase>
								<goals>
									<goal>read-project-properties</goal>
								</goals>
								<configuration>
									<files>
										<file>${cds.run.properties.path}</file>
									</files>
								</configuration>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>com.smartbear.soapui</groupId>
						<artifactId>soapui-maven-plugin</artifactId>
						<!-- <version>5.0.0</version> -->
						<dependencies>
							<dependency>
								<groupId>oracle</groupId>
								<artifactId>ojdbc6</artifactId>
								<version>11.1.0.7.0</version>
							</dependency>
							<!-- <dependency> <groupId>hermesjms</groupId> <artifactId>hermes</artifactId> <version>1.14</version> </dependency> -->
						</dependencies>
						<executions>
							<!-- execution> <id>FPDS-PGD-Integration-Tests</id> <phase>test</phase> <goals> <goal>test</goal> </goals> <configuration> <projectFile>${project.build.directory}/soapui/template/FPDS-PGD-soapui-project.xml</projectFile> 
								<settingsFile>${project.build.directory}/soapui/soapui-settings.xml</settingsFile> <outputFolder>${project.build.directory}/soapui/reports</outputFolder> 
								</configuration> </execution -->
							<!-- <execution> <id>FPDS-PUBSUB-Integration-Tests</id> <phase>test</phase> <goals> <goal>test</goal> </goals> <configuration> <projectFile>${FPDS_ROOT}/fpds-ear/src/test/resources/soapui/template/FPDS-PUBSUB-soapui-project.xml</projectFile> 
								<projectFile>${project.build.directory}/soapui/template/FPDS-PUBSUB-soapui-project.xml</projectFile> <settingsFile>${project.build.directory}/soapui/soapui-settings.xml</settingsFile> 
								<outputFolder>${project.build.directory}/soapui/reports</outputFolder> </configuration> </execution> -->
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>clover</id>
			<build>
				<plugins>
					<plugin>
						<groupId>com.atlassian.maven.plugins</groupId>
						<artifactId>maven-clover2-plugin</artifactId>
						<configuration>
							<excludes>
								<exclude>**/*Test.java</exclude>
								<exclude>**/*TestCase.java</exclude>
							</excludes>
						</configuration>
						<executions>
							<execution>
								<phase>pre-site</phase>
								<goals>
									<goal>instrument</goal>
									<goal>aggregate</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
	<pluginRepositories>
		<pluginRepository>
			<id>smartbear-sweden-plugin-repository</id>
			<url>http://www.soapui.org/repository/maven2/</url>
		</pluginRepository>
	</pluginRepositories>
	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-ear-plugin</artifactId>
				<configuration>
					<defaultJavaBundleDir>
						APP-INF/lib
					</defaultJavaBundleDir>
					<skinnyWars>true</skinnyWars>
					<finalName>${earFileName}</finalName>
					<version>1.4</version>
					<modules>
						<webModule>
							<groupId>gov.va.med.repositories</groupId>
							<artifactId>fpds-ws</artifactId>
							<contextRoot>/repositories.URL       /fpds/</contextRoot>
						</webModule>
					</modules>
				</configuration>
				<executions>
					<execution>
						<phase>package</phase>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>exec-maven-plugin</artifactId>
				<executions>
					<execution>
						<id>Deploy FPDS EAR</id>
						<phase>install</phase>
						<goals>
							<goal>exec</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<executable>java</executable>
					<includePluginDependencies>true</includePluginDependencies>
					<arguments>
						<argument>-classpath</argument>
						<argument>${WEBLOGIC_HOME}/server/lib/weblogic.jar</argument>
						<argument>weblogic.WLST</argument>
						<argument>src/main/resources/wlst/deploy.py</argument>
						<argument>${fpds.deploy.bounce.weblogic}</argument>
						<argument>${earFileName}</argument>
						<argument>${project.build.directory}/${earFileName}.ear</argument>
						<argument>${fpds.appserver.admin.username}</argument>
						<argument>${fpds.appserver.admin.password}</argument>
						<argument>${fpds.appserver.admin.url}</argument>
						<argument>${fpds.appserver.target.server}</argument>
						<argument>${fpds.appserver.domainname}</argument>
						<argument>${fpds.nmPort}</argument>
						<argument>${fpds.appserver.domaindir}</argument>
						<argument>${fpds.ear.name}</argument>
						<argument>${fpds.nmType}</argument>
					</arguments>
				</configuration>
			</plugin>
			<plugin>
				<!-- <groupId>org.apache.maven.plugins</groupId> -->
				<artifactId>maven-resources-plugin</artifactId>
				<executions>
					<execution>
						<id>copy-resources</id>
						<phase>process-test-resources</phase>
						<goals>
							<goal>testResources</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>com.smartbear.soapui</groupId>
				<artifactId>soapui-maven-plugin</artifactId>
				<dependencies>
					<dependency>
						<groupId>oracle</groupId>
						<artifactId>ojdbc6</artifactId>
						<version>11.1.0.7.0</version>
					</dependency>
					<!-- <dependency> <groupId>hermesjms</groupId> <artifactId>hermes</artifactId> <version>1.14</version> </dependency> -->
				</dependencies>
				<executions>
					<execution>
						<id>FPDS-FtP-VPR-Integration-Tests</id>
						<phase>install</phase>
						<goals>
							<goal>test</goal>
						</goals>
						<configuration>
							<projectFile>${project.build.directory}/soapui/template/FPDS-FTP-soapui-project.xml</projectFile>
							<settingsFile>${project.build.directory}/soapui/soapui-settings.xml</settingsFile>
							<outputFolder>${project.build.directory}/soapui/reports</outputFolder>
						</configuration>
					</execution>
					<!-- <execution> <id>FPDS-PGD-Integration-Tests</id> <phase>install</phase> <goals> <goal>test</goal> </goals> <configuration> <projectFile>${project.build.directory}/soapui/template/FPDS-PGD-soapui-project.xml</projectFile> 
						<settingsFile>${project.build.directory}/soapui/soapui-settings.xml</settingsFile> <outputFolder>${project.build.directory}/soapui/reports</outputFolder> 
						</configuration> </execution> -->
					<!-- <execution> <id>FPDS-PUBSUB-Integration-Tests</id> <phase>test</phase> <goals> <goal>test</goal> </goals> <configuration> <projectFile>${FPDS_ROOT}/fpds-ear/src/test/resources/soapui/template/FPDS-PUBSUB-soapui-project.xml</projectFile> 
						<projectFile>${project.build.directory}/soapui/template/FPDS-PUBSUB-soapui-project.xml</projectFile> <settingsFile>${project.build.directory}/soapui/soapui-settings.xml</settingsFile> 
						<outputFolder>${project.build.directory}/soapui/reports</outputFolder> </configuration> </execution> -->
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
			</plugin>
		</plugins>
		<testResources>
			<!-- <testResource> <directory>src/test/resources</directory> <excludes> <exclude>**/*.*</exclude> </excludes> <filtering>false</filtering> </testResource> -->
			<testResource>
				<directory>src/test/resources</directory>
				<targetPath>${project.build.directory}</targetPath>
				<includes>
					<include>**/*.xml</include>
				</includes>
				<filtering>true</filtering>
			</testResource>
		</testResources>
	</build>
</project>
