<?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/xsd/maven-4.0.0.xsd">

	<parent>
		<groupId>org.sonatype.oss</groupId>
		<artifactId>oss-parent</artifactId>
		<version>7</version>
	</parent>

	<name>GWT Storage Manager</name>
	<description>
	A Wrapper around various storage API's available providing storage/caching capabilities for JSON objects and 
	caching of multimedia files on a local file sysem on mobile devices
	</description>

	<modelVersion>4.0.0</modelVersion>
	<groupId>ch.gbrain</groupId>
	<artifactId>gwt-storage</artifactId>
	<version>0.0.2</version>

	<properties>
		<!-- Convenience property to set the GWT version -->
		<gwtVersion>2.7.0</gwtVersion>
		<project.encoding>UTF-8</project.encoding>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.build.resourceEncoding>UTF-8</project.build.resourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
		<source.version>1.7</source.version>
		<target.version>1.7</target.version>
		<gwt.version>2.7.0</gwt.version>
		<timestamp>${maven.build.timestamp}</timestamp>
		<maven.build.timestamp.format>dd-MM-yyyy HH:mm:ss</maven.build.timestamp.format>
	</properties>

	<scm>
		<connection>scm:git:git@github.com:Kusig/gwt-storage.git</connection>
		<developerConnection>scm:git:git@github.com:Kusig/gwt-storage.git</developerConnection>
		<url>https://github.com/Kusig/gwt-storage.git</url>
		<tag>HEAD</tag>
	</scm>

	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>com.google.gwt</groupId>
				<artifactId>gwt</artifactId>
				<version>${gwtVersion}</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>

	<dependencies>
		<dependency>
			<groupId>com.google.gwt</groupId>
			<artifactId>gwt-user</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>com.googlecode.gwtphonegap</groupId>
			<artifactId>gwtphonegap</artifactId>
			<version>3.5.0.1</version>
		</dependency>
		<dependency>
			<groupId>javax.ws.rs</groupId>
			<artifactId>javax.ws.rs-api</artifactId>
			<version>2.0.1</version>
		</dependency>
		<dependency>
			<groupId>org.fusesource.restygwt</groupId>
			<artifactId>restygwt</artifactId>
			<version>2.0.3</version>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.11</version>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<build>
		<sourceDirectory>src/main/java</sourceDirectory>
		<resources>
			<resource>
				<directory>src/main/resources</directory>
				<excludes>
					<exclude>**/*.java</exclude>
				</excludes>
			</resource>
		</resources>

		<plugins>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>license-maven-plugin</artifactId>
				<version>1.8</version>
				<configuration>
					<licenseName>apache_v2</licenseName>
					<inceptionYear>2016</inceptionYear>
					<organizationName>gbrain.ch</organizationName>
					<projectName>GwtStorage</projectName>
					<includes>
						<include>**/*.java</include>
						<include>**/*.xml</include>
					</includes>
				</configuration>
				<executions>
					<execution>
						<goals>
							<goal>update-file-header</goal>
						</goals>
						<phase>process-sources</phase>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.1</version>
				<configuration>
					<source>1.7</source>
					<target>1.7</target>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>2.10.3</version>
				<configuration>
					<encoding>${project.build.sourceEncoding}</encoding>
					<locale>en</locale>
					<linksource>true</linksource>
					<validateLinks>true</validateLinks>
					<links>
						<link>https://github.com/gwtproject/gwt/tree/master/doc/validation-package-list</link>
					</links>
				</configuration>
				<executions>
					<execution>
						<phase>package</phase>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>gwt-maven-plugin</artifactId>
				<version>2.7.0</version>
				<configuration>
					<style>OBF</style>
					<modules>
						<module>ch.gbrain.gwtstorage.gwtstoragemanager</module>
					</modules>
				</configuration>
				<executions>
					<execution>
						<goals>
							<goal>compile</goal>
							<goal>resources</goal>
							<goal>test</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-gpg-plugin</artifactId>
				<version>1.5</version>
				<executions>
					<execution>
						<id>sign-artifacts</id>
						<phase>verify</phase>
						<goals>
							<goal>sign</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.sonatype.plugins</groupId>
				<artifactId>nexus-staging-maven-plugin</artifactId>
				<version>1.6.3</version>
				<extensions>true</extensions>
				<configuration>
					<serverId>ossrh</serverId>
					<nexusUrl>https://oss.sonatype.org/</nexusUrl>
					<autoReleaseAfterClose>true</autoReleaseAfterClose>
				</configuration>
			</plugin>

		</plugins>

		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-source-plugin</artifactId>
					<version>2.3</version>
					<executions>
						<execution>
							<id>attach-sources</id>
							<phase>verify</phase>
							<goals>
								<goal>jar-no-fork</goal>
							</goals>
						</execution>
					</executions>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>

	<profiles>
		<!-- Disable doclint on JDK 8 -->
		<profile>
			<id>nodoclint</id>
			<activation>
				<jdk>1.8</jdk>
			</activation>
			<build>
				<pluginManagement>
					<plugins>
						<plugin>
							<groupId>org.apache.maven.plugins</groupId>
							<artifactId>maven-javadoc-plugin</artifactId>
							<configuration>
								<additionalparam>-Xdoclint:none</additionalparam>
							</configuration>
						</plugin>
					</plugins>
				</pluginManagement>
			</build>
		</profile>
		<profile>
			<id>release-signed-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>
						<version>1.6</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>


	<distributionManagement>
		<snapshotRepository>
			<id>ossrh</id>
			<name>Sonatype Nexus snapshot repository</name>
			<url>https://oss.sonatype.org/content/repositories/snapshots</url>
		</snapshotRepository>
		<repository>
			<id>ossrh</id>
			<name>Sonatype Nexus release repository</name>
			<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
		</repository>
	</distributionManagement>

</project>