<?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">

	<parent>
		<groupId>org.sonatype.oss</groupId>
		<artifactId>oss-parent</artifactId>
		<version>7</version>
	</parent>

	<modelVersion>4.0.0</modelVersion>
	<groupId>net.bobosse</groupId>
	<artifactId>gwt-rulesengine</artifactId>
	<packaging>jar</packaging>
	<version>0.1</version>
	<name>GWT rules engine extensions</name>

	<url>http://arcadien.github.com/gwt-rulesengine</url>

	<scm>
		<url>https://github.com/arcadien/gwt-rulesengine</url>
		<connection>scm:git:git://github.com/arcadien/gwt-rulesengine.git</connection>
		<developerConnection>scm:git:git@github.com:arcadien/gwt-rulesengine.git</developerConnection>
	</scm>

	<developers>
		<developer>
			<name>Aurélien Labrosse</name>
			<email>aurelien.labrosse at gmail.com</email>
			<timezone>GMT+1</timezone>
		</developer>
	</developers>
	
	<profiles>
		<profile>
			<id>release-sign-artifacts</id>
			<activation>
				<property>
					<name>performRelease</name>
					<value>true</value>
				</property>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
	
	<properties>
		<!-- Convenience property to set the GWT version -->
		<gwtVersion>2.4.0</gwtVersion>
		<!-- GWT needs at least java 1.5 -->
		<webappDirectory>${project.build.directory}/${project.build.finalName}</webappDirectory>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
	</properties>

	<dependencies>
		<dependency>
			<groupId>com.google.gwt</groupId>
			<artifactId>gwt-servlet</artifactId>
			<version>${gwtVersion}</version>
			<scope>runtime</scope>
		</dependency>
		<dependency>
			<groupId>com.google.gwt</groupId>
			<artifactId>gwt-user</artifactId>
			<version>${gwtVersion}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.7</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>javax.validation</groupId>
			<artifactId>validation-api</artifactId>
			<version>1.0.0.GA</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>javax.validation</groupId>
			<artifactId>validation-api</artifactId>
			<version>1.0.0.GA</version>
			<classifier>sources</classifier>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>com.allen-sauer.gwt.log</groupId>
			<artifactId>gwt-log</artifactId>
			<version>3.1.8</version>
		</dependency>
	</dependencies>


	<build>




		<!-- GWT projects need source to be included -->
		<resources>
			<resource>
				<directory>src/main/java</directory>
				<includes>
					<include>**/client/**</include>
					<include>**/*.gwt.xml</include>
				</includes>
			</resource>
		</resources>

		<!-- Generate compiled stuff in the folder used for developing mode -->
		<outputDirectory>${webappDirectory}/WEB-INF/classes</outputDirectory>

		<plugins>

			<!-- add source and javadoc jar generation -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<version>2.1.2</version>
				<executions>
					<execution>
						<id>attach-sources</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>2.8.1</version>
				<executions>
					<execution>
						<id>attach-javadocs</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<!-- GWT Maven Plugin -->
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>gwt-maven-plugin</artifactId>
				<version>2.4.0</version>
				<executions>
					<execution>
						<goals>
							<goal>compile</goal>
							<goal>test</goal>
							<!-- <goal>i18n</goal> -->
							<goal>generateAsync</goal>
						</goals>
					</execution>
				</executions>
				<!-- Plugin configuration. There are many available options, see gwt-maven-plugin 
					documentation at codehaus.org -->
				<configuration>
					<mode>htmlunit</mode>
					<runTarget>RulesEngine.html</runTarget>
					<hostedWebapp>${webappDirectory}</hostedWebapp>
					<i18nMessagesBundle>net.bobosse.gwt.rulesengine.client.Messages</i18nMessagesBundle>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>2.3.2</version>
				<configuration>
					<source>1.6</source>
					<target>1.6</target>
				</configuration>
			</plugin>

		</plugins>
	</build>

</project>
