<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.cds</groupId>
		<artifactId>cds</artifactId>
		<version>3.15.0.2-SNAPSHOT</version>
		<relativePath>../pom.xml</relativePath>
	</parent>
	<artifactId>cdsn-ear</artifactId>
	<name>CDSN: cdsn-ear</name>
	<packaging>ear</packaging>
	<description>Clinical Data Service Enterprise Application Deployment Module</description>
	<properties>
		<earFileName>${project.artifactId}-${project.version}</earFileName>
		<cds.deploy.bounce.weblogic>False</cds.deploy.bounce.weblogic>
	</properties>
	<dependencies>
		<dependency>
			<groupId>gov.va.med.cds</groupId>
			<artifactId>cdsn-ejb</artifactId>
			<type>ejb</type>
		</dependency>
		<dependency>
			<groupId>gov.va.med.cds</groupId>
			<artifactId>cdsn-logger-ejb</artifactId>
			<type>ejb</type>
		</dependency>
		<dependency>
			<groupId>gov.va.med.cds</groupId>
			<artifactId>cdsn-ws</artifactId>
			<type>war</type>
		</dependency>
		<dependency>
			<groupId>gov.va.med.cds</groupId>
			<artifactId>cdsn-pathways-ws</artifactId>
			<type>war</type>
		</dependency>
		<dependency>
			<groupId>gov.va.med.cds</groupId>
			<artifactId>cdsn-log4j-configuration</artifactId>
			<type>jar</type>
		</dependency>
		<dependency>
			<groupId>org.apache.cxf</groupId>
			<artifactId>cxf-core</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.cxf</groupId>
			<artifactId>cxf-rt-transports-http</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.cxf</groupId>
			<artifactId>cxf-rt-frontend-simple</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.cxf</groupId>
			<artifactId>cxf-rt-frontend-jaxrs</artifactId>
			<exclusions>
				<exclusion>
					<groupId>javax.annotation</groupId>
					<artifactId>javax.annotation-api</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>org.apache.cxf</groupId>
			<artifactId>cxf-rt-frontend-jaxws</artifactId>
			<exclusions>
				<exclusion>
					<artifactId>org.ow2.asm</artifactId>
					<groupId>asm</groupId>
				</exclusion>
				<exclusion>
					<groupId>org.apache.cxf</groupId>
					<artifactId>cxf-rt-bindings-xml</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>org.ow2.asm</groupId>
			<artifactId>asm</artifactId>
			<version>5.0.4</version>
		</dependency>
		<dependency>
			<groupId>wsdl4j</groupId>
			<artifactId>wsdl4j</artifactId>
			<version>1.6.3</version>
		</dependency>
		<dependency>
			<groupId>org.apache.cxf</groupId>
			<artifactId>cxf-rt-bindings-soap</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.cxf</groupId>
			<artifactId>cxf-rt-databinding-jaxb</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.cxf</groupId>
			<artifactId>cxf-rt-wsdl</artifactId>
			<exclusions>
				<exclusion>
					<groupId>wsdl4j</groupId>
					<artifactId>wsdl4j</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>org.apache.cxf</groupId>
			<artifactId>cxf-rt-ws-addr</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.cxf</groupId>
			<artifactId>cxf-rt-ws-security</artifactId>
		</dependency>
		<dependency>
  			<groupId>org.apache.cxf</groupId>
  			<artifactId>cxf-rt-rs-security-xml</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.ws.xmlschema</groupId>
			<artifactId>xmlschema-core</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.springframework</groupId>
			<artifactId>spring-webmvc</artifactId>
		</dependency>
		<dependency>
			<groupId>gov.va.med.cds</groupId>
			<artifactId>cds-client</artifactId>
		</dependency>
		<dependency>
			<groupId>gov.va.med.cds</groupId>
			<artifactId>cds-core</artifactId>
		</dependency>
		<dependency>
			<groupId>gov.va.med.repos.lib</groupId>
			<artifactId>common</artifactId>
		</dependency>
		<dependency>
			<groupId>gov.va.med.cds.ws</groupId>
			<artifactId>common-ws</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-web</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-aop</artifactId>
		</dependency>
	</dependencies>
	<profiles>
		<profile>
			<!-- Profile for stopping and starting the server that is being deployed to. -->
			<id>bounce-weblogic</id>
			<properties>
				<cds.deploy.bounce.weblogic>True</cds.deploy.bounce.weblogic>
			</properties>
		</profile>
	</profiles>
	<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.cds</groupId>
							<artifactId>cdsn-ws</artifactId>
							<contextRoot>/cds-wsclient</contextRoot>
						</webModule>
						<webModule>
							<groupId>gov.va.med.cds</groupId>
							<artifactId>cdsn-pathways-ws</artifactId>
							<contextRoot>/repositories.med.DNS   </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 CDS 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/cds-deploy-main.py</argument>
						<!--<argument>${cds.run.properties.path}</argument> -->
						<argument>${cds.deploy.bounce.weblogic}</argument>
						<argument>${earFileName}</argument>
						<argument>${project.build.directory}/${earFileName}.ear</argument>
						<argument>${cds.appserver.admin.username}</argument>
						<argument>${cds.appserver.admin.password}</argument>
						<argument>${cds.appserver.admin.url}</argument>
						<argument>${cds.appserver.target.server}</argument>
						<argument>${cds.appserver.domainname}</argument>
						<argument>${cds.nmPort}</argument>
						<argument>${cds.appserver.domaindir}</argument>
						<argument>${cds.nmType}</argument>
					</arguments>
				</configuration>
			</plugin>
		</plugins>
	</build>
</project>
