  <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>net.nowtryz</groupId>
  <artifactId>cafetapi</artifactId>
  <version>0.4.0</version>
  <packaging>jar</packaging>


  <name>Cafet API connector</name>
  <description>Java library that abstracts api http exchanges</description>
  <url>http://cafet-app.nowtryz.com/java-api-connector/</url>

  <organization>
    <name>Nowtryz</name>
    <url>https://www.nowtryz.net</url>
  </organization>

  <licenses>
    <license>
      <name>Cafet APP liscense</name>
      <url>https://git.nowtryz.net/cafet-app/java-api-connector/wikis/LICENSE</url>
    </license>
  </licenses>

  <developers>
    <developer>
      <name>Nowtryz</name>
      <email>damien.djmb@gmail.com</email>
      <organization>Nowtryz</organization>
      <organizationUrl>https://www.nowtryz.net</organizationUrl>
    </developer>
  </developers>

  <scm>
    <connection>scm:git:ssh://git.nowtryz.net:cafet-app/java-api-connector.git</connection>
    <developerConnection>scm:git:ssh://git.nowtryz.net:cafet-app/java-api-connector.git</developerConnection>
    <url>https://git.nowtryz.net/cafet-app/java-api-connector</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>
  </distributionManagement>


  <properties>
    <encoding>UTF-8</encoding>
    <project.build.sourceEncoding>${encoding}</project.build.sourceEncoding>
    <release.date>${maven.build.timestamp}</release.date>
    <maven.build.timestamp.format>dd-MM-yyyy HH:mm</maven.build.timestamp.format>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
    <javadoc.opts>-Xdoclint:none</javadoc.opts>
    <jacoco.reportPath>${project.build.directory}/jacoco.exec</jacoco.reportPath>
    <jacoco.version>0.8.2</jacoco.version>
    <surefire.argLine>utCoverageAgent</surefire.argLine>
    <surefire.version>3.0.0-M1</surefire.version>
  </properties>


  <dependencies>
    <dependency>
      <groupId>com.google.code.gson</groupId>
      <artifactId>gson</artifactId>
      <version>2.8.5</version>
    </dependency>
    <dependency>
      <groupId>org.apache.httpcomponents</groupId>
      <artifactId>httpclient</artifactId>
      <version>4.5.8</version>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-api</artifactId>
      <version>5.4.1</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-engine</artifactId>
      <version>5.4.1</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.vintage</groupId>
      <artifactId>junit-vintage-engine</artifactId>
      <version>5.4.1</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.12</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <version>2.27.0</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.powermock</groupId>
      <artifactId>powermock-module-junit4</artifactId>
      <version>2.0.2</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.powermock</groupId>
      <artifactId>powermock-api-mockito2</artifactId>
      <version>2.0.2</version>
      <scope>test</scope>
    </dependency>
  </dependencies>


  <build>
    <resources>
      <resource>
        <directory>src/main/resources</directory>
        <targetPath>net/nowtryz/cafetapi</targetPath>
        <filtering>true</filtering>
      </resource>
      <resource>
        <directory>src/main/lang</directory>
        <targetPath>net/nowtryz/cafetapi/lang</targetPath>
      </resource>
    </resources>
    <plugins>
      <!-- Generate site -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-site-plugin</artifactId>
        <version>3.7.1</version>
        <configuration>
          <locales>en</locales>
        </configuration>
      </plugin>
      <!-- Run tests -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>${surefire.version}</version>
        <configuration>
          <includes>
            <include>**/Ut*.java</include>
          </includes>
        </configuration>
      </plugin>
      <!-- Coverage report -->
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <version>${jacoco.version}</version>
        <executions>
          <execution>
            <goals>
              <goal>prepare-agent</goal>
              <goal>report</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>


  <reporting>
    <plugins>
      <!-- Javadoc -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.9.1</version>
        <configuration>
          <quiet>true</quiet>
          <additionalparam>${javadoc.opts}</additionalparam>
          <detectLinks>true</detectLinks>
          <detectJavaApiLink>true</detectJavaApiLink>
          <isOffline>false</isOffline>
          <links>
            <link>https://docs.oracle.com/javase/8/docs/api/</link>
            <link>https://static.javadoc.io/com.google.code.gson/gson/2.8.5</link>
          </links>
        </configuration>
        <reportSets>
          <reportSet>
            <reports>
              <report>javadoc</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
      <!-- Test report -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-report-plugin</artifactId>
        <version>${surefire.version}</version>
        <configuration>
          <argLine>${surefire.argLine}</argLine>
          <linkXRef>false</linkXRef>
        </configuration>
        <reportSets>
          <reportSet>
            <reports>
              <report>report-only</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
      <!-- Test coverage report -->
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <version>${jacoco.version}</version>
        <reportSets>
          <reportSet>
            <reports>
              <report>report</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
      <!-- Style report -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <version>2.17</version>
        <configuration>
          <configLocation>src/build/checkstyle.xml</configLocation>
          <encoding>${encoding}</encoding>
          <linkXRef>false</linkXRef>
        </configuration>
        <reportSets>
          <reportSet>
            <reports>
              <report>checkstyle</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
      <!-- Project info -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-project-info-reports-plugin</artifactId>
        <version>2.9</version>
        <reportSets>
          <reportSet>
            <reports>
              <report>index</report>
              <report>plugin-management</report>
              <report>dependency-info</report>
              <report>dependencies</report>
              <report>issue-tracking</report>
              <report>cim</report>
              <report>plugins</report>
              <report>license</report>
              <report>summary</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
    </plugins>
  </reporting>

  <profiles>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <!-- Require release versions -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-enforcer-plugin</artifactId>
            <version>3.0.0-M2</version>
            <executions>
              <execution>
                <id>enforce-target-prod-no-snapshot</id>
                <phase>validate</phase>
                <goals>
                  <goal>enforce</goal>
                </goals>
                <configuration>
                  <rules>
                    <!-- no snapshot versions -->
                    <requireReleaseVersion />
                    <!-- no snapshot dependencies -->
                    <requireReleaseDeps />
                  </rules>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>deployment</id>
      <build>
        <plugins>
          <!-- Sign jar -->
          <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>
                <configuration>
                  <gpgArguments>
                    <arg>--pinentry-mode</arg>
                    <arg>loopback</arg>
                  </gpgArguments>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <!-- Add a jar with javadoc -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>2.9.1</version>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <!-- Add a jar with sources -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>2.2.1</version>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar-no-fork</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>