<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <groupId>de.qualitysoft.barcode</groupId>
  <artifactId>qualitysoft-barcode</artifactId>
  <version>${revision}</version>
  <packaging>jar</packaging>

  <name>QualitySoft Barcode Java SDK</name>
  <description>Java wrapper for the native QS Barcode SDK.</description>
  <url>https://github.com/QS-QualitySoft-GmbH/QSBarcode.Java</url>

  <licenses>
    <license>
      <name>Proprietary</name>
      <url>https://qualitysoft.de/</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <developers>
    <developer>
      <id>qualitysoft</id>
      <name>QS QualitySoft GmbH</name>
      <organization>QS QualitySoft GmbH</organization>
      <organizationUrl>https://qualitysoft.de/</organizationUrl>
    </developer>
  </developers>

  <scm>
    <connection>scm:git:https://github.com/QS-QualitySoft-GmbH/QSBarcode.Java.git</connection>
    <developerConnection>scm:git:https://github.com/QS-QualitySoft-GmbH/QSBarcode.Java.git</developerConnection>
    <url>https://github.com/QS-QualitySoft-GmbH/QSBarcode.Java</url>
  </scm>

  <issueManagement>
    <system>GitHub Issues</system>
    <url>https://github.com/QS-QualitySoft-GmbH/QSBarcode.Java/issues</url>
  </issueManagement>

  <properties>
    <maven.compiler.release>11</maven.compiler.release>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <revision>6.0.0</revision>
    <qsbarcode.native.root>native</qsbarcode.native.root>
    <jna.version>5.14.0</jna.version>
    <junit.version>5.10.2</junit.version>
  </properties>

  <dependencies>
    <dependency>
      <groupId>net.java.dev.jna</groupId>
      <artifactId>jna</artifactId>
      <version>${jna.version}</version>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter</artifactId>
      <version>${junit.version}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <resources>
      <resource>
        <directory>src/main/resources</directory>
      </resource>
      <resource>
        <directory>${qsbarcode.native.root}</directory>
        <targetPath>de/qualitysoft/barcode/native</targetPath>
        <filtering>false</filtering>
        <includes>
          <include>**/*</include>
        </includes>
        <excludes>
          <exclude>README.md</exclude>
        </excludes>
      </resource>
    </resources>

    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.13.0</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>3.2.5</version>
        <configuration>
          <useModulePath>false</useModulePath>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>3.3.1</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>3.6.3</version>
        <configuration>
          <doclint>none</doclint>
          <quiet>true</quiet>
        </configuration>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>monorepo-native-assets</id>
      <activation>
        <file>
          <exists>../dotnet/native/README.md</exists>
        </file>
      </activation>
      <properties>
        <qsbarcode.native.root>../dotnet/native</qsbarcode.native.root>
      </properties>
    </profile>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>3.2.4</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.sonatype.central</groupId>
            <artifactId>central-publishing-maven-plugin</artifactId>
            <version>0.9.0</version>
            <extensions>true</extensions>
            <configuration>
              <publishingServerId>central</publishingServerId>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
