<?xml version="1.0" encoding="UTF-8"?>
<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>net.officefloor.plugin</groupId>
		<artifactId>plugins</artifactId>
		<version>1.2.0</version>
	</parent>
	<artifactId>officeplugin_gwt</artifactId>
	<packaging>war</packaging>
	<name>GWT Plug-in</name>
	<description>OfficeFloor plug-in for GWT</description>
	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<webappDirectory>${project.build.directory}/${project.build.finalName}</webappDirectory>
		<gwt.version>2.2.0</gwt.version>
	</properties>
	<build>
		<outputDirectory>${webappDirectory}/WEB-INF/classes</outputDirectory>

		<!-- GWT -->	
		<plugins>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>gwt-maven-plugin</artifactId>
				<version>${gwt.version}</version>
				<executions>
					<execution>
						<goals>
							<goal>compile</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<runTarget>example.html</runTarget>
					<hostedWebapp>${webappDirectory}</hostedWebapp>
				</configuration>
			</plugin>

			<!-- Copy static web files before executing gwt:run -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-war-plugin</artifactId>
				<version>2.1.1</version>
				<executions>
					<execution>
						<phase>compile</phase>
						<goals>
							<goal>exploded</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<webappDirectory>${webappDirectory}</webappDirectory>
				</configuration>
			</plugin>

		</plugins>
	</build>
	<dependencies>
		<dependency>
			<groupId>com.google.gwt</groupId>
			<artifactId>gwt-user</artifactId>
			<version>${gwt.version}</version>
			<scope>provided</scope>
		</dependency>
	</dependencies>
</project>