<?xml version="1.0" encoding="UTF-8"?>
<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>de.gwdg.metadataqa</groupId>
  <artifactId>metadata-qa-api</artifactId>
  <name>Metadata Quality Assurance Framework API</name>
  <version>0.9.8</version>
  <description>A metadata quality assurance framework. It checks some metrics of 
    metadata records, such as completeness, uniqueness, problem catalog.</description>
  <url>https://pkiraly.github.io</url>
  <developers>
    <developer>
      <name>Péter Király</name>
      <email>peter.kiraly@gwdg.de</email>
      <organization>Gesellschaft für wissenschaftliche Datenverarbeitung mbH Göttingen (GWDG)</organization>
      <organizationUrl>https://gwdg.de/</organizationUrl>
      <roles>
        <role>developer</role>
      </roles>
    </developer>
  </developers>
  <licenses>
    <license>
      <name>GNU General Public License, Version 3.0</name>
      <url>http://www.gnu.org/licenses/gpl-3.0.txt</url>
    </license>
  </licenses>
  <scm>
    <connection>scm:git:git@github.com:pkiraly/metadata-qa-api.git</connection>
    <developerConnection>scm:git:git@github.com:pkiraly/metadata-qa-api.git</developerConnection>
    <url>http://github.com/pkiraly/metadata-qa-api</url>
  </scm>
  <build>
    <resources>
      <resource>
        <filtering>true</filtering>
        <directory>src/main/resources</directory>
        <includes>
          <include>**/version.prop</include>
        </includes>
      </resource>
      <resource>
        <directory>src/main/resources</directory>
        <excludes>
          <exclude>**/version.prop</exclude>
        </excludes>
      </resource>
    </resources>
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.14.0</version>
        <configuration>
          <release>11</release>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-source-plugin</artifactId>
        <version>3.3.1</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
            <configuration>
              <skipSource>${skipSource}</skipSource>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>3.11.2</version>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
            <configuration>
              <failOnError>false</failOnError>
              <skip>${skipJavadoc}</skip>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <version>3.4.2</version>
        <configuration>
          <archive>
            <manifest>
              <addDefaultEntries>true</addDefaultEntries>
              <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
              <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
              <addBuildEnvironmentEntries>true</addBuildEnvironmentEntries>
            </manifest>
          </archive>
          <source>${maven.compiler.source}</source>
          <target>${maven.compiler.target}</target>
          <testSource>${maven.compiler.source}</testSource>
          <testTarget>${maven.compiler.target}</testTarget>
          <compilerArgument>
            <arg>-Xlint:unchecked</arg>
          </compilerArgument>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-gpg-plugin</artifactId>
        <version>3.2.7</version>
        <executions>
          <execution>
            <id>sign-artifacts</id>
            <phase>verify</phase>
            <goals>
              <goal>sign</goal>
            </goals>
            <configuration>
              <skip>${skipGpg}</skip>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.sonatype.central</groupId>
        <artifactId>central-publishing-maven-plugin</artifactId>
        <version>0.8.0</version>
        <extensions>true</extensions>
        <configuration>
          <publishingServerId>central</publishingServerId>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.eluder.coveralls</groupId>
        <artifactId>coveralls-maven-plugin</artifactId>
        <version>4.3.0</version>
        <dependencies>
          <dependency>
            <groupId>javax.xml.bind</groupId>
            <artifactId>jaxb-api</artifactId>
            <version>2.3.1</version>
          </dependency>
        </dependencies>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>3.5.3</version>
        <configuration>
          <excludedGroups>${testsToExclude}</excludedGroups>
          <skip>${skipUnitTests}</skip>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <version>0.8.13</version>
        <executions>
          <execution>
            <id>jacoco-initialize</id>
            <goals>
              <goal>prepare-agent</goal>
            </goals>
          </execution>
          <execution>
            <id>jacoco-site</id>
            <phase>package</phase>
            <goals>
              <goal>report</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <destfile>${basedir}/target/coverage-reports/jacoco-unit.exec</destfile>
          <datafile>${basedir}/target/coverage-reports/jacoco-unit.exec</datafile>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <version>3.6.0</version>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <shadedArtifactAttached>true</shadedArtifactAttached>
          <transformers>
            <transformer>
              <mainClass>de.gwdg.metadataqa.api.cli.App</mainClass>
            </transformer>
          </transformers>
          <filters>
            <filter>
              <artifact>*:*</artifact>
              <excludes>
                <exclude>module-info.class</exclude>
                <exclude>META-INF/*.SF</exclude>
                <exclude>META-INF/*.DSA</exclude>
                <exclude>META-INF/*.RSA</exclude>
              </excludes>
            </filter>
          </filters>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>deploy</id>
      <reporting />
      <properties>
        <skipGpg>false</skipGpg>
        <skipJavadoc>false</skipJavadoc>
        <skipSource>false</skipSource>
        <skipStaging>false</skipStaging>
      </properties>
    </profile>
    <profile>
      <id>travis</id>
      <reporting>
        <excludeDefaults>true</excludeDefaults>
      </reporting>
      <properties>
        <skipGpg>true</skipGpg>
        <skipJavadoc>true</skipJavadoc>
        <skipSource>true</skipSource>
        <skipStaging>true</skipStaging>
      </properties>
    </profile>
  </profiles>
  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.13.2</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>hamcrest-core</artifactId>
          <groupId>org.hamcrest</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>de.bechte.junit</groupId>
      <artifactId>junit-hierarchicalcontextrunner</artifactId>
      <version>4.12.2</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.github.stefanbirkner</groupId>
      <artifactId>system-lambda</artifactId>
      <version>1.2.1</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <reporting>
    <plugins>
      <plugin>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <version>3.6.0</version>
        <reportSets>
          <reportSet>
            <reports>
              <report>checkstyle</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>3.11.2</version>
        <configuration>
          <failOnError>false</failOnError>
          <skip>${skipJavadoc}</skip>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-jxr-plugin</artifactId>
        <version>3.6.0</version>
      </plugin>
      <plugin>
        <artifactId>maven-site-plugin</artifactId>
        <version>3.21.0</version>
      </plugin>
      <plugin>
        <artifactId>maven-project-info-reports-plugin</artifactId>
        <version>3.9.0</version>
      </plugin>
    </plugins>
  </reporting>
  <distributionManagement>
    <repository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>
    <snapshotRepository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
  </distributionManagement>
  <properties>
    <sonar.host.url>https://sonarcloud.io</sonar.host.url>
    <skipUnitTests>false</skipUnitTests>
    <project.region>US</project.region>
    <project.language>en</project.language>
    <skipJavadoc>true</skipJavadoc>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <skipSource>true</skipSource>
    <skipStaging>true</skipStaging>
    <skipGpg>true</skipGpg>
    <project.timezone>UTC</project.timezone>
    <maven.compiler.source>11.0</maven.compiler.source>
    <sonar.organization>pkiraly</sonar.organization>
    <maven.compiler.target>11.0</maven.compiler.target>
    <sonar.projectKey>pkiraly_metadata-qa-api</sonar.projectKey>
    <argLine>-Duser.timezone=${project.timezone} -Dfile.encoding=${project.build.sourceEncoding} -Duser.language=${project.language} -Duser.region=${project.region}</argLine>
  </properties>
</project>
