<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.exsoinn</groupId>
  <artifactId>element-path-finder</artifactId>
  <packaging>jar</packaging>
  <version>1.1.0</version>
  <name>element-path-finder</name>
  <description>Adapter to search disparate data formats</description>
  <url>https://github.com/joquijada/element-path-finder</url>
  <licenses>
    <license>
      <name>MIT</name>
      <url>https://opensource.org/licenses/MIT</url>
    </license>
  </licenses>
  <developers>
    <developer>
      <name>Jose Quijada</name>
      <email>joquijada2010@gmail.com</email>
      <organization>ExSoInn</organization>
      <organizationUrl>https://www.exsoinn.com/</organizationUrl>
    </developer>
  </developers>
  <scm>
    <connection>scm:git:https://github.com/joquijada/element-path-finder.git</connection>
    <developerConnection>scm:git:https://github.com/joquijada/element-path-finder.git
    </developerConnection>
    <url>https://github.com/joquijada/element-path-finder</url>
  </scm>
  <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>
    <site>
      <id>element-path-finder</id>
      <url>scp://github.com/joquijada/element-path-finder</url>
    </site>
  </distributionManagement>
  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>
  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.12</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.json</groupId>
      <artifactId>json</artifactId>
      <version>20160810</version>
    </dependency>
    <dependency>
      <groupId>com.google.code.gson</groupId>
      <artifactId>gson</artifactId>
      <version>2.8.0</version>
    </dependency>
    <dependency>
      <groupId>net.jcip</groupId>
      <artifactId>jcip-annotations</artifactId>
      <version>1.0</version>
    </dependency>
  </dependencies>


  <build>

    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.8.0</version>
        <configuration>
          <source>8</source>
          <target>8</target>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <descriptorRefs>
            <descriptorRef>jar-with-dependencies</descriptorRef>
          </descriptorRefs>
        </configuration>
      </plugin>
      <!--Disable until CQMP deployed in Maven central<plugin>
        <groupId>com.exsoinn</groupId>
        <artifactId>code-quality-maven-plugin</artifactId>
        <extensions>true</extensions>
        <configuration>
          <scmUrl>scm:git:https://github.com/joquijada/element-path-finder.git</scmUrl>
          <siteUpload>true</siteUpload>
          <sitePath>site-epf</sitePath>
          <siteMerge>false</siteMerge>
          <packageNames>com.exsoinn.*</packageNames>
        </configuration>
      </plugin>-->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-gpg-plugin</artifactId>
        <version>1.6</version>
        <executions>
          <execution>
            <id>sign-artifacts</id>
            <!-- We sign in the verify phase, which means it will happen before install and deploy (the last two phases)
                 but not before earlier phases like test or package. -->
            <phase>verify</phase>
            <goals>
              <goal>sign</goal>
            </goals>
            <!-- If using gpg > 2.1 it is necessary for gpg to not try to use the pinentry programs
              however, it looks like Travis does not need this entry -->
          </execution>
        </executions>
      </plugin>
      <plugin>
        <!-- Allow attaching Javadoc during releases -->
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>3.1.1</version>
        <configuration>
          <!-- Turn off Java 8 strict Javadoc checking -->
          <additionalparam>-Xdoclint:none</additionalparam>
          <tags>
            <tag>
              <name>notnull</name>
              <placement>a</placement>
              <head>Not null</head>
            </tag>
            <tag>
              <name>default</name>
              <placement>a</placement>
              <head>Default:</head>
            </tag>
          </tags>
        </configuration>
        <executions>
          <!-- Compress Javadoc into JAR and include that JAR when deploying. -->
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <!-- Include zipped source code in releases -->
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <!-- Automatically close and deploy from OSSRH -->
        <groupId>org.sonatype.plugins</groupId>
        <artifactId>nexus-staging-maven-plugin</artifactId>
        <version>1.6.7</version>
        <extensions>true</extensions>
        <configuration>
          <serverId>ossrh</serverId>
          <nexusUrl>https://oss.sonatype.org/</nexusUrl>
          <!-- Release versions will be synced to Maven Central automatically. -->
          <autoReleaseAfterClose>true</autoReleaseAfterClose>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>coverage</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.jacoco</groupId>
            <artifactId>jacoco-maven-plugin</artifactId>
            <version>0.8.3</version>
            <executions>
              <execution>
                <id>prepare-agent</id>
                <goals>
                  <goal>prepare-agent</goal>
                </goals>
              </execution>
              <execution>
                <id>report</id>
                <goals>
                  <goal>report</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <!-- Build using command `mvn clean install -P dev`. The `dev` profile
           disables the gpg signing dependency, so that it's nto a requirement to have gpg.exe installed
       -->
      <id>dev</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>none</phase>
                <goals>
                  <goal/>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

</project>
