<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>org.gwtopenmaps.openlayers</groupId>
		<artifactId>gwt-openlayers</artifactId>
		<version>0.6-SNAPSHOT</version>
	</parent>
	<artifactId>gwt-openlayers-showcase</artifactId>
	<name>${project.artifactId}</name>
	<dependencies>
		<dependency>
			<groupId>com.google.gwt</groupId>
			<artifactId>gwt-user</artifactId>
		</dependency>
		<dependency>
			<groupId>${project.groupId}</groupId>
			<artifactId>gwt-openlayers-client</artifactId>
			<version>${project.version}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>${project.groupId}</groupId>
			<artifactId>gwt-openlayers-server</artifactId>
			<version>${project.version}</version>
			<scope>runtime</scope>
		</dependency>
	</dependencies>
	<build>
		<resources>
			<resource>
				<directory>src/main/java</directory>
			</resource>
			<resource>
				<directory>src/main/resources</directory>
			</resource>
		</resources>
		<outputDirectory>${basedir}/war/WEB-INF/classes</outputDirectory>
		<plugins>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>gwt-maven-plugin</artifactId>
				<version>2.2.0</version>
				<executions>
					<execution>
						<phase>compile</phase>
						<goals>
							<goal>compile</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<warSourceDirectory>${basedir}/war</warSourceDirectory>
					<!-- 
					Copy web app seems to be necessary for mvn gwt:run to pick
					up server stuff when using version 2.2.0 of gwt-maven-plugin.
					 -->
					<copyWebapp>true</copyWebapp>
					<runTarget>org.gwtopenmaps.demo.openlayers.GwtOpenLayersShowcase/GwtOpenLayersShowcase.html</runTarget>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-resources-plugin</artifactId>
				<version>2.4.2</version>
				<executions>
					<execution>
						<id>copy-resources</id>
						<phase>process-resources</phase>
						<goals>
							<goal>copy-resources</goal>
						</goals>
						<configuration>
							<outputDirectory>${basedir}/war/WEB-INF</outputDirectory>
							<resources>
								<resource>
									<directory>${basedir}/src/main/webapp/WEB-INF</directory>
									<filtering>false</filtering>
									<includes>
										<include>web.xml</include>
									</includes>
								</resource>
							</resources>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<!-- also remove the war directory when running a clean -->
			<plugin>
				<artifactId>maven-clean-plugin</artifactId>
				<version>2.3</version>
				<configuration>
					<filesets>
						<fileset>
							<directory>${basedir}/war</directory>
						</fileset>
					</filesets>
				</configuration>
			</plugin>
		</plugins>
	</build>
</project>