<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/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<parent>
		<groupId>org.vectomatic</groupId>
		<artifactId>vectomatic-parent</artifactId>
		<version>0.4</version>
	</parent>
	<artifactId>vectomatic-gwt-parent</artifactId>
	<version>0.4</version>
	<packaging>pom</packaging>

	<name>Vectomatic parent pom for GWT projects</name>
	<description>Groups maven configuration elements common to all Vectomatic GWT projects</description>
	<scm>
		<url>scm:git:git@github.com:laaglu/vectomatic-gwt-parent.git</url>
		<connection>scm:git:git@github.com:laaglu/vectomatic-gwt-parent.git</connection>
		<developerConnection>scm:git:git@github.com:laaglu/vectomatic-gwt-parent.git</developerConnection>
	</scm>
	
	<properties>
 		<!-- Properties for maven-gwt-plugin -->
 		<gwt.style>OBF</gwt.style>
 		<gwt.logLevel>WARN</gwt.logLevel>
		<gwt.localWorkers>2</gwt.localWorkers>
	</properties>
	<dependencyManagement>
		<dependencies>
		</dependencies>
	</dependencyManagement>
	<dependencies>
		<dependency>
			<groupId>com.google.gwt</groupId>
			<artifactId>gwt-user</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>com.google.gwt</groupId>
			<artifactId>gwt-dev</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>javax.validation</groupId>
			<artifactId>validation-api</artifactId>
		</dependency>
		<dependency>
			<groupId>javax.validation</groupId>
			<artifactId>validation-api</artifactId>
			<classifier>sources</classifier>
		</dependency>
	</dependencies>
	<build>
      <plugins>
			<!-- Produce a skinny war as only the GWT-generated files are of interest -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-war-plugin</artifactId>
				<configuration>
					<packagingExcludes>WEB-INF/lib/*.jar,WEB-INF/classes/**</packagingExcludes>
				</configuration>
                <version>2.4</version>
			</plugin>
			
			<!-- Configure the GWT-Maven plugin -->
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>gwt-maven-plugin</artifactId>
			  <!-- Use patch version of GWT maven plugin to address
			   http://jira.codehaus.org/browse/MGWT-216 and http://jira.codehaus.org/browse/MGWT-285 -->
				<version>2.6.0</version>
				<executions>
					<execution>
						<id>gwt compilation</id>
						<configuration>
							<modules>
								<module>${gwt.module}</module>
							</modules>
							<style>${gwt.style}</style>
							<logLevel>${gwt.logLevel}</logLevel>
							<localWorkers>${gwt.localWorkers}</localWorkers>
							<extraJvmArgs>-Xmx512m</extraJvmArgs>
							<gen>${project.build.directory}/gen</gen>
							<extra>${project.build.directory}/aux</extra>
                            <enableClosureCompiler>true</enableClosureCompiler>
						</configuration>
						<goals>
							<goal>compile</goal>
						</goals>
					</execution>
					<execution>
						<id>gwt unit tests</id>
						<configuration>
							<includes>**/*GwtTestSuite.java</includes>
							<mode>selenium</mode>
							<testTimeOut>240</testTimeOut>
      						<selenium>localhost:4444/*firefox"</selenium>
      					</configuration>
						<goals>
							<goal>test</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>2.4.3</version>
				<configuration>
					<excludes>
						<exclude>**/*GwtTest.java</exclude>
						<exclude>**/*GwtTestSuite.java</exclude>
					</excludes>
				</configuration>
			</plugin>
   		</plugins>
   	</build>
</project>
