<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright 2016-2024 The OpenZipkin 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/xsd/maven-4.0.0.xsd">
  <parent>
    <artifactId>zipkin-reporter-parent</artifactId>
    <groupId>io.zipkin.reporter2</groupId>
    <version>2.17.2</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>

  <artifactId>zipkin-sender-activemq-client</artifactId>
  <name>Zipkin Sender: ActiveMQ Client 5.15.x</name>

  <properties>
    <!-- Matches Export-Package in bnd.bnd -->
    <module.name>zipkin2.reporter.activemq</module.name>

    <main.basedir>${project.basedir}/..</main.basedir>
    <!-- Be conscious about a 6.x upgrade: 5.x and 6.x types are incompatible
         as the former uses javax.jms and latter jakarta.jms. It could be
         better to make an activemq-client6 module. -->
    <activemq.version>5.18.3</activemq.version>
  </properties>

  <dependencies>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>zipkin-reporter</artifactId>
      <version>${project.version}</version>
    </dependency>

    <dependency>
      <groupId>org.apache.activemq</groupId>
      <artifactId>activemq-client</artifactId>
      <version>${activemq.version}</version>
    </dependency>

    <dependency>
      <groupId>org.testcontainers</groupId>
      <artifactId>testcontainers</artifactId>
      <version>${testcontainers.version}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <profiles>
    <profile>
      <id>release</id>
      <properties>
        <!-- activemq is Java 1.6 bytecode -->
        <maven.compiler.source>1.6</maven.compiler.source>
        <maven.compiler.target>1.6</maven.compiler.target>
        <maven.compiler.release>6</maven.compiler.release>
      </properties>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-enforcer-plugin</artifactId>
            <version>${maven-enforcer-plugin.version}</version>
            <executions>
              <execution>
                <id>enforce-java</id>
                <goals>
                  <goal>enforce</goal>
                </goals>
                <configuration>
                  <rules>
                    <!-- The only LTS JDK we support that can compile 1.6 bytecode is 11.
                         https://www.oracle.com/java/technologies/javase/12-relnote-issues.html -->
                    <requireJavaVersion>
                      <version>[11,12)</version>
                    </requireJavaVersion>
                  </rules>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
