<?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">

	<!-- POM file generated with GWT webAppCreator -->
	<modelVersion>4.0.0</modelVersion>

	<parent>
		<groupId>org.discotools.gwt.leaflet</groupId>
		<artifactId>gwtl</artifactId>
		<version>0.3-ONMS-20130301-1</version>
	</parent>

	<artifactId>gwtl-example</artifactId>
	<packaging>war</packaging>
	<name>gwtl-example</name>

	<dependencies>
		<dependency>
			<groupId>com.google.gwt</groupId>
			<artifactId>gwt-user</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>javax.validation</groupId>
			<artifactId>validation-api</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>javax.validation</groupId>
			<artifactId>validation-api</artifactId>
			<classifier>sources</classifier>
			<scope>provided</scope>
		</dependency>
		
		<!-- org.discotools.gwt.leaflet dependencies -->
		<dependency>
			<groupId>org.discotools.gwt.leaflet</groupId>
			<artifactId>gwtl-proj4</artifactId>
			<version>0.3-ONMS-20130301-1</version>
		</dependency>
		<dependency>
			<groupId>org.discotools.gwt.leaflet</groupId>
			<artifactId>gwtl-search</artifactId>
			<version>0.3-ONMS-20130301-1</version>
		</dependency>
		<dependency>
			<groupId>org.discotools.gwt.leaflet</groupId>
			<artifactId>gwtl-widget</artifactId>
			<version>0.3-ONMS-20130301-1</version>
		</dependency>

		<dependency>
		    <groupId>org.discotools.gwt.leaflet</groupId>
		    <artifactId>gwtl-label</artifactId>
		    <version>0.3-ONMS-20130301-1</version>
		</dependency>
	</dependencies>
	
	<build>

		<!-- Generate compiled stuff in the folder used for developing mode -->
		<outputDirectory>${project.build.directory}/${project.build.finalName}/WEB-INF/classes</outputDirectory>

		<plugins>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>gwt-maven-plugin</artifactId>
				<!-- GWT version detected from dependencyManagement -->
		        <executions>
					<!-- JS is only needed in the package phase, this speeds up testing -->
					<execution>
						<goals>
							<goal>compile</goal>
						</goals>
					</execution>
				</executions>
				<!-- Set GWT plugin configuration specific to this project -->
				<configuration>
					<!-- Modules -->
					<module>org.discotools.gwt.leaflet.Example</module>
					<!-- URL that should be automatically opened in the GWT shell (gwt:run). -->
					<runTarget>example.html</runTarget>
					<!-- Hosted mode settings -->
					<hostedWebapp>${project.build.directory}/${project.build.finalName}</hostedWebapp>
				</configuration>
			</plugin>
			
			<!-- Copy static web files before executing gwt:run -->
			<plugin>
				<artifactId>maven-resources-plugin</artifactId>
			</plugin>

		</plugins>
	</build>
	
	<!-- Profiles -->
	<profiles>
	
		<!-- Google AppEngine profile -->
		<profile>
			<id>gae</id>
			<activation>
				<property><name>gae</name></property>
			</activation>
			
			<!-- Append to project build -->
			<build>
				<plugins>
					<plugin>
						<groupId>org.codehaus.mojo</groupId>
						<artifactId>gwt-maven-plugin</artifactId>
						<!-- GWT version detected from dependencyManagement -->
						<configuration>
							<!-- Google AppEngine -->
							<appEngineHome>${gae.home}</appEngineHome>
							<appEngineVersion>${gae.version}</appEngineVersion>
		    				<server>com.google.appengine.tools.development.gwt.AppEngineLauncher</server>					
						</configuration>
					</plugin>
										
					<!-- Google App Engine plugin -->
					<plugin>
						<groupId>net.kindleit</groupId>
						<artifactId>maven-gae-plugin</artifactId>
						<configuration>
		                    <serverId>appengine.google.com</serverId>
		                    <sdkDir>${gae.home}</sdkDir>
		                </configuration>
						<executions>
							<execution>
								<id />
								<phase>validate</phase>
								<goals>
									<goal>unpack</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					
					<!-- Mark the project for Google AppEngine -->
					<plugin>
						<artifactId>maven-eclipse-plugin</artifactId>
						<configuration>
							<additionalProjectnatures>
								<projectnature>com.google.appengine.eclipse.core.gaeNature</projectnature>
							</additionalProjectnatures>
						</configuration>
					</plugin>
					
				</plugins>
			</build>					
		</profile>				
	</profiles>
	
</project>
