GithubHelp home page GithubHelp logo

nomadblacky / sbt-assembly-log4j2 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from idio/sbt-assembly-log4j2

3.0 3.0 0.0 13 KB

A tiny plugin to provide a MergeStrategy for those pesky Log4j2Plugins.dat files

License: MIT License

Scala 100.00%

sbt-assembly-log4j2's Introduction

sbt-assembly-log4j2

Problem: When including several projects that include log4j2 plugins, sbt-assembly will encounter multiple versions of the Log4j2Plugins.dat cache file that it won't be able to reconcile.

Solution: Log4j2 provides a PluginCache class that creates consistent, serialisable cache from multiple different ones.

This plugin provides a simple function to merge those files in a safe way.

Setup

For sbt 1.x add sbt-assembly-log4j2 as a dependency in project/assembly.sbt alongside sbt-assembly:

addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "<version>")
addSbtPlugin("com.github.nomadblacky" % "sbt-assembly-log4j2" % "0.1.1")

Usage

In your merge strategy, add the following case:

import sbtassembly.Log4j2MergeStrategy

assemblyMergeStrategy in assembly := {
    //...
    case PathList(ps @ _*) if ps.last == "Log4j2Plugins.dat" => Log4j2MergeStrategy.plugincache
    //...
}

sbt-assembly-log4j2's People

Contributors

mal avatar

Stargazers

 avatar  avatar Simon Bruguerolle avatar

Watchers

James Cloos avatar Takumi Kadowaki avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.