blob: 43dc7f87714225db58bdf63bd086db1e644c03cc [file] [log] [blame]
<?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 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.logging.log4j</groupId>
<artifactId>log4j</artifactId>
<version>${revision}</version>
<relativePath>../log4j-parent</relativePath>
</parent>
<artifactId>log4j-core</artifactId>
<name>Apache Log4j Core</name>
<description>The Apache Log4j Implementation</description>
<properties>
<!-- Javadoc needs to be generated for this module -->
<maven.javadoc.skip>false</maven.javadoc.skip>
<!-- Tests are located elsewhere, no need to do any processing for the `src/test` directory: -->
<maven.test.skip>true</maven.test.skip>
<!-- `log4j-core` plugin descriptor needs to be consumed before other modules' descriptors -->
<log4j.docgen.pluginDescriptorsDir>${log4j.docgen.pluginDescriptorsDir.phase1}</log4j.docgen.pluginDescriptorsDir>
<!--
~ OSGi and JPMS options
-->
<bnd-multi-release>true</bnd-multi-release>
<bnd-extra-package-options>
<!-- External optional dependencies -->
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.lang.model.*;resolution:=optional,
javax.tools;resolution:=optional,
<!-- `java.sql`, which depends on `java.logging` is optional -->
javax.sql;resolution:=optional,
java.util.logging;resolution:=optional,
<!-- `java.naming` is optional -->
javax.naming;resolution:=optional
</bnd-extra-package-options>
<bnd-extra-module-options>
<!-- OSGI is optional in JPMS and it shouldn't be transitive either (#1895) -->
org.osgi.core;static=true;transitive=false,
<!-- BND seems to always add `java.logging` (dependency of `java.sql`) -->
java.logging;static=true,
java.sql;static=true,
<!-- Remove `transitive` from optional dependencies -->
com.fasterxml.jackson.annotation;transitive=false,
com.lmax.disruptor;transitive=false,
com.fasterxml.jackson.core;transitive=false,
com.fasterxml.jackson.databind;transitive=false,
com.fasterxml.jackson.dataformat.xml;transitive=false,
com.fasterxml.jackson.dataformat.yaml;transitive=false,
java.naming;transitive=false,
org.apache.commons.csv;transitive=false,
org.fusesource.jansi;transitive=false,
org.zeromq.jeromq;transitive=false,
<!-- A module descriptor is only available in version 1.2.16+, hence it is not detected -->
com.conversantmedia.disruptor;substitute="disruptor";transitive=false;static=true,
<!-- Filebased module names: MUST be static -->
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
</bnd-extra-module-options>
</properties>
<dependencies>
<dependency>
<groupId>javax.activation</groupId>
<artifactId>javax.activation-api</artifactId>
<scope>provided</scope>
<optional>true</optional>
</dependency>
<!-- Used for JMS appenders (needs an implementation of course) -->
<dependency>
<groupId>javax.jms</groupId>
<artifactId>javax.jms-api</artifactId>
<scope>provided</scope>
<optional>true</optional>
</dependency>
<!-- Required for SMTPAppender -->
<dependency>
<groupId>javax.mail</groupId>
<artifactId>javax.mail-api</artifactId>
<scope>provided</scope>
<optional>true</optional>
</dependency>
<!-- Used for OSGi bundle support -->
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.core</artifactId>
<scope>provided</scope>
</dependency>
<!-- Naturally, all implementations require the log4j-api JAR -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
</dependency>
<!-- Used for compressing to formats other than zip and gz -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
<optional>true</optional>
</dependency>
<!-- Used for the CSV layout -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-csv</artifactId>
<optional>true</optional>
</dependency>
<!-- Alternative implementation of BlockingQueue using Conversant Disruptor for AsyncAppender -->
<dependency>
<groupId>com.conversantmedia</groupId>
<artifactId>disruptor</artifactId>
<optional>true</optional>
</dependency>
<!-- Required for AsyncLoggers -->
<dependency>
<groupId>com.lmax</groupId>
<artifactId>disruptor</artifactId>
<optional>true</optional>
</dependency>
<!-- Required for JSON support -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<optional>true</optional>
</dependency>
<!-- Required for JSON support -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<optional>true</optional>
</dependency>
<!-- Required for XML layout and receiver support -->
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-xml</artifactId>
<optional>true</optional>
</dependency>
<!-- Required for YAML support (including JSON requirements) -->
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-yaml</artifactId>
<optional>true</optional>
</dependency>
<!-- Required for console color support in Windows -->
<dependency>
<groupId>org.fusesource.jansi</groupId>
<artifactId>jansi</artifactId>
<optional>true</optional>
</dependency>
<!-- Alternative implementation of BlockingQueue using JCTools for AsyncAppender -->
<dependency>
<groupId>org.jctools</groupId>
<artifactId>jctools-core</artifactId>
<optional>true</optional>
</dependency>
<!-- Used for ZeroMQ JeroMQ appender -->
<dependency>
<groupId>org.zeromq</groupId>
<artifactId>jeromq</artifactId>
<optional>true</optional>
</dependency>
<!-- Used for Kafka appender -->
<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>
</dependencies>
<build>
<plugins>
<!-- Add Java 9+ code for the MRJ -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>add-source</id>
<goals>
<goal>add-source</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<sources>
<source>${project.build.directory}/log4j-core-java9</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack-classes</id>
<goals>
<goal>unpack</goal>
</goals>
<phase>prepare-package</phase>
<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>