<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.3.GA</version>
	</parent>
	<modelVersion>4.0.0</modelVersion>
	<artifactId>gwt-management-console-war</artifactId>
	<packaging>war</packaging>
	<name>Mobicents :: Tools  :: gwt-management-console-war</name>

	<build>
		<finalName>management-console</finalName>
		<plugins>
			<!--  currently gwt supports java 1.4 (client) source -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<configuration>
					<source>1.4</source>
					<target>1.4</target>
				</configuration>
			</plugin>
			<!-- All the fantastical settings that GWT needs -->
			<plugin>
				<groupId>com.totsp.gwt</groupId>
				<artifactId>maven-googlewebtoolkit2-plugin</artifactId>
				<version>2.0-beta25</version>
				<configuration>
					<!--
						gwtVersion can be specified, currently defaults to 1.4.61 if NOT
						specified
					-->
					<gwtVersion>${gwt.version}</gwtVersion>
					<logLevel>INFO</logLevel>
					<compileTargets>
						<value>org.mobicents.slee.container.management.console.ManagementConsole</value>
					</compileTargets>
					<runTarget>org.mobicents.slee.container.management.console.ManagementConsole/ManagementConsole.html</runTarget>
					<generatorRootClasses>
						<value>org.mobicents.slee.container.management.console.ManagementConsole</value>
					</generatorRootClasses>
					<overwriteGeneratedClasses>true</overwriteGeneratedClasses>

					<!-- use style OBF for prod -->
					<!-- <style>DETAILED</style> -->
					<!--
						<generateGettersAndSetters> true </generateGettersAndSetters>
					-->
					<noServer>false</noServer>
					<extraJvmArgs>-Xmx1024m</extraJvmArgs>
					<!-- <extraJvmArgs>-Dgwt.coverage.enable=true</extraJvmArgs>  -->
				</configuration>
				<executions>
					<execution>
						<goals>
							<goal>mergewebxml</goal>
							<goal>compile</goal>
							<goal>gwt</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-war-plugin</artifactId>
				<configuration>
					<webXml>target/web.xml</webXml>
				</configuration>
			</plugin>
			<!--
				<plugin> <groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-dependency-plugin</artifactId> <executions>
				<execution> <id>unpack</id> <phase>compile</phase> <goals>
				<goal>unpack</goal> </goals> <configuration> <artifactItems>
				<artifactItem> <groupId>com.google.gwt</groupId>
				<artifactId>gwt-dev</artifactId> <version>${gwt.version}</version>
				<classifier>${platform}-libs</classifier> <type>zip</type>
				<overWrite>true</overWrite>
				<outputDirectory>${settings.localRepository}/com/google/gwt/gwt-dev/${gwtVersion}</outputDirectory>
				</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/${build.finalName}.war" todir="${jboss.home}/server/${node}/deploy" />
										<delete failonerror="false" dir="${user.dir}/.gwt-cache" />
									</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/${build.finalName}.war" />
									</tasks>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>			
	</build>


	<dependencies>
		<dependency>
			<groupId>${pom.groupId}</groupId>
			<artifactId>gwt-management-console-server</artifactId>
		</dependency>
		<!--  GWT deps -->
		<dependency>
			<groupId>com.google.gwt</groupId>
			<artifactId>gwt-servlet</artifactId>
			<scope>runtime</scope>
		</dependency>
		<dependency>
			<groupId>com.google.gwt</groupId>
			<artifactId>gwt-user</artifactId>
			<scope>provided</scope>
		</dependency>
		<!--
			<dependency> <groupId>com.google.gwt</groupId>
			<artifactId>gwt-dev</artifactId>
			<classifier>${platform}-libs</classifier> <type>zip</type>
			<scope>provided</scope> </dependency>
		-->
		<dependency>
			<groupId>com.google.gwt</groupId>
			<artifactId>gwt-dev</artifactId>
			<classifier>${platform}</classifier>
			<scope>provided</scope>
		</dependency>

		<!--
			coverage patch (used to generate code coverage data for GwtTestCase
			based tests, when -Dgwt.coverage.enable=true
		-->

		<dependency>
			<groupId>jboss</groupId>
			<artifactId>jboss-common</artifactId>
			<version>${jboss.version}</version>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.1</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>emma</groupId>
			<artifactId>emma</artifactId>
			<version>2.0.5312</version>
			<scope>test</scope>
		</dependency>
	</dependencies>
	
</project>