<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>de.knightsoft-net</groupId>
    <artifactId>gwt-seo</artifactId>
    <version>0.2</version>
    <name>GWT-SEO</name>
    <inceptionYear>2015</inceptionYear>
    <description>SEO</description>
    <url>http://arcbees.github.io/gwt-seo/</url>

    <licenses>
        <license>
            <name>Apache 2</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
            <comments>A business-friendly OSS license</comments>
        </license>
    </licenses>

    <organization>
        <name>Arcbees</name>
        <url>http://arcbees.com</url>
    </organization>

    <developers>
        <developer>
            <id>maxime.meriouma</id>
            <name>Maxime Meriouma-Caron</name>
            <email>maxime.meriouma@arcbees.com</email>
            <organization>Arcbees</organization>
            <organizationUrl>http://www.arcbees.com</organizationUrl>
            <roles>
                <role>developer</role>
            </roles>
        </developer>
    </developers>

	<scm>
		<url>https://github.com/ManfredTremmel/gwt-seo.git</url>
		<connection>scm:git:git@github.com/ManfredTremmel/gwt-pushstate.git</connection>
		<developerConnection>scm:git:git@github.com/ManfredTremmel/gwt-pushstate.git</developerConnection>
	</scm>


	<repositories>
		<repository>
			<id>sonatype-nexus-snapshots</id>
			<name>Sonatype Nexus Snapshots</name>
			<url>https://oss.sonatype.org/content/repositories/snapshots</url>
			<releases>
				<enabled>false</enabled>
			</releases>
			<snapshots>
				<enabled>true</enabled>
			</snapshots>
		</repository>
	</repositories>

	<distributionManagement>
		<snapshotRepository>
			<id>sonatype-nexus-snapshots</id>
			<name>Sonatype Nexus Snapshots</name>
			<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
		</snapshotRepository>
		<repository>
			<id>sonatype-nexus-staging</id>
			<name>Nexus Release Repository</name>
			<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
		</repository>
	</distributionManagement>

    <properties>
        <target.jdk>1.8</target.jdk>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

        <gwt.version>2.8.2</gwt.version>

        <!-- Testing -->
        <jukito.version>1.5</jukito.version>
        <junit.version>4.12</junit.version>
        <mockito.version>2.16.0</mockito.version>
        <assertj-core.version>3.9.1</assertj-core.version>
        <gwtmockito.version>1.1.8</gwtmockito.version>

        <!-- Maven -->
        <maven-checkstyle-plugin.version>2.13</maven-checkstyle-plugin.version>
        <checkstyle.version>6.2</checkstyle.version>
        <arcbees-checkstyle.version>1.2</arcbees-checkstyle.version>
        <maven-compiler-plugin.version>3.7.0</maven-compiler-plugin.version>
        <maven-surefire-plugin.version>2.21.0</maven-surefire-plugin.version>
		<nexus-staging-maven-plugin.version>1.6.8</nexus-staging-maven-plugin.version>
        <maven-release-plugin.version>2.5.3</maven-release-plugin.version>
		<maven-source-plugin.version>3.0.1</maven-source-plugin.version>
		<maven-javadoc-plugin.version>3.0.0</maven-javadoc-plugin.version>
		<wagon-webdav-jackrabbit.version>3.0.0</wagon-webdav-jackrabbit.version>
		<maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>

        <!-- Used for releasing to sonatype as command line parameter -->
        <gpg.passphrase>SetAsParam</gpg.passphrase>
        <github.username>SetAsParam</github.username>
        <github.password>SetAsParam</github.password>

        <release.fast>-Dcheckstyle.skip -DskipTests -Dmaven.test.skip</release.fast>
    </properties>

	<prerequisites>
		<maven>3.0.0</maven>
	</prerequisites>

    <build>
        <resources>
            <resource>
                <directory>${basedir}/src/main/java</directory>
            </resource>
            <resource>
                <directory>${basedir}/src/main/resources</directory>
            </resource>
        </resources>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>

                <configuration>
                    <source>${target.jdk}</source>
                    <target>${target.jdk}</target>
                    <encoding>${project.build.sourceEncoding}</encoding>
                </configuration>
            </plugin>

            <!-- Skip GWTTests during JUnit tests -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${maven-surefire-plugin.version}</version>
                <configuration>
                    <additionalClasspathElements>
                        <additionalClasspathElement>${project.build.sourceDirectory}</additionalClasspathElement>
                        <additionalClasspathElement>${project.build.testSourceDirectory}</additionalClasspathElement>
                    </additionalClasspathElements>
                    <useManifestOnlyJar>false</useManifestOnlyJar>
                    <includes>
                        <include>**/*Test.java</include>
                        <include>**/*TestCase.java</include>
                        <include>**/*GwtTest.java</include>
                    </includes>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>${maven-release-plugin.version}</version>
                <configuration>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <useReleaseProfile>false</useReleaseProfile>
                    <releaseProfiles>release</releaseProfiles>
                    <arguments>
                        -Psonatype-oss-release -Prelease -Dgpg.passphrase=${gpg.passphrase} ${release.fast}
                    </arguments>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>${maven-checkstyle-plugin.version}</version>
                <configuration>
                    <configLocation>/checkstyle.xml</configLocation>
                    <suppressionsLocation>/suppressions.xml</suppressionsLocation>
                    <propertyExpansion>basedir=${basedir}</propertyExpansion>
                    <consoleOutput>true</consoleOutput>
                    <failsOnError>true</failsOnError>
                    <linkXRef>false</linkXRef>
                    <includeTestSourceDirectory>true</includeTestSourceDirectory>
                </configuration>

                <dependencies>
                    <dependency>
                        <groupId>com.puppycrawl.tools</groupId>
                        <artifactId>checkstyle</artifactId>
                        <version>${checkstyle.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>com.arcbees</groupId>
                        <artifactId>checkstyle</artifactId>
                        <version>${arcbees-checkstyle.version}</version>
                    </dependency>
                </dependencies>

                <executions>
                    <execution>
                        <id>validate</id>
                        <phase>validate</phase>
                        <goals>
                            <goal>checkstyle</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<version>${maven-source-plugin.version}</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>${maven-javadoc-plugin.version}</version>
				<executions>
					<execution>
						<id>attach-javadocs</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-gpg-plugin</artifactId>
				<version>${maven-gpg-plugin.version}</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>${nexus-staging-maven-plugin.version}</version>
				<extensions>true</extensions>
				<configuration>
					<!-- The Base URL of Nexus instance where we want to stage -->
					<serverId>sonatype-nexus-staging</serverId>
					<nexusUrl>https://oss.sonatype.org/</nexusUrl>
					<autoReleaseAfterClose>true</autoReleaseAfterClose>
				</configuration>
			</plugin>
        </plugins>
		<extensions>
			<extension>
				<groupId>org.apache.maven.wagon</groupId>
				<artifactId>wagon-webdav-jackrabbit</artifactId>
				<version>${wagon-webdav-jackrabbit.version}</version>
			</extension>
		</extensions>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-release-plugin</artifactId>
					<version>${maven-release-plugin.version}</version>
					<configuration>
						<mavenExecutorId>forked-path</mavenExecutorId>
						<useReleaseProfile>false</useReleaseProfile>
						<arguments>-Psonatype-oss-release</arguments>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
    </build>

    <dependencies>
        <dependency>
            <groupId>com.google.gwt</groupId>
            <artifactId>gwt-user</artifactId>
            <version>${gwt.version}</version>
        </dependency>
        <dependency>
            <groupId>com.google.gwt</groupId>
            <artifactId>gwt-dev</artifactId>
            <version>${gwt.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <version>${mockito.version}</version>
        </dependency>
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <version>${assertj-core.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.google.gwt.gwtmockito</groupId>
            <artifactId>gwtmockito</artifactId>
            <version>${gwtmockito.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>${junit.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-all</artifactId>
                <version>${mockito.version}</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>
</project>
