<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.repos.mediator</groupId>
		<artifactId>mediator-app</artifactId>
		<version>4.0.1</version>
		<relativePath>../pom.xml</relativePath>
	</parent>
	<artifactId>mediator-ear</artifactId>
	<name>Mediator Enterprise Application Resource</name>
	<packaging>ear</packaging>
	<description>Message Mediator Enterprise Application Deployment Module</description>
	<properties>
		<earFileName>${project.artifactId}-${project.version}</earFileName>
		<mediator.deploy.bounce.weblogic>False</mediator.deploy.bounce.weblogic>
	</properties>
	<dependencies>
		<dependency>
			<groupId>gov.va.med.repos.mediator</groupId>
			<artifactId>mediator-client</artifactId>
		</dependency>
		<dependency>
			<groupId>gov.va.med.repos.mediator</groupId>
			<artifactId>mediator-ejb</artifactId>
			<type>ejb</type>
		</dependency>
		<dependency>
			<groupId>gov.va.med.repos.mediator</groupId>
			<artifactId>mediator-ws</artifactId>
			<type>war</type>
		</dependency>
		<dependency>
			<groupId>gov.va.med.repos.lib</groupId>
			<artifactId>common</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-jaxws</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.cxf</groupId>
			<artifactId>cxf-rt-frontend-jaxrs</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>javax.ws.rs</groupId>
			<artifactId>javax.ws.rs-api</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>org.springframework</groupId>
			<artifactId>spring-web</artifactId>
		</dependency>
		<dependency>
			<groupId>commons-logging</groupId>
			<artifactId>commons-logging</artifactId>
		</dependency>
	</dependencies>
	<profiles>
		<profile>
			<!-- Profile for stopping and starting the server that is being deployed to. -->
			<id>bounce-weblogic</id>
			<properties>
				<mediator.deploy.bounce.weblogic>True</mediator.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>
					</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 Mediator 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/mediator-deploy.py</argument>
						<!-- argument>${cds.run.properties.path}</argument -->
						<argument>${mediator.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>
			<!-- plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <executions> <execution> <id>Deploy Mediator EAR</id> 
				<phase>install</phase> <goals> <goal>exec</goal> </goals> </execution> </executions> <configuration> <executable>java</executable> <includePluginDependencies>true</includePluginDependencies> 
				<arguments> <argument>-Dprod.props.file=${WEBLOGIC_HOME}/.product.properties</argument> <argument>-classpath</argument> <argument>${WEBLOGIC_HOME}/server/lib/weblogic.jar</argument> 
				<argument>weblogic.WLST</argument> <argument>./src/main/resources/wlst/mediator-deploy.py</argument> <argument>${cds.run.properties.path}</argument> 
				<argument>${mediator.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> 
				</arguments> </configuration> </plugin -->
		</plugins>
	</build>
</project>
