<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright 2018-2019 Wave Software
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~     http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<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>pl.wavesoftware.utils</groupId>
  <artifactId>stringify-object</artifactId>
  <version>2.0.0</version>
  <packaging>jar</packaging>

  <name>Stringify Object for Java</name>
  <description>A utility to safely inspect any Java Object as string representation</description>
  <url>https://github.com/wavesoftware/java-stringify-object</url>

  <organization>
    <name>Wave Software</name>
    <url>http://wavesoftware.pl</url>
  </organization>

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

  <developers>
    <developer>
      <name>Krzysztof Suszyński</name>
      <email>krzysztof.suszynski@wavesoftware.pl</email>
      <organization>WaveSoftware</organization>
      <organizationUrl>http://wavesoftware.pl</organizationUrl>
    </developer>
  </developers>

  <scm>
    <connection>scm:git:https://github.com/wavesoftware/java-stringify-object.git</connection>
    <developerConnection>scm:git:git@github.com:wavesoftware/java-stringify-object.git</developerConnection>
    <url>https://github.com/wavesoftware/java-stringify-object</url>
  </scm>

  <issueManagement>
    <system>GitHub Issues</system>
    <url>https://github.com/wavesoftware/java-stringify-object/issues</url>
  </issueManagement>

  <ciManagement>
    <system>Travis CI</system>
    <url>https://travis-ci.org/wavesoftware/java-stringify-object</url>
  </ciManagement>

  <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>
    <netbeans.hint.license>apache20</netbeans.hint.license>
    <maven.required.version>3.0.4</maven.required.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <sonar.working.directory>${project.build.directory}/sonar</sonar.working.directory>
    <sonar.host.url>https://sonarcloud.io</sonar.host.url>
    <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
    <sonar.projectKey>wavesoftware_java-stringify-object</sonar.projectKey>
    <java.source.version>8</java.source.version>
    <sonar.java.source>${java.source.version}</sonar.java.source>
    <maven.compiler.source>1.${java.source.version}</maven.compiler.source>
    <maven.compiler.target>${maven.compiler.source}</maven.compiler.target>
    <jacoco.version>0.8.4</jacoco.version>

    <skipTests />
    <coveralls.skip>${skipTests}</coveralls.skip>
    <sonar.skip>${skipTests}</sonar.skip>
    <failsafe.rerunFailingTestsCount>2</failsafe.rerunFailingTestsCount>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.projectlombok</groupId>
      <artifactId>lombok</artifactId>
      <version>1.18.8</version>
      <scope>provided</scope>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>pl.wavesoftware</groupId>
      <artifactId>eid-exceptions</artifactId>
      <version>2.0.0</version>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>1.7.26</version>
    </dependency>

    <dependency>
      <groupId>pl.wavesoftware.testing</groupId>
      <artifactId>junit5-starter</artifactId>
      <version>1.0.0</version>
      <type>pom</type>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.hibernate</groupId>
      <artifactId>hibernate-core</artifactId>
      <version>5.4.3.Final</version>
      <scope>test</scope>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>org.openjdk.jmh</groupId>
      <artifactId>jmh-core</artifactId>
      <version>1.21</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.openjdk.jmh</groupId>
      <artifactId>jmh-generator-annprocess</artifactId>
      <version>1.21</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>pl.wavesoftware</groupId>
      <artifactId>jmh-junit-utilities</artifactId>
      <version>2.0.0</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.sonarsource.scanner.maven</groupId>
          <artifactId>sonar-maven-plugin</artifactId>
          <version>3.6.0.1398</version>
        </plugin>
        <plugin>
          <groupId>com.manamind.jgitflow</groupId>
          <artifactId>jgitflow-maven-plugin</artifactId>
          <version>1.0.0</version>
          <configuration>
            <enableSshAgent>true</enableSshAgent>
            <flowInitContext>
              <versionTagPrefix>v</versionTagPrefix>
            </flowInitContext>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.jacoco</groupId>
          <artifactId>jacoco-maven-plugin</artifactId>
          <version>${jacoco.version}</version>
          <executions>
            <execution>
              <id>jacoco-initialize</id>
              <goals>
                <goal>prepare-agent</goal>
                <goal>prepare-agent-integration</goal>
              </goals>
            </execution>
            <execution>
              <id>jacoco-site</id>
              <phase>post-integration-test</phase>
              <goals>
                <goal>report</goal>
                <goal>report-integration</goal>
              </goals>
            </execution>
          </executions>
          <configuration>
            <includes>
              <include>pl/wavesoftware/**</include>
            </includes>
          </configuration>
        </plugin>
        <plugin>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.8.1</version>
          <configuration>
            <showWarnings>true</showWarnings>
            <compilerArgs>
              <arg>-Xlint:all,-processing</arg>
            </compilerArgs>
          </configuration>
        </plugin>

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

        <plugin>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>2.22.2</version>
          <configuration>
            <trimStackTrace>false</trimStackTrace>
          </configuration>
        </plugin>

        <plugin>
          <artifactId>maven-failsafe-plugin</artifactId>
          <version>2.22.2</version>
          <configuration>
            <trimStackTrace>false</trimStackTrace>
          </configuration>
          <executions>
            <execution>
              <goals>
                <goal>integration-test</goal>
                <goal>verify</goal>
              </goals>
            </execution>
          </executions>
        </plugin>

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

        <plugin>
          <artifactId>maven-source-plugin</artifactId>
          <version>3.1.0</version>
          <executions>
            <execution>
              <id>attach-sources</id>
              <goals>
                <goal>jar-no-fork</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>3.1.0</version>
          <executions>
            <execution>
              <id>attach-javadocs</id>
              <goals>
                <goal>jar</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <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>
        <plugin>
          <artifactId>maven-clean-plugin</artifactId>
          <version>3.1.0</version>
        </plugin>
        <plugin>
          <artifactId>maven-install-plugin</artifactId>
          <version>2.5.2</version>
        </plugin>
        <plugin>
          <artifactId>maven-resources-plugin</artifactId>
          <version>3.1.0</version>
        </plugin>
        <plugin>
          <artifactId>maven-site-plugin</artifactId>
          <version>3.7.1</version>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <artifactId>maven-failsafe-plugin</artifactId>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>jacoco</id>
      <activation>
        <property>
          <name>env.JACOCO</name>
          <value>true</value>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.jacoco</groupId>
            <artifactId>jacoco-maven-plugin</artifactId>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>sonar-publish</id>
      <activation>
        <property>
          <name>env.SONAR</name>
          <value>publish</value>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.jacoco</groupId>
            <artifactId>jacoco-maven-plugin</artifactId>
          </plugin>

          <plugin>
            <groupId>org.sonarsource.scanner.maven</groupId>
            <artifactId>sonar-maven-plugin</artifactId>
            <executions>
              <execution>
                <id>default</id>
                <phase>post-integration-test</phase>
                <goals>
                  <goal>sonar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>release-profile</id>
      <activation>
        <property>
          <name>performRelease</name>
          <value>true</value>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-source-plugin</artifactId>
          </plugin>
          <plugin>
            <artifactId>maven-javadoc-plugin</artifactId>
          </plugin>
          <plugin>
            <artifactId>maven-gpg-plugin</artifactId>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>release-checks</id>
      <activation>
        <property>
          <name>performRelease</name>
          <value>true</value>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-source-plugin</artifactId>
          </plugin>
          <plugin>
            <artifactId>maven-javadoc-plugin</artifactId>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

</project>
