<?xml version="1.0" encoding="UTF-8"?>

<!--
  ~ Copyright (c) 2015 Goldman Sachs.
  ~ All rights reserved. This program and the accompanying materials
  ~ are made available under the terms of the Eclipse Public License v1.0
  ~ and Eclipse Distribution License v. 1.0 which accompany this distribution.
  ~ The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
  ~ and the Eclipse Distribution License is available at
  ~ http://www.eclipse.org/org/documents/edl-v10.php.
  -->

<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>org.eclipse.collections</groupId>
    <artifactId>eclipse-collections</artifactId>
    <version>7.0.0</version>
    <packaging>bundle</packaging>

    <name>Eclipse Collections Main Library</name>

    <description>Eclipse Collections is a collections framework for Java. It has JDK-compatible List, Set and Map
        implementations with a rich API and set of utility classes that work with any JDK compatible Collections,
        Arrays, Maps or Strings. The iteration protocol was inspired by the Smalltalk collection framework.
    </description>

    <url>https://github.com/eclipse/eclipse-collections</url>

    <inceptionYear>2004</inceptionYear>

    <licenses>
        <license>
            <name>Eclipse Public License - v 1.0</name>
            <url>https://www.eclipse.org/legal/epl-v10.html</url>
            <distribution>repo</distribution>
        </license>
        <license>
            <name>Eclipse Distribution License - v 1.0</name>
            <url>https://www.eclipse.org/licenses/edl-v10.html</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <scm>
        <url>https://github.com/eclipse/eclipse-collections</url>
        <connection>scm:git:https://github.com/eclipse/eclipse-collections.git</connection>
        <developerConnection>scm:git:https://github.com/eclipse/eclipse-collections.git</developerConnection>
    </scm>

    <developers>
        <developer>
            <name>Craig P. Motlin</name>
            <email>craig.motlin@gs.com</email>
        </developer>

        <developer>
            <name>Donald Raab</name>
            <email>donald.raab@gs.com</email>
        </developer>

        <developer>
            <name>Mohammad A. Rezaei</name>
            <email>mohammad.rezaei@gs.com</email>
        </developer>

        <developer>
            <name>Hiroshi Ito</name>
            <email>hiroshi.ito@gs.com</email>
        </developer>
    </developers>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

        <clover.version>4.0.6</clover.version>
        <checkstyle.version>2.16</checkstyle.version>
        <sonar.clover.reportPath>${project.basedir}/target/site/clover/clover.xml</sonar.clover.reportPath>
        <sonar.surefire.reportsPath>${project.basedir}/target/clover/surefire-reports</sonar.surefire.reportsPath>
        <!-- this setting is needed for TeamCity -->
        <maven.deploy.skip>${build.is.personal}</maven.deploy.skip>
    </properties>

    <dependencies>

        <dependency>
            <groupId>org.eclipse.collections</groupId>
            <artifactId>eclipse-collections-api</artifactId>
            <version>7.0.0</version>
        </dependency>

        <!-- External dependencies -->

        <dependency>
            <groupId>net.jcip</groupId>
            <artifactId>jcip-annotations</artifactId>
            <version>1.0</version>
            <optional>true</optional>
        </dependency>

    </dependencies>

    <build>
        <pluginManagement>
            <plugins>

                <plugin>
                    <artifactId>maven-antrun-plugin</artifactId>
                    <version>1.8</version>
                </plugin>

                <plugin>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <version>2.5.5</version>
                </plugin>

                <plugin>
                    <artifactId>maven-clean-plugin</artifactId>
                    <version>2.6.1</version>
                </plugin>

                <plugin>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>2.5.1</version>
                </plugin>

                <plugin>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>2.10</version>
                </plugin>

                <plugin>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>2.8.2</version>
                </plugin>

                <plugin>
                    <artifactId>maven-install-plugin</artifactId>
                    <version>2.5.2</version>
                </plugin>

                <plugin>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>2.5</version>
                </plugin>

                <plugin>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>2.10.3</version>
                </plugin>

                <plugin>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>3.0-r1585899</version>
                </plugin>

                <plugin>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>2.7</version>
                </plugin>

                <plugin>
                    <artifactId>maven-site-plugin</artifactId>
                    <version>3.4</version>
                </plugin>

                <plugin>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>2.4</version>
                </plugin>

                <plugin>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <version>1.4.1</version>
                </plugin>

                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>versions-maven-plugin</artifactId>
                    <version>2.2</version>
                </plugin>

                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>clirr-maven-plugin</artifactId>
                    <version>2.7</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.felix</groupId>
                    <artifactId>maven-bundle-plugin</artifactId>
                    <version>3.0.0</version>
                </plugin>

                <plugin>
                    <groupId>org.scala-tools</groupId>
                    <artifactId>maven-scala-plugin</artifactId>
                    <version>2.15.2</version>
                </plugin>

                <plugin>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>2.18.1</version>
                </plugin>

                <plugin>
                    <artifactId>maven-project-info-reports-plugin</artifactId>
                    <version>2.8.1</version>
                </plugin>

                <plugin>
                    <groupId>com.fortify.ps.maven.plugin</groupId>
                    <artifactId>maven-sca-plugin</artifactId>
                    <version>2.6</version>
                </plugin>

            </plugins>
        </pluginManagement>

        <plugins>

            <plugin>
                <groupId>org.eclipse.collections</groupId>
                <artifactId>eclipse-collections-code-generator-maven-plugin</artifactId>
                <version>7.0.0</version>
                <executions>
                    <execution>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                        <configuration>
                            <templateDirectory>impl</templateDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.5</source>
                    <target>1.5</target>
                    <fork>true</fork>
                    <maxmem>2048m</maxmem>
                    <verbose>true</verbose>
                </configuration>
            </plugin>

            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <includes>
                        <include>**/*Test.java</include>
                    </includes>
                    <argLine>-XX:-OmitStackTraceInFastThrow</argLine>
                    <runOrder>random</runOrder>
                    <forkMode>never</forkMode>
                </configuration>
            </plugin>

            <plugin>
                <artifactId>maven-source-plugin</artifactId>
                <version>2.1.2</version>
                <executions>
                    <execution>
                        <phase>verify</phase>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <version>3.0.0</version>
                <extensions>true</extensions>
                <configuration>
                    <instructions>
                        <Export-Package>org.eclipse.collections.impl</Export-Package>
                        <Bundle-RequiredExecutionEnvironment>J2SE-1.5,JavaSE-1.6</Bundle-RequiredExecutionEnvironment>
                        <Import-Package>
                            net.jcip.annotations;resolution:=optional,*
                        </Import-Package>
                        <Bundle-Version>${project.version}</Bundle-Version>
                    </instructions>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>sonar-maven-plugin</artifactId>
                <version>2.6</version>
            </plugin>

            <plugin>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>${checkstyle.version}</version>
                <configuration>
                    <configLocation>../checkstyle-configuration.xml</configLocation>
                    <logViolationsToConsole>true</logViolationsToConsole>
                    <includeTestSourceDirectory>true</includeTestSourceDirectory>
                    <cacheFile>${basedir}/target/checkstyleCache</cacheFile>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>com.puppycrawl.tools</groupId>
                        <artifactId>checkstyle</artifactId>
                        <version>6.11.1</version>
                    </dependency>
                </dependencies>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>findbugs-maven-plugin</artifactId>
                <version>3.0.2</version>
                <configuration>
                    <effort>Max</effort>
                    <threshold>Default</threshold>
                    <xmlOutput>true</xmlOutput>
                    <findbugsXmlOutput>true</findbugsXmlOutput>
                    <excludeFilterFile>findbugs-exclude.xml</excludeFilterFile>
                </configuration>
            </plugin>

            <plugin>
                <artifactId>maven-javadoc-plugin</artifactId>
                <configuration>
                    <doctitle>Eclipse Collections - ${project.version}</doctitle>
                    <windowtitle>Eclipse Collections - ${project.version}</windowtitle>
                    <show>public</show>
                    <links>
                        <link>http://java.sun.com/j2se/1.5.0/docs/api/</link>
                    </links>
                    <destDir>${project.version}</destDir>
                    <additionalparam>-Xdoclint:none</additionalparam>
                </configuration>
            </plugin>

            <plugin>
                <artifactId>maven-enforcer-plugin</artifactId>
                <executions>
                    <execution>
                        <id>enforce</id>
                        <configuration>
                            <rules>
                                <DependencyConvergence />
                                <requirePluginVersions>
                                    <unCheckedPluginList>org.eclipse.collections:eclipse-collections-code-generator-maven-plugin
                                    </unCheckedPluginList>
                                </requirePluginVersions>
                                <requireJavaVersion>
                                    <version>1.7.0</version>
                                </requireJavaVersion>
                                <requireMavenVersion>
                                    <version>3.0.2</version>
                                </requireMavenVersion>
                            </rules>
                        </configuration>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>clirr-maven-plugin</artifactId>
                <version>2.7</version>
                <configuration>
                    <comparisonArtifacts>
                        <comparisonArtifact>
                            <groupId>org.eclipse.collections</groupId>
                            <artifactId>eclipse-collections</artifactId>
                            <version>6.1.0</version>
                        </comparisonArtifact>
                    </comparisonArtifacts>
                    <textOutputFile>${project.build.directory}/clirr.txt</textOutputFile>
                </configuration>
            </plugin>

        </plugins>
    </build>

    <profiles>
        <profile>
            <id>clover</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.atlassian.maven.plugins</groupId>
                        <artifactId>maven-clover2-plugin</artifactId>
                        <version>${clover.version}</version>
                        <configuration>
                            <licenseLocation>${clover.license}</licenseLocation>
                            <contextFilters>@deprecated</contextFilters>
                            <generateHistorical>true</generateHistorical>
                            <historyDir>${user.home}/clover/${project.artifactId}</historyDir>
                            <includesAllSourceRoots>true</includesAllSourceRoots>
                            <instrumentLambda>block</instrumentLambda>
                        </configuration>
                        <executions>
                            <execution>
                                <id>setup</id>
                                <phase>process-sources</phase>
                                <goals>
                                    <goal>setup</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

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