<?xml version="1.0" encoding="UTF-8"?>
<!--
  Copyright 2019 the original author or authors.

  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>org.amqphub.quarkus</groupId>
  <artifactId>quarkus-qpid-jms-parent</artifactId>
  <version>2.7.1</version>
  <packaging>pom</packaging>

  <name>Quarkus Qpid JMS - Parent</name>
  <description>Extension enabling use of the AMQP 1.0 Qpid JMS client in a Quarkus application</description>
  <url>https://github.com/amqphub/quarkus-qpid-jms</url>

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

  <properties>
    <quarkus-version>3.15.0</quarkus-version>
    <qpid-jms.version>2.5.0</qpid-jms.version>

    <maven.compiler.source>17</maven.compiler.source>
    <maven.compiler.target>17</maven.compiler.target>
    <maven.compiler.release>17</maven.compiler.release>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <supported-maven-versions>[3.6.3,)</supported-maven-versions>

    <maven-enforcer-plugin-version>3.0.0-M3</maven-enforcer-plugin-version>
    <maven-gpg-plugin-version>1.6</maven-gpg-plugin-version>
    <maven-eclipse-plugin-version>2.10</maven-eclipse-plugin-version>
    <maven-idea-plugin-version>2.2.1</maven-idea-plugin-version>
    <maven-release-plugin-version>2.5.3</maven-release-plugin-version>
    <maven-compiler-plugin-version>3.8.1</maven-compiler-plugin-version>
    <maven-source-plugin-version>3.0.1</maven-source-plugin-version>
    <maven-javadoc-plugin-version>3.1.0</maven-javadoc-plugin-version>
    <maven-deploy-plugin-version>2.8.2</maven-deploy-plugin-version>
    <maven-surefire-plugin-version>2.22.1</maven-surefire-plugin-version>
    <maven-failsafe-plugin-version>2.22.1</maven-failsafe-plugin-version>
    <maven-jar-plugin-version>3.1.0</maven-jar-plugin-version>
    <apache-rat-plugin-version>0.13</apache-rat-plugin-version>

    <maven.test.redirectTestOutputToFile>true</maven.test.redirectTestOutputToFile>
  </properties>

  <scm>
    <url>https://github.com/amqphub/quarkus-qpid-jms</url>
    <connection>scm:git:https://github.com/amqphub/quarkus-qpid-jms.git</connection>
    <developerConnection>scm:git:https://github.com/amqphub/quarkus-qpid-jms.git</developerConnection>
    <tag>2.7.1</tag>
  </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>

  <developers>
    <developer>
      <name>Robbie Gemmell</name>
      <email>robbie.gemmell@gmail.com</email>
    </developer>
  </developers>

  <modules>
    <module>bom</module>

    <module>runtime</module>
    <module>deployment</module>

    <module>integration-tests</module>
  </modules>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>${maven-compiler-plugin-version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>${maven-deploy-plugin-version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <version>${maven-release-plugin-version}</version>
          <configuration>
            <autoVersionSubmodules>true</autoVersionSubmodules>
            <tagNameFormat>@{project.version}</tagNameFormat>
            <useReleaseProfile>false</useReleaseProfile>
            <releaseProfiles>release</releaseProfiles>
            <goals>deploy</goals>
            <pushChanges>true</pushChanges>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-enforcer-plugin</artifactId>
          <version>${maven-enforcer-plugin-version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-eclipse-plugin</artifactId>
          <version>${maven-eclipse-plugin-version}</version>
          <configuration>
            <downloadSources>true</downloadSources>
            <downloadJavadocs>true</downloadJavadocs>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-idea-plugin</artifactId>
          <version>${maven-idea-plugin-version}</version>
          <configuration>
            <downloadSources>true</downloadSources>
            <downloadJavadocs>true</downloadJavadocs>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>${maven-surefire-plugin-version}</version>
          <configuration>
            <systemPropertyVariables>
              <java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
            </systemPropertyVariables>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-failsafe-plugin</artifactId>
          <version>${maven-failsafe-plugin-version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <version>${maven-jar-plugin-version}</version>
        </plugin>
        <plugin>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-maven-plugin</artifactId>
            <version>${quarkus-version}</version>
        </plugin>
      </plugins>
    </pluginManagement>

    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <debug>true</debug>
          <showDeprecation>true</showDeprecation>
          <showWarnings>true</showWarnings>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <executions>
          <execution>
            <id>enforce</id>
            <configuration>
              <rules>
                <dependencyConvergence />
                <requireMavenVersion>
                  <version>${supported-maven-versions}</version>
                </requireMavenVersion>
                <requireJavaVersion>
                  <version>[11,)</version>
                </requireJavaVersion>
              </rules>
            </configuration>
            <goals>
              <goal>enforce</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.rat</groupId>
        <artifactId>apache-rat-plugin</artifactId>
        <version>${apache-rat-plugin-version}</version>
        <configuration>
          <excludes>
            <exclude>.github/workflows/build.yml</exclude>
            <exclude>.github/workflows/cron-build-*.yml</exclude>
            <exclude>.github/cron-maven-settings.xml</exclude>
            <exclude>**/*.md</exclude>
            <exclude>**/*.txt</exclude>
            <exclude>etc/org.eclipse.*</exclude>
            <exclude>**/target/</exclude>
            <exclude>**/data/</exclude>
            <exclude>**/*.lock</exclude>
            <exclude>**/META-INF/services/*</exclude>
            <exclude>**/*.iml</exclude>
            <exclude>**/*.keystore</exclude>
            <exclude>**/*.truststore</exclude>
            <exclude>**/*.crt</exclude>
            <exclude>**/*.csr</exclude>
            <exclude>**/application.properties</exclude>
            <exclude>**/src/main/resources/META-INF/quarkus-extension.yaml</exclude>
          </excludes>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>release</id>
      <activation>
        <property>
          <name>release</name>
          <value>true</value>
        </property>
      </activation>
      <build>
        <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>${maven-source-plugin-version}</version>
          <executions>
            <execution>
              <id>attach-sources</id>
              <goals>
                <goal>jar</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
        <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>${maven-javadoc-plugin-version}</version>
          <executions>
            <execution>
              <id>attach-javadocs</id>
              <goals>
                <goal>jar</goal>
              </goals>
              <configuration>
                <show>package</show>
              </configuration>
            </execution>
          </executions>
        </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>${maven-gpg-plugin-version}</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
