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

    <parent>
        <groupId>org.sonatype.oss</groupId>
        <artifactId>oss-parent</artifactId>
        <version>7</version>
    </parent>

    <groupId>com.github.branflake2267</groupId>
    <artifactId>gwt-maps</artifactId>
    <version>3.9.0-build-17</version>
    <packaging>pom</packaging>

    <modules>
        <module>gwt-maps-api</module>
        <module>gwt-maps-showcase</module>
    </modules>

    <name>GWT Maps API V3</name>
    <description>GWT library to access Google Maps javascript API</description>
    <url>https://github.com/branflake2267/GWT-Maps-V3-Api/</url>
    <inceptionYear>2011</inceptionYear>

    <organization>
        <name>GWT Maps API V3</name>
        <url>https://github.com/branflake2267/GWT-Maps-V3-Api.git</url>
    </organization>

    <licenses>
        <license>
            <name>Apache License 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0</url>
        </license>
    </licenses>

    <issueManagement>
        <system>github</system>
        <url>https://github.com/branflake2267/GWT-Maps-V3-Api</url>
    </issueManagement>

    <scm>
        <connection>scm:git:https://github.com/branflake2267/GWT-Maps-V3-Api</connection>
        <developerConnection>scm:git:https://github.com/branflake2267/GWT-Maps-V3-Api</developerConnection>
        <url>https://github.com/branflake2267/GWT-Maps-V3-Api</url>
    </scm>

    <developers>
        <developer>
            <id>branflake2267</id>
            <name>Brandon Donnelson</name>
            <email>branflake2267@gmail.com</email>
            <organization>Gone Vertical LLC</organization>
            <organizationUrl>http://gonevertical.com</organizationUrl>
            <roles>
                <role>Lead developer</role>
            </roles>
            <timezone>-8</timezone>
        </developer>
        <developer>
            <id>twistedpair</id>
            <name>Joseph Lust</name>
            <organization>Lauf Labs LLC</organization>
            <email>lauflabs@gmail.com</email>
            <organizationUrl>http://www.lustforge.com/</organizationUrl>
            <roles>
                <role>Developer</role>
            </roles>
            <timezone>-5</timezone>
        </developer>
    </developers>

    <!-- Create a account and request access for permissions to modify -->
    <!-- Purpose Automatic snapshot deployment, Automatic Showcase Deployment -->
    <ciManagement>
        <system>Team City 7.1.2</system>
        <url>http://teamcity.gonevertical.org/viewType.html?buildTypeId=bt5</url>
    </ciManagement>

    <properties>
        <!-- GWT props -->
        <gwt.version>2.5.0</gwt.version>
        <gwt.maven.version>2.5.0</gwt.maven.version>
        <gae.version>1.7.4</gae.version>
        <gwt.style>OBF</gwt.style>

        <!-- Java props -->
        <java.version>1.6</java.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven-javadoc-plugin.version>2.9</maven-javadoc-plugin.version>

        <webappDirectory>${project.build.directory}/${project.build.finalName}</webappDirectory>
        <gae.home>${settings.localRepository}/com/google/appengine/appengine-java-sdk/${gae.version}/appengine-java-sdk-${gae.version}</gae.home>
    </properties>

    <build>
        <plugins>
            <!-- Build the core app -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.0</version>
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                </configuration>
            </plugin>

            <!-- Custom license headers for all files -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <version>1.3</version>
                <executions>
                    <execution>
                        <id>Add License Headers</id>
                        <configuration>
                            <licenseName>apache_v2</licenseName>
                            <roots>
                                <root>src</root>
                                <root>target/generated-sources</root>
                                <root>target/processed-sources</root>
                                <!-- Included because HTML/CSS/KML files 
                                    are here -->
                                <root>war</root>
                            </roots>
                            <!-- Don't touch these compiler generated files -->
                            <excludes>
                                <exclude>**/*.cache.html</exclude>
                                <exclude>**/*.nocache.html</exclude>
                                <exclude>**/*.properties</exclude>
                            </excludes>
                        </configuration>

                        <!-- Bound to run at last phase before compile -->
                        <phase>process-resources</phase>
                        <goals>
                            <goal>update-file-header</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>2.2.1</version>
            </plugin>

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

        <pluginManagement>
            <plugins>
                <!--This plugin's configuration is used to store Eclipse 
                    m2e settings only. It has no influence on the Maven build itself. -->
                <plugin>
                    <groupId>org.eclipse.m2e</groupId>
                    <artifactId>lifecycle-mapping</artifactId>
                    <version>1.0.0</version>
                    <configuration>
                        <lifecycleMappingMetadata>
                            <pluginExecutions>
                                <pluginExecution>
                                    <pluginExecutionFilter>
                                        <groupId>
                                            org.codehaus.mojo
                                        </groupId>
                                        <artifactId>
                                            license-maven-plugin
                                        </artifactId>
                                        <versionRange>
                                            [1.3,)
                                        </versionRange>
                                        <goals>
                                            <goal>
                                                update-file-header
                                            </goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <ignore />
                                    </action>
                                </pluginExecution>
                            </pluginExecutions>
                        </lifecycleMappingMetadata>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <dependencyManagement>
        <dependencies>
            <!-- Google -->
            <dependency>
                <groupId>com.google.gwt.google-apis</groupId>
                <artifactId>gwt-ajaxloader</artifactId>
                <version>1.1.0</version>
                <scope>compile</scope>
            </dependency>

            <!-- GWT -->
            <dependency>
                <groupId>com.google.gwt</groupId>
                <artifactId>gwt-user</artifactId>
                <version>${gwt.version}</version>
                <scope>provided</scope> <!-- don't copy to jar -->
            </dependency>
            <!-- GWT needed for mvn integration-test -->
            <dependency>
                <groupId>com.google.gwt</groupId>
                <artifactId>gwt-dev</artifactId>
                <version>${gwt.version}</version>
                <scope>test</scope> <!-- don't copy to jar -->
            </dependency>

            <!-- Testing -->
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>4.8.1</version>
                <scope>test</scope> <!-- don't copy to jar -->
            </dependency>
        </dependencies>
    </dependencyManagement>

    <!-- Run by using: mvn clean integration-test deploy -->
    <!-- https://issues.sonatype.org/browse/OSSRH-4661 -->
    <!-- Build a local maven repo: mvn -DaltDeploymentRepository=snapshot-repo::default::file:./distribution/snapshots 
        clean deploy -->
    <distributionManagement>
        <repository>
            <id>sona-nexus-deploy</id> <!-- Add to settings.xml <server><id>sona-nexus-deploy</id> -->
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
        </repository>
        <snapshotRepository>
            <id>sona-nexus-deploy</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
    </distributionManagement>

    <profiles>
        <profile>
            <id>sonatype-oss-release</id>
            <modules>
                <module>gwt-maps-api</module>
            </modules>
        </profile>

        <profile>
            <id>release</id>
            <activation>
                <property>
                    <name>performRelease</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <pluginManagement>
                    <plugins>
                        <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>
                            <configuration>
                                <source>${target.jdk}</source>
                                <failOnError>true</failOnError>
                                <quiet>true</quiet>
                                <links>
                                    <link>http://download.oracle.com/javase/6/docs/api/</link>
                                    <link>http://google-web-toolkit.googlecode.com/svn/javadoc/2.0/</link>
                                    <link>http://aopalliance.sourceforge.net/doc/</link>
                                </links>
                            </configuration>
                        </plugin>
                    </plugins>
                </pluginManagement>
            </build>
        </profile>

        <profile>
            <id>release-sign-artifacts</id>
            <activation>
                <property>
                    <name>performRelease</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-gpg-plugin</artifactId>
                            <executions>
                                <execution>
                                    <id>sign-artifacts</id>
                                    <phase>verify</phase>
                                    <goals>
                                        <goal>sign</goal>
                                    </goals>
                                </execution>
                            </executions>
                        </plugin>
                    </plugins>
                </pluginManagement>
            </build>
        </profile>
    </profiles>
</project>
