<?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">
	<modelVersion>4.0.0</modelVersion>

	<groupId>pl.tecna.gwt</groupId>
	<artifactId>gwt-connectors</artifactId>
	<packaging>jar</packaging>
	<version>2.7</version>

	<name>GWT Connectors</name>
	<description>A library for drawing connections between shapes on diagrams.</description>
	<url>https://github.com/robertwaszkowski/gwt-connectors</url>

	<issueManagement>
		<url>https://github.com/robertwaszkowski/gwt-connectors/issues</url>
		<system>GitHub Issues</system>
	</issueManagement>

	<licenses>
		<license>
			<name>The Apache Software License, Version 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
			<distribution>repo</distribution>
		</license>
	</licenses>

	<scm>
		<connection>scm:git:https://github.com/robertwaszkowski/gwt-connectors.git</connection>
		<developerConnection>scm:git:https://github.com/robertwaszkowski/gwt-connectors.git</developerConnection>
		<url>https://github.com/robertwaszkowski/gwt-connectors</url>
	</scm>

	<developers>
		<developer>
			<id>kamil.kurek</id>
			<name>Kamil Kurek</name>
			<email>kurek@tecna.pl</email>
		</developer>
		<developer>
			<id>piotr.ostrowski</id>
			<name>Piotr Ostrowski</name>
			<email>yuppy@avd.pl</email>
		</developer>
		<developer>
			<id>robert.waszkowski</id>
			<name>Robert Waszkowski</name>
			<email>robert.waszkowski@gmail.com</email>
		</developer>
	</developers>

	<properties>
		<gwt.version>2.5.1</gwt.version>
		<gwt-dnd.version>3.1.2</gwt-dnd.version>

		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
	</properties>
	
	<distributionManagement>
		<snapshotRepository>
			<id>ossrh</id>
			<url>https://oss.sonatype.org/content/repositories/snapshots</url>
		</snapshotRepository>
		<repository>
			<id>ossrh</id>
			<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
		</repository>
	</distributionManagement>

	<build>
		<resources>
			<resource>
				<directory>src/main/resources</directory>
				<filtering>true</filtering>
			</resource>
			<resource>
				<directory>src/main/java</directory>
				<includes>
					<include>**/client/**</include>
					<include>**/shared/**</include>
					<include>**/*.gwt.xml</include>
				</includes>
			</resource>
		</resources>

		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.1</version>
				<configuration>
					<source>1.6</source>
					<target>1.6</target>
					<encoding>UTF-8</encoding>
				</configuration>
			</plugin>
			
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<version>2.2.1</version>
				<executions>
					<execution>
						<id>attach-sources</id>
						<goals>
							<goal>jar-no-fork</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>2.9.1</version>
				<executions>
					<execution>
						<id>attach-javadocs</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			
			<plugin>
				<groupId>external.atlassian.jgitflow</groupId>
				<artifactId>jgitflow-maven-plugin</artifactId>
				<version>1.0-m5.1</version>
				<configuration>
					<allowSnapshots>true</allowSnapshots>
					<autoVersionSubmodules>true</autoVersionSubmodules>
					<noDeploy>true</noDeploy>
					<pushChanges>false</pushChanges>
				</configuration>
			</plugin>
			
			<plugin>
				<groupId>org.sonatype.plugins</groupId>
				<artifactId>nexus-staging-maven-plugin</artifactId>
				<version>1.6.6</version>
				<extensions>true</extensions>
				<configuration>
					<serverId>ossrh</serverId>
					<nexusUrl>https://oss.sonatype.org/</nexusUrl>
					<autoReleaseAfterClose>true</autoReleaseAfterClose>
				</configuration>
			</plugin>
		</plugins>
	</build>

	<!-- Dependencies -->
	<dependencies>
		<dependency>
			<groupId>com.allen-sauer.gwt.dnd</groupId>
			<artifactId>gwt-dnd</artifactId>
			<version>${gwt-dnd.version}</version>
		</dependency>

		<dependency>
			<groupId>com.google.gwt</groupId>
			<artifactId>gwt-user</artifactId>
			<version>${gwt.version}</version>
		</dependency>
	</dependencies>

	<!-- Profiles -->
	<profiles>
		<profile>
			<id>release</id>

			<build>
				<plugins>
					<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>
						<!--<configuration>
							<useAgent>true</useAgent>
						</configuration>-->
					</plugin>
				</plugins>
			</build>
		</profile>

		<profile>
			<id>test</id>

			<build>
				<plugins>
					<plugin>
						<groupId>org.codehaus.mojo</groupId>
						<artifactId>gwt-maven-plugin</artifactId>
						<version>${gwt.version}</version>
						<executions>
							<execution>
								<goals>
									<goal>compile</goal>
								</goals>
							</execution>
						</executions>
						<configuration>
							<runTarget>/</runTarget>
							<gwtSdkFirstInClasspath>true</gwtSdkFirstInClasspath>
							<modules>
								<module>pl.tecna.gwt.connectors.test.Example</module>
							</modules>
						</configuration>
					</plugin>

					<plugin>
						<artifactId>maven-resources-plugin</artifactId>
						<configuration>
							<encoding>UTF-8</encoding>
						</configuration>
						<version>2.4</version>
						<executions>
							<execution>
								<id>copy-resources-war</id>
								<phase>validate</phase>
								<goals>
									<goal>copy-resources</goal>
								</goals>
								<configuration>
									<outputDirectory>${project.build.directory}/${project.build.finalName}</outputDirectory>
									<resources>
										<resource>
											<directory>src/main/webapp/</directory>
										</resource>
									</resources>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>
