Transformer implementation to concatenate Log4j2Plugins.dat files
Switch branches/tags
Nothing to show
Clone or download
Latest commit 0c38a18 Mar 17, 2017

README.md

maven-shaded-log4j-transformer

Transformer implementation to concatenate Log4j2Plugins.dat files due build with Maven Shaded plugin.

How to use:

<project>
...
    <build>
...
        <plugins>
...
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>2.4.3</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <finalName>${project.artifactId}${appSuffix}</finalName>
                            <transformers>
...
                                <transformer
                                        implementation="com.github.edwgiz.mavenShadePlugin.log4j2CacheTransformer.PluginsCacheFileTransformer">
                                </transformer>
                            </transformers>
...
                        </configuration>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>com.github.edwgiz</groupId>
                        <artifactId>maven-shade-plugin.log4j2-cachefile-transformer</artifactId>
                        <version>2.8.1</version>
                    </dependency>
                </dependencies>
            </plugin>
        </plugins>

    </build>

    <pluginRepositories>
        <pluginRepository>
            <id>central</id>
            <name>Central Repository</name>
            <url>http://central.maven.org/maven2</url>
        </pluginRepository>
    </pluginRepositories>

</project>

A number of the transformer version (it's 2.8.1 now) corresponds to the number of the artifacts in org.apache.logging.log4j group