Maven, Ivy, and Gradle Artifacts

Log4j is broken up in an API and an implementation (core), where the API provides the interface that applications should code to. Log4j core is only needed at runtime and not at compile time.

Using Log4j Kotlin in your Apache Maven build

To build with Apache Maven, add the dependencies listed below to your pom.xml file.

pom.xml
<dependencies>
  <dependency>
    <groupId>org.apache.logging.log4j</groupId>
    <artifactId>log4j-api-kotlin</artifactId>
    <version>1.3.0-SNAPSHOT</version>
  </dependency>
</dependencies>

<1>

Using Log4j Kotlin in your Apache Ivy build

To build with Apache Ivy, add the dependencies listed below to your ivy.xml file.

ivy.xml
<dependencies>
  <dependency org="org.apache.logging.log4j" name="log4j-api-kotlin" rev="1.3.0-SNAPSHOT" />
</dependencies>

Using Log4j in your Gradle build

To build with Gradle, add the dependencies listed below to your build.gradle file.

build.gradle
dependencies {
  compile group: 'org.apache.logging.log4j', name: 'log4j-api-kotlin', version: '1.3.0-SNAPSHOT'
}

Snapshot builds

You can access the latest development snapshot by using the Maven repository https://repository.apache.org/snapshots and the current SNAPSHOT version. Generally, the master branch will use the next patch version as its snapshot version regardless of what the next actual version of Log4j Kotlin will be. For example, if the latest release were 1.1.0, then master would be using the version 1.2.0-SNAPSHOT. Always verify with pom.xml in the master branch as described in the source repository.

Maven

Maven users can add the following to their pom.xml to enable snapshots:

pom.xml
<repositories>
  <repository>
    <id>apache.snapshots</id>
    <name>Apache Snapshot Repository</name>
    <url>https://repository.apache.org/snapshots</url>
    <releases>
      <enabled>false</enabled>
    </releases>
  </repository>
</repositories>

Gradle

Gradle users can add the following to their build.gradle to enable snapshots:

build.gradle
repositories {
  mavenCentral()
  maven { url 'https://repository.apache.org/snapshots' }
}