<?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>com.github.tdesjardins</groupId>
    <artifactId>gwt-ol3-parent</artifactId>
    <version>7.2.0</version>
    <packaging>pom</packaging>
    <name>GWT OpenLayers 3+</name>
    <description>GWT JsInterop API for OpenLayers 3+</description>
    <url>https://github.com/TDesjardins/gwt-ol</url>

    <inceptionYear>2014</inceptionYear>
    <licenses>
        <license>
            <name>Apache 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>Tino Desjardins</name>
            <id>tdesjardins</id>
            <roles>
                <role>Java Developer</role>
            </roles>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:https://github.com/TDesjardins/gwt-ol.git</connection>
        <developerConnection>scm:git:git@github.com:TDesjardins/gwt-ol.git</developerConnection>
        <url>https://github.com/TDesjardins/gwt-ol</url>
        <tag>v7.2.0</tag>
    </scm>

    <issueManagement>
        <system>GitHub</system>
        <url>https://github.com/TDesjardins/gwt-ol/issues</url>
    </issueManagement>

    <prerequisites>
        <maven>3</maven>
    </prerequisites>

    <distributionManagement>
        <snapshotRepository>
            <id>sonatype-nexus-snapshots</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
        </snapshotRepository>
        <repository>
            <id>sonatype-nexus-staging</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <properties>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <github.global.server>github</github.global.server>
        <gwt.version>2.8.2</gwt.version>
    </properties>

    <modules>
        <module>gwt-ol3-client</module>
        <module>gwt-ol3-demo</module>
    </modules>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.google.gwt</groupId>
                <artifactId>gwt</artifactId>
                <version>${gwt.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>4.12</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.8.0</version>
                </plugin>
                <plugin>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>2.22.1</version>
                </plugin>
                <plugin>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>2.8.2</version>
                </plugin>
                <plugin>
                    <groupId>net.ltgt.gwt.maven</groupId>
                    <artifactId>gwt-maven-plugin</artifactId>
                    <version>1.0-rc-10</version>
                    <extensions>true</extensions>
                    <configuration>
                        <skipModule>true</skipModule>
                        <failOnError>true</failOnError>
                        <compilerArgs>
                            <!-- arg>-generateJsInteropExports</arg-->
                            <arg>-XdisableUpdateCheck</arg>
                        </compilerArgs>
                        <useCompilerArgsForTests>true</useCompilerArgsForTests>
                        <codeserverArgs>
                            <!-- arg>-generateJsInteropExports</arg-->
                            <arg>-XdisableUpdateCheck</arg>
                            <arg>-bindAddress</arg><arg>0.0.0.0</arg>
                        </codeserverArgs>
                        <devmodeArgs>
                            <!-- arg>-generateJsInteropExports</arg-->
                            <arg>-XdisableUpdateCheck</arg>
                            <arg>-bindAddress</arg><arg>0.0.0.0</arg>
                        </devmodeArgs>
                        <style>OBFUSCATED</style> <!-- OBFUSCATED, PRETTY, or DETAILED -->
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <configuration>
                        <doclint>none</doclint>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <groupId>net.ltgt.gwt.maven</groupId>
                <artifactId>gwt-maven-plugin</artifactId>
                <inherited>false</inherited>
                <configuration>
                    <startupUrls>
                        <url>/demo</url>
                    </startupUrls>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.0.1</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <phase>package</phase>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.5.3</version>
                <configuration>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <developmentVersion>HEAD-SNAPSHOT</developmentVersion>
                    <tagNameFormat>v@{project.version}</tagNameFormat>
                    <useReleaseProfile>false</useReleaseProfile>
                    <releaseProfiles>release</releaseProfiles>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.github.github</groupId>
                <artifactId>site-maven-plugin</artifactId>
                <version>0.12</version>
                <configuration>
                    <message>Creating site for ${project.version}</message>
                    <outputDirectory>${basedir}/gwt-ol3-demo/target/gwt-ol3-demo/demo</outputDirectory>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>3.0.1</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>1.1</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
