<project
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
	xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<modelVersion>4.0.0</modelVersion>
	<artifactId>overlord-rtgov-dist-client-wildfly8</artifactId>
	<packaging>pom</packaging>
	<name>Overlord RTGov::Distribution::Client Wildfly8</name>

	<parent>
		<groupId>org.overlord.rtgov</groupId>
		<artifactId>distribution</artifactId>
		<version>2.1.0.Final</version>
	</parent>

	<dependencies>
		<dependency>
			<groupId>org.overlord.rtgov</groupId>
			<artifactId>overlord-rtgov-client-wildfly8</artifactId>
			<type>war</type>
		</dependency>
		<dependency>
			<groupId>org.overlord.rtgov</groupId>
			<artifactId>overlord-rtgov-switchyard-eap6</artifactId>
			<type>war</type>
		</dependency>


        <!-- Documentation -->
		<dependency>
			<groupId>org.overlord.rtgov.docs</groupId>
			<artifactId>rtgov-developerguide</artifactId>
            <type>jdocbook</type>
		</dependency>
		<dependency>
			<groupId>org.overlord.rtgov.docs</groupId>
			<artifactId>rtgov-userguide</artifactId>
            <type>jdocbook</type>
		</dependency>
		<dependency>
			<groupId>org.overlord.rtgov.docs</groupId>
			<artifactId>rtgov-javadoc</artifactId>
            <type>javadoc</type>
		</dependency>
<!--
		<dependency>
			<groupId>org.overlord.rtgov.docs</groupId>
			<artifactId>rtgov-restapi</artifactId>
            <type>zip</type>
		</dependency>
-->

		<!--Other dependencies-->
		<dependency>
			<groupId>org.apache.ant</groupId>
			<artifactId>ant</artifactId>
		</dependency>  
		<dependency>
			<groupId>org.apache.ant</groupId>
			<artifactId>ant-launcher</artifactId>
		</dependency>  
	</dependencies> 

	<build>
		<resources>
			<resource>
 				<directory>src/main/java</directory>
				<includes>
					<include>**/*</include>
				</includes>
			</resource>
		</resources>
		<plugins>
			<plugin>
				<artifactId>maven-assembly-plugin</artifactId>
                <dependencies>
                    <dependency>
                        <!-- Entry needed to enable jdocbook unzipping -->
                        <groupId>org.jboss.maven.plugins</groupId>
                        <artifactId>maven-jdocbook-plugin</artifactId>
                        <version>2.3.8</version>
                    </dependency>
                </dependencies>
				<executions>
					<execution>
						<id>bin</id>
						<phase>process-resources</phase>
						<goals>
							<goal>single</goal>
						</goals>
						<configuration>
							<appendAssemblyId>false</appendAssemblyId>
							<descriptors>
								<descriptor>src/main/assembly/bin.xml</descriptor>
							</descriptors>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>

	<profiles>
		<profile>
			<id>docker</id>
			<build>
				<finalName>${project.artifactId}</finalName>
				<plugins>
					<plugin>
						<groupId>com.spotify</groupId>
						<artifactId>docker-maven-plugin</artifactId>
						<version>0.1.1</version>
						<executions>
							<execution>
								<phase>package</phase>
								<goals>
									<goal>build</goal>
								</goals>
							</execution>
						</executions>
						<configuration>
							<imageName>${project.artifactId}:${project.version}</imageName>
							<dockerDirectory>${project.basedir}/src/main/docker</dockerDirectory>
							<resources>
								<resource>
									<targetPath>/</targetPath>
									<directory>${project.build.directory}</directory>
									<include>${project.artifactId}.zip</include>
								</resource>
							</resources>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>	

</project>
