<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ 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 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>org.apache.logging.log4j</groupId>
    <artifactId>log4j</artifactId>
    <version>2.21.1</version>
    <relativePath>../log4j-parent</relativePath>
  </parent>
  <groupId>org.apache.logging.log4j</groupId>
  <artifactId>log4j-core</artifactId>
  <version>2.21.1</version>
  <name>Apache Log4j Core</name>
  <description>The Apache Log4j Implementation</description>
  <licenses>
    <license>
      <name>Apache-2.0</name>
      <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <properties>
    <projectDir>/core</projectDir>
    <javadoc.skip>false</javadoc.skip>
    <bnd-multi-release>true</bnd-multi-release>
    <docLabel>Core Documentation</docLabel>
    <bnd-extra-module-options>org.osgi.core;static=true,
      
      java.logging;static=true,
      java.sql;static=true,
      
      com.fasterxml.jackson.annotation;transitive=false,
      com.lmax.disruptor;transitive=false,
      com.fasterxml.jackson.core;substitute="jackson-core";transitive=false,
      com.fasterxml.jackson.databind;substitute="jackson-databind";transitive=false,
      com.fasterxml.jackson.dataformat.xml;substitute="jackson-dataformat-xml";transitive=false,
      com.fasterxml.jackson.dataformat.yaml;substitute="jackson-dataformat-yaml";transitive=false,
      java.compiler;transitive=false,
      java.naming;transitive=false,
      org.apache.commons.csv;transitive=false,
      org.fusesource.jansi;transitive=false,
      org.jctools.core;substitute="jctools-core";transitive=false;static=true,
      
      disruptor;transitive=false;static=true,
      kafka.clients;substitute="kafka-clients";transitive=false;static=true,
      javax.jms.api;substitute="javax.jms-api";transitive=false;static=true,
      javax.mail.api;substitute="javax.mail-api";transitive=false;static=true,
      jeromq;transitive=false;static=true</bnd-extra-module-options>
    <bnd-extra-package-options>com.conversantmedia.util.concurrent;resolution:=optional;
      com.fasterxml.jackson.*;resolution:=optional,
      com.lmax.disruptor.*;resolution:=optional,
      javax.activation;resolution:=optional,
      javax.jms;version="[1.1,3)";resolution:=optional,
      javax.mail.*;version="[1.6,2)";resolution:=optional,
      org.apache.commons.compress.*;resolution:=optional,
      org.apache.commons.csv;resolution:=optional,
      org.apache.kafka.*;resolution:=optional,
      org.codehaus.stax2;resolution:=optional,
      org.fusesource.jansi;resolution:=optional,
      org.jctools.*;resolution:=optional,
      org.zeromq;resolution:=optional,
      
      javax.annotation.processing;resolution:=optional,
      javax.lang.model.*;resolution:=optional,
      javax.tools;resolution:=optional,
      
      javax.sql;resolution:=optional,
      java.util.logging;resolution:=optional,
      
      javax.naming;resolution:=optional</bnd-extra-package-options>
  </properties>
  <dependencies>
    <dependency>
      <groupId>javax.activation</groupId>
      <artifactId>javax.activation-api</artifactId>
      <scope>provided</scope>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>javax.jms</groupId>
      <artifactId>javax.jms-api</artifactId>
      <scope>provided</scope>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>javax.mail</groupId>
      <artifactId>javax.mail-api</artifactId>
      <scope>provided</scope>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>org.osgi</groupId>
      <artifactId>org.osgi.core</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-compress</artifactId>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-csv</artifactId>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>com.conversantmedia</groupId>
      <artifactId>disruptor</artifactId>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>com.lmax</groupId>
      <artifactId>disruptor</artifactId>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-core</artifactId>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-databind</artifactId>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.dataformat</groupId>
      <artifactId>jackson-dataformat-xml</artifactId>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.dataformat</groupId>
      <artifactId>jackson-dataformat-yaml</artifactId>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>org.fusesource.jansi</groupId>
      <artifactId>jansi</artifactId>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>org.jctools</groupId>
      <artifactId>jctools-core</artifactId>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>org.zeromq</groupId>
      <artifactId>jeromq</artifactId>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>org.apache.kafka</groupId>
      <artifactId>kafka-clients</artifactId>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>com.sun.mail</groupId>
      <artifactId>javax.mail</artifactId>
      <scope>runtime</scope>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <scope>runtime</scope>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.woodstox</groupId>
      <artifactId>woodstox-core</artifactId>
      <scope>runtime</scope>
      <optional>true</optional>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <groupId>biz.aQute.bnd</groupId>
        <artifactId>bnd-baseline-maven-plugin</artifactId>
        <configuration>
          <diffpackages>
            <diffpackage>!org.apache.logging.log4j.core.layout.internal</diffpackage>
            <diffpackage>!org.apache.logging.log4j.core.message</diffpackage>
            <diffpackage>!org.apache.logging.log4j.core.time.internal</diffpackage>
            <diffpackage>!org.apache.logging.log4j.core.tools.picocli</diffpackage>
            <diffpackage>!org.apache.logging.log4j.core.util.internal</diffpackage>
            <diffpackage>*</diffpackage>
          </diffpackages>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>add-source</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>add-source</goal>
            </goals>
            <configuration>
              <sources>
                <source>${project.build.directory}/log4j-core-java9</source>
              </sources>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <executions>
          <execution>
            <id>default-compile</id>
            <configuration>
              <annotationProcessorPaths>
                <path>
                  <groupId>com.google.errorprone</groupId>
                  <artifactId>error_prone_core</artifactId>
                  <version>${error-prone.version}</version>
                </path>
              </annotationProcessorPaths>
            </configuration>
          </execution>
          <execution>
            <id>process-plugins</id>
            <phase>process-classes</phase>
            <goals>
              <goal>compile</goal>
            </goals>
            <configuration>
              <annotationProcessors>
                <processor>org.apache.logging.log4j.core.config.plugins.processor.PluginProcessor</processor>
              </annotationProcessors>
              <compilerArgs combine.self="override" />
              <proc>only</proc>
            </configuration>
          </execution>
        </executions>
        <configuration>
          <annotationProcessorPaths combine.self="override" />
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <id>unpack-classes</id>
            <phase>prepare-package</phase>
            <goals>
              <goal>unpack</goal>
            </goals>
            <configuration>
              <artifactItems>
                <artifactItem>
                  <groupId>org.apache.logging.log4j</groupId>
                  <artifactId>log4j-core-java9</artifactId>
                  <version>${project.version}</version>
                  <type>zip</type>
                  <overWrite>false</overWrite>
                </artifactItem>
              </artifactItems>
              <includes>**/*.class</includes>
              <excludes>**/*.java</excludes>
              <outputDirectory>${project.build.directory}</outputDirectory>
              <overWriteReleases>false</overWriteReleases>
              <overWriteSnapshots>true</overWriteSnapshots>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
