I have a JAR that I have created with a few custom plugins that I would like to use in other projects. For some background, I have attempted to use <Configuration packages="com.package.with.custom.appenders">
in the log4j2.xml
for the application consuming my JAR with the custom plugins, however when the EAR file is built for that app and deployed to WebSphere the plugins are not found (see following excerpts from system logs):
[9/24/20 13:46:25:565 CDT] 000000e2 SystemOut O 2020-09-24 13:46:25,565 server.startup : 0 DEBUG PluginManager 'Core' found 122 plugins
...
[9/24/20 13:46:17:734 CDT] 000000e2 SystemOut O 2020-09-24 13:46:17,733 server.startup : 0 ERROR Appenders contains invalid attributes "CustomAppender1", "CustomAppender2"
Note that when I run unit tests or start the app locally from an IDE, 127 plugins are discovered for Core (this includes my 5 custom plugins).
I would like to try building the .dat
file for my JAR with the custom plugins, however I can't seem to find how to do this. I am using Gradle to build my JAR, is there any configuration I need to add so that the .dat
file is created for my plugins?
For reference, I'm going off of this answer.