<?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">


    <!-- ====================================================================== -->
    <!-- P R O J E C T  D E S C R I P T I O N                                   -->
    <!-- ====================================================================== -->

    <modelVersion>4.0.0</modelVersion>
    <groupId>io.clickhandler</groupId>
    <artifactId>loggly-gwt</artifactId>
    <version>1.0.0</version>
    <packaging>jar</packaging>
    <name>loggly-gwt</name>
    <description>Loggly Javascript GWT wrapper</description>
    <url>http://www.clickhandler.io</url>
    <organization>
        <name>ClickHandlerIO LLC</name>
        <url>http://www.clickhandler.io</url>
    </organization>
    <licenses>
        <license>
            <name>MIT License</name>
            <url>http://www.opensource.org/licenses/mit-license.php</url>
        </license>
    </licenses>
    <developers>
        <developer>
            <name>Chris Jones</name>
            <organization>ClickHandlerIO</organization>
            <organizationUrl>http://www.clickhandler.io</organizationUrl>
        </developer>
        <developer>
            <name>Bo Molocznik</name>
            <organization>ClickHandlerIO</organization>
            <organizationUrl>http://www.clickhandler.io</organizationUrl>
        </developer>
        <developer>
            <name>Clay Molocznik</name>
            <organization>ClickHandlerIO</organization>
            <organizationUrl>http://www.clickhandler.io</organizationUrl>
        </developer>
    </developers>
    <scm>
        <connection>scm:git:git@github.com:ClickHandlerIO/loggly-gwt</connection>
        <developerConnection>scm:git:git@github.com:ClickHandlerIO/loggly-gwt.git</developerConnection>
        <url>git@github.com:ClickHandlerIO/loggly-gwt</url>
    </scm>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <java.version>1.8</java.version>
        <gwt.version>2.8.2</gwt.version>
        <maven-compiler-plugin.version>3.3</maven-compiler-plugin.version>
        <gwt-maven-plugin.version>2.8.2</gwt-maven-plugin.version>
        <build-helper-maven-plugin.version>1.10</build-helper-maven-plugin.version>
        <maven-resources-plugin.version>2.5</maven-resources-plugin.version>
        <maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
        <nexus-staging-maven-plugin.version>1.6.8</nexus-staging-maven-plugin.version>
    </properties>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
    </distributionManagement>

    <repositories>
        <repository>
            <id>central</id>
            <url>https://repo1.maven.org/maven2</url>
            <releases>
                <enabled>true</enabled>
            </releases>
        </repository>

        <repository>
            <id>snapshots-repo</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
            <snapshots>
                <enabled>true</enabled>
                <updatePolicy>always</updatePolicy>
                <checksumPolicy>warn</checksumPolicy>
            </snapshots>
            <releases>
                <enabled>false</enabled>
            </releases>
        </repository>

        <repository>
            <id>google-snapshots-repo</id>
            <url>https://oss.sonatype.org/content/repositories/google-snapshots/</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
                <updatePolicy>always</updatePolicy>
                <checksumPolicy>warn</checksumPolicy>
            </snapshots>
        </repository>
    </repositories>

    <pluginRepositories>
        <pluginRepository>
            <id>central</id>
            <url>https://repo1.maven.org/maven2</url>
            <releases>
                <enabled>true</enabled>
            </releases>
        </pluginRepository>

        <pluginRepository>
            <id>plugin-snapshots-repo</id>
            <url>https://oss.sonatype.org/content/repositories/public/</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </pluginRepository>
    </pluginRepositories>


    <!-- ====================================================================== -->
    <!-- D E P E N D E N C I E S                                                -->
    <!-- ====================================================================== -->

    <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>
        </dependency>

        <dependency>
            <groupId>com.google.gwt</groupId>
            <artifactId>gwt-elemental</artifactId>
            <version>${gwt.version}</version>
        </dependency>

    </dependencies>


    <!-- ====================================================================== -->
    <!-- P R O F I L E S                                                        -->
    <!-- ====================================================================== -->

    <profiles>
        <profile>
            <id>ossrh</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <build>
                <resources>
                    <resource>
                        <directory>src/main/java</directory>
                    </resource>
                </resources>

                <plugins>

                    <!-- Maven compiler -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-compiler-plugin</artifactId>
                        <version>${maven-compiler-plugin.version}</version>
                        <configuration>
                            <source>${java.version}</source>
                            <target>${java.version}</target>
                        </configuration>
                    </plugin>

                    <!-- Source JAR -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                    <!-- Javadoc -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                    <!-- Sign GPG -->
                    <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>
                                <configuration>
                                    <passphraseServerId>clickhandler.io.gpg.passphrase</passphraseServerId>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>

                    <!-- Deploy to maven central -->
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>${nexus-staging-maven-plugin.version}</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

    </profiles>
</project>
