<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.jparsec</groupId>
  <artifactId>jparsec-root</artifactId>
  <packaging>pom</packaging>
  <version>3.1</version>

  <name>jParsec Root</name>

  <description>
    A parser combinator library in Java, modelled after Haskell' Parsec
  </description>

  <url>http://github.com/jparsec/jparsec</url>

  <organization>
    <name>jparsec</name>
    <url>http://jparsec.org</url>
  </organization>

  <!-- Note this is the date the project's source code was ported to Github -->
  <inceptionYear>2013</inceptionYear>
  
  <distributionManagement>
    <repository>
      <id>sonatype</id>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>
    <snapshotRepository>
      <id>ossrh</id>
      <name>Sonatype Nexus snapshot repository</name>
      <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
    </snapshotRepository>
  </distributionManagement>
  
  <licenses>
    <license>
      <name>Apache License 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0</url>
    </license>
  </licenses>

  <scm>
    <url>http://github.com/jparsec/jparsec</url>
    <connection>scm:git:git@github.com:jparsec/jparsec.git</connection>
    <developerConnection>scm:git:git@github.com:jparsec/jparsec.git</developerConnection>
    <tag>jparsec-root-3.1</tag>
  </scm>

  <developers>
    <developer>
      <name>Ben Yu</name>
      <roles>
        <role>Original Developer</role>
      </roles>
    </developer>

    <developer>
      <name>Arnaud Bailly</name>
      <roles>
        <role>Developer</role>
      </roles>
    </developer>
  </developers>

  <contributors>
    <contributor>
      <name>Alex Michael Berry</name>
      <url>https://github.com/almibe</url>
    </contributor>
    <contributor>
      <name>Gregory Ssi-Yan-Kai</name>
      <url>https://github.com/gssiyankai</url>
    </contributor>
    <contributor>
      <name>Michael</name>
      <url>https://github.com/michbarsinai</url>
    </contributor>
    <contributor>
      <name>Stepan Koltsov</name>
      <url>https://github.com/stepancheg</url>
    </contributor>
    <contributor>
      <name>Antoine Musso</name>
      <url>https://github.com/hashar</url>
    </contributor>
    <contributor>
      <name>Sergey</name>
      <url>https://github.com/hsestupin</url>
    </contributor>
    <contributor>
      <name>Ian</name>
      <url>https://github.com/ianrae</url>
    </contributor>
  </contributors>
    
  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>

  <modules>
    <module>jparsec</module>
    <module>jparsec-examples</module>
    <module>jparsec-testutils</module>
  </modules>

  <dependencyManagement>

    <dependencies>

      <dependency>
        <groupId>org.jparsec</groupId>
        <artifactId>jparsec</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>org.jparsec</groupId>
        <artifactId>jparsec-testutils</artifactId>
        <version>${project.version}</version>
        <scope>test</scope>
      </dependency>

      <dependency>
        <groupId>org.easymock</groupId>
        <artifactId>easymock</artifactId>
        <version>2.4</version>
        <scope>test</scope>
      </dependency>

      <dependency>
        <groupId>org.easytesting</groupId>
        <artifactId>fest-assert</artifactId>
        <version>1.4</version>
        <scope>test</scope>
      </dependency>

      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.8.1</version>
        <scope>test</scope>
      </dependency>

    </dependencies>

  </dependencyManagement>

  <build>

    <pluginManagement>
      <plugins>
        <plugin>
          <artifactId>maven-release-plugin</artifactId>
          <version>2.5.1</version>
          <configuration>
             <autoVersionSubmodules>true</autoVersionSubmodules>
             <useReleaseProfile>false</useReleaseProfile>
             <releaseProfiles>release</releaseProfiles>
             <goals>deploy</goals>
           </configuration>
        </plugin>
        <plugin>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.6.0</version>
          <configuration>
            <source>1.8</source>
            <target>1.8</target>
          </configuration>
          <dependencies>
            <dependency>
             <groupId>org.codehaus.plexus</groupId>
              <artifactId>plexus-compiler-javac-errorprone</artifactId>
             <version>2.8</version>
           </dependency>
            <!-- override plexus-compiler-javac-errorprone's dependency on
                 Error Prone with the latest version -->
            <dependency>
              <groupId>com.google.errorprone</groupId>
              <artifactId>error_prone_core</artifactId>
              <version>2.0.15</version>
            </dependency>
          </dependencies>
        </plugin>
        <plugin>
          <artifactId>maven-source-plugin</artifactId>
          <version>2.2.1</version>
        </plugin>
        <plugin>
          <artifactId>maven-clean-plugin</artifactId>
          <version>2.4.1</version>
        </plugin>
        <plugin>
          <artifactId>maven-install-plugin</artifactId>
          <version>2.3.1</version>
        </plugin>
        <plugin>
          <artifactId>maven-resources-plugin</artifactId>
          <version>2.5</version>
        </plugin>
        <plugin>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>2.10</version>
        </plugin>
        <plugin>
          <artifactId>maven-jar-plugin</artifactId>
          <version>2.3.2</version>
        </plugin>
        <plugin>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>2.7</version>
        </plugin>
        <plugin>
          <artifactId>maven-site-plugin</artifactId>
          <version>3.4</version>
        </plugin>
        <plugin>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>2.9.1</version>
          <configuration>
            <stylesheetfile>javadoc-stylesheet.css</stylesheetfile>
          </configuration>
          <executions>
            <execution>
              <id>attach-docs</id>
              <phase>post-integration-test</phase>
              <goals><goal>jar</goal></goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.sonatype.plugins</groupId>
          <artifactId>nexus-staging-maven-plugin</artifactId>
          <version>1.6.3</version>
          <extensions>true</extensions>
          <configuration>
             <serverId>ossrh</serverId>
             <nexusUrl>https://oss.sonatype.org/</nexusUrl>
             <autoReleaseAfterClose>true</autoReleaseAfterClose>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>

    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <source>1.8</source>
          <target>1.8</target>
        </configuration>
      </plugin>

      <plugin>
        <artifactId>maven-source-plugin</artifactId>
        <executions>
          <!-- always deploy sources on Nexus -->
          <execution>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <configuration>
            <excludePackageNames>org.jparsec.internal.*</excludePackageNames>
            <!--
                We should really fix javadoc but in the meantime...
                http://stackoverflow.com/questions/15886209/maven-is-not-working-in-java-8-when-javadoc-tags-are-incomplete
            -->
            <additionalparam>-Xdoclint:none</additionalparam>
        </configuration>
        <executions>
          <execution>
            <id>attach-docs</id>
          </execution>
          <execution>
            <id>generate-javadoc-site-report</id>
            <phase>site</phase>
            <goals><goal>javadoc</goal></goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <version>3.2.0</version>
        <extensions>true</extensions>
        <configuration>
          <instructions>
            <Bundle-SymbolicName>${project.groupId}.${project.artifactId}</Bundle-SymbolicName>
            <Bundle-Name>${project.artifactId}</Bundle-Name>
            <Bundle-Version>${project.version}</Bundle-Version>
            <Import-Package>*</Import-Package>
            <Export-Package>*</Export-Package>
          </instructions>
        </configuration>
      </plugin>

    </plugins>
  </build>

  <profiles>
    <!-- 
    Signing artifacts for maven central deployment 
    see https://docs.sonatype.org/display/Repository/How+To+Generate+PGP+Signatures+With+Maven
    -->
    <profile>
      <id>release</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.5</version>
            <configuration>
				<arguments>-Dgpg.passphrase=${gpg.passphrase}</arguments>
			</configuration>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

</project>
