<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">
	<parent>
		<groupId>org.mobicents.tools</groupId>
		<artifactId>mobicents-tools-mmc</artifactId>
		<version>1.2.0.CR1</version>
	</parent>
	
	<modelVersion>4.0.0</modelVersion>
	
	<artifactId>gwt-management-console-war-setup</artifactId>
	
	<packaging>pom</packaging>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-dependency-plugin</artifactId>
				<executions>
					<execution>
						<id>copy-war</id>
						<phase>package</phase>
						<goals>
							<goal>copy</goal>
						</goals>
						<configuration>
							<artifactItems>
								<artifactItem>
									<groupId>${pom.groupId}</groupId>
									<artifactId>gwt-management-console-war</artifactId>
									<version>${pom.version}</version>
									<type>war</type>
									<overWrite>false</overWrite>
									<outputDirectory>
										${project.build.directory}
									</outputDirectory>
									<destFileName>
										management-console.war
									</destFileName>
								</artifactItem>
							</artifactItems>							
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<artifactId>maven-antrun-plugin</artifactId>
				<executions>
					<execution>
						<id>deploy-DU</id>
						<phase>install</phase>
						<goals>
							<goal>run</goal>
						</goals>
						<configuration>
							<tasks>
								<copy overwrite="true" file="target/management-console.war" todir="${jboss.home}/server/${node}/deploy" />
							</tasks>
						</configuration>
					</execution>
					<execution>
						<id>undeploy-DU</id>
						<phase>clean</phase>
						<goals>
							<goal>run</goal>
						</goals>
						<configuration>
							<tasks>
								<delete file="${jboss.home}/server/${node}/deploy/management-console.war" />
							</tasks>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>


</project>