<!--
  ~ Licensed to the Apache Software Foundation (ASF) under one or more
  ~ contributor license agreements. See the NOTICE file distributed with
  ~ this work for additional information regarding copyright ownership.
  ~ The ASF licenses this file to You 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>


   <parent>
      <groupId>org.apache.activemq</groupId>
      <artifactId>artemis-pom</artifactId>
      <version>2.30.0</version>
   </parent>

   <artifactId>apache-artemis</artifactId>
   <packaging>pom</packaging>
   <name>Apache ActiveMQ Artemis Distribution</name>

   <properties>
      <schemaLocation>${project.build.directory}/${project.artifactId}-${project.version}-bin/${project.artifactId}-${project.version}/schema</schemaLocation>
      <configLocation>src/main/resources/config</configLocation>
      <activemq.basedir>${project.basedir}/..</activemq.basedir>
   </properties>

   <dependencies>
     <!-- ActiveMQ Artemis artifacts -->
      <dependency>
         <groupId>org.apache.activemq</groupId>
         <artifactId>artemis-boot</artifactId>
         <version>${project.version}</version>
      </dependency>
      <dependency>
         <groupId>org.apache.activemq</groupId>
         <artifactId>artemis-server</artifactId>
         <version>${project.version}</version>
      </dependency>
      <dependency>
         <groupId>org.apache.activemq</groupId>
         <artifactId>artemis-cli</artifactId>
         <version>${project.version}</version>
      </dependency>
     <dependency>
        <groupId>org.apache.activemq</groupId>
        <artifactId>artemis-jms-server</artifactId>
        <version>${project.version}</version>
     </dependency>
     <dependency>
        <groupId>org.apache.activemq</groupId>
        <artifactId>artemis-jms-client</artifactId>
        <version>${project.version}</version>
     </dependency>
     <dependency>
        <groupId>org.apache.activemq</groupId>
        <artifactId>artemis-ra</artifactId>
        <version>${project.version}</version>
     </dependency>
      <dependency>
         <groupId>org.apache.activemq</groupId>
         <artifactId>artemis-web</artifactId>
         <version>${project.version}</version>
      </dependency>
      <dependency>
         <groupId>org.apache.activemq</groupId>
         <artifactId>artemis-core-client</artifactId>
         <version>${project.version}</version>
      </dependency>
       <dependency>
           <groupId>org.apache.activemq</groupId>
           <artifactId>artemis-amqp-protocol</artifactId>
           <version>${project.version}</version>
       </dependency>
       <dependency>
           <groupId>org.apache.activemq</groupId>
           <artifactId>artemis-stomp-protocol</artifactId>
           <version>${project.version}</version>
       </dependency>
       <dependency>
           <groupId>org.apache.activemq</groupId>
           <artifactId>artemis-openwire-protocol</artifactId>
           <version>${project.version}</version>
       </dependency>
       <dependency>
           <groupId>org.apache.activemq</groupId>
           <artifactId>artemis-hornetq-protocol</artifactId>
           <version>${project.version}</version>
       </dependency>
      <dependency>
         <groupId>org.apache.activemq</groupId>
         <artifactId>artemis-mqtt-protocol</artifactId>
         <version>${project.version}</version>
      </dependency>
      <dependency>
         <groupId>org.apache.activemq</groupId>
         <artifactId>activemq-artemis-native</artifactId>
         <version>${activemq-artemis-native-version}</version>
      </dependency>
      <dependency>
         <groupId>org.apache.activemq</groupId>
         <artifactId>artemis-jdbc-store</artifactId>
         <version>${project.version}</version>
      </dependency>

      <!-- Logging implementation -->
      <dependency>
         <groupId>org.apache.logging.log4j</groupId>
         <artifactId>log4j-slf4j-impl</artifactId>
         <scope>runtime</scope>
      </dependency>

      <!-- dependencies -->
       <dependency>
           <groupId>org.apache.activemq</groupId>
           <artifactId>activemq-openwire-legacy</artifactId>
       </dependency>

      <!-- Management Console Dependencies -->
       <dependency>
           <groupId>org.apache.activemq</groupId>
           <artifactId>artemis-console</artifactId>
           <version>${project.version} </version>
           <type>war</type>
       </dependency>
       <dependency>
           <groupId>org.apache.activemq</groupId>
           <artifactId>activemq-branding</artifactId>
           <version>${project.version} </version>
           <type>war</type>
       </dependency>
       <dependency>
           <groupId>org.apache.activemq</groupId>
           <artifactId>artemis-plugin</artifactId>
           <version>${project.version} </version>
           <type>war</type>
       </dependency>
      <!-- quorum -->
      <dependency>
         <groupId>org.apache.activemq</groupId>
         <artifactId>artemis-quorum-api</artifactId>
         <version>${project.version}</version>
      </dependency>
      <dependency>
         <groupId>org.apache.activemq</groupId>
         <artifactId>artemis-quorum-ri</artifactId>
         <version>${project.version}</version>
      </dependency>

      <!--TODO: no other modules seem to use this, is it equivalent to something else they do use ? -->
      <dependency>
         <groupId>jakarta.security.auth.message</groupId>
         <artifactId>jakarta.security.auth.message-api</artifactId>
      </dependency>
   </dependencies>

   <build>
      <resources>
         <resource>
            <directory>../artemis/src/main/resources</directory>
            <filtering>true</filtering>
         </resource>
      </resources>
      <plugins>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-deploy-plugin</artifactId>
         </plugin>
         <plugin>
            <artifactId>maven-assembly-plugin</artifactId>
            <executions>
               <execution>
                  <id>bin</id>
                  <configuration>
                     <descriptors>
                       <descriptor>src/main/assembly/bin.xml</descriptor>
                     </descriptors>
                     <tarLongFileMode>posix</tarLongFileMode>
                  </configuration>
                  <phase>package</phase>
                  <goals>
                     <goal>single</goal>
                  </goals>
               </execution>
               <execution>
                  <id>dir</id>
                  <configuration>
                     <attach>false</attach>
                     <descriptors>
                       <descriptor>src/main/assembly/dir.xml</descriptor>
                     </descriptors>
                     <tarLongFileMode>posix</tarLongFileMode>
                  </configuration>
                  <phase>package</phase>
                  <goals>
                     <goal>single</goal>
                  </goals>
               </execution>
            </executions>
         </plugin>
         <plugin>
            <groupId>com.ruleoftech</groupId>
            <artifactId>markdown-page-generator-plugin</artifactId>
            <version>2.4.0</version>
            <executions>
               <execution>
                  <phase>compile</phase>
                  <goals>
                     <goal>generate</goal>
                  </goals>
               </execution>
            </executions>
            <configuration>
               <headerHtmlFile>${activemq.basedir}/examples/common/header.html</headerHtmlFile>
               <footerHtmlFile>${activemq.basedir}/examples/common/footer.html</footerHtmlFile>
               <inputDirectory>${activemq.basedir}/examples</inputDirectory>
               <outputDirectory>${project.build.directory}/markdown-pages/examples</outputDirectory>
               <recursiveInput>true</recursiveInput>
               <pegdownExtensions>FENCED_CODE_BLOCKS</pegdownExtensions>
            </configuration>
         </plugin>
      </plugins>
   </build>

   <profiles>
      <profile>
         <id>apache-release</id>
         <build>
            <plugins>
               <plugin>
                  <artifactId>maven-assembly-plugin</artifactId>
                  <executions>
                     <execution>
                        <id>source</id>
                        <configuration>
                           <descriptors>
                              <descriptor>src/main/assembly/source-assembly.xml</descriptor>
                           </descriptors>
                           <tarLongFileMode>posix</tarLongFileMode>
                        </configuration>
                        <phase>package</phase>
                        <goals>
                           <goal>single</goal>
                        </goals>
                     </execution>
                  </executions>
               </plugin>
               <!-- Calculate SHA-512 checksums. Overrides the apache parent pom
                    execution configuration, for this module -->
               <plugin>
                  <groupId>net.nicoulaj.maven.plugins</groupId>
                  <artifactId>checksum-maven-plugin</artifactId>
                  <executions>
                     <execution>
                        <id>source-release-checksum</id>
                        <goals>
                           <goal>artifacts</goal>
                        </goals>
                        <phase>post-integration-test</phase>
                        <configuration>
                           <algorithms>
                              <algorithm>SHA-512</algorithm>
                           </algorithms>
                           <includeClassifiers>source-release,bin</includeClassifiers>
                           <excludeMainArtifact>true</excludeMainArtifact>
                           <csvSummary>false</csvSummary>
                           <attachChecksums>true</attachChecksums>
                        </configuration>
                     </execution>
                  </executions>
               </plugin>
            </plugins>
         </build>
      </profile>
   </profiles>
</project>
