<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/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.aliction</groupId>
  <artifactId>aliction-pom</artifactId>
  <version>1.1.0</version>
  <packaging>pom</packaging>
  <name>Aliction Pom</name>
  <description>Parent Pom to Aliction Java projects</description>

  <url>https://github.com/aliction/aliction-pom</url>

  <scm>
    <connection>scm:git:https://github.com/Aliction/aliction-pom.git</connection>
    <developerConnection>scm:git:https://github.com/Aliction/aliction-pom.git</developerConnection>
    <url>https://github.com/aliction/aliction-pom</url>
    <tag>1.1.0</tag>
  </scm>

  <developers>
    <developer>
      <email>aly.ibrahim@gmail.com</email>
      <name>Aly Ibrahim</name>
      <url>http://aliction.com</url>
      <id>AlyIbrahim</id>
    </developer>
  </developers>

  <licenses>
    <license>
      <name>Apache License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

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

  <properties>
    <nexus.staging.version>1.6.8</nexus.staging.version>
    <maven.release.version>2.5.3</maven.release.version>
    <maven.source.version>3.2.0</maven.source.version>
    <maven.javadoc.version>3.1.1</maven.javadoc.version>
    <maven.testing.version>3.0.0-M3</maven.testing.version>
    <maven.gpg.version>1.6</maven.gpg.version>
  </properties>

  <build>
    <plugins>
      <plugin>
        <groupId>org.sonatype.plugins</groupId>
        <artifactId>nexus-staging-maven-plugin</artifactId>
        <version>${nexus.staging.version}</version>
        <extensions>true</extensions>
        <configuration>
          <serverId>sonatype-nexus</serverId>
          <nexusUrl>https://oss.sonatype.org/</nexusUrl>
          <autoReleaseAfterClose>true</autoReleaseAfterClose>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>${maven.release.version}</version>
        <configuration>
          <checkModificationExcludes>
            <checkModificationExclude>pom.xml</checkModificationExclude>
            <checkModificationExclude>**</checkModificationExclude>
          </checkModificationExcludes>
          <autoVersionSubmodules>true</autoVersionSubmodules>
          <useReleaseProfile>false</useReleaseProfile>
          <releaseProfiles>release</releaseProfiles>
          <goals>deploy</goals>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>${maven.testing.version}</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-failsafe-plugin</artifactId>
        <version>${maven.testing.version}</version>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <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-source-plugin</artifactId>
            <version>${maven.source.version}</version>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar-no-fork</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>${maven.javadoc.version}</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>${maven.gpg.version}</version>
            <dependencies>
              <dependency>
                <groupId>org.apache.httpcomponents</groupId>
                <artifactId>httpclient</artifactId>
                <version>4.5.10</version>
              </dependency>
            </dependencies>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
