Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid packaging dependencies inside war file #28

Closed
slominskir opened this issue Aug 15, 2023 · 2 comments
Closed

Avoid packaging dependencies inside war file #28

slominskir opened this issue Aug 15, 2023 · 2 comments

Comments

@slominskir
Copy link
Member

slominskir commented Aug 15, 2023

Ideally the war artifact attached to a release is just code from this project with no dependencies bundled so that it's a very small file. The dependencies would then be installed in Wildfly as a JBoss module. Unfortunately this is proving very difficult to do so I'm punting and documenting the issue.

The "confluent" dependency, which provides a Kafka Avro SerDe with Schema Registry ultimately results in roughly 30 jar files. Some of which overlap jars that are bundled as modules in Wildfly. The most troublesome appears to be Jackson, (the JSON library), as the version needed is newer than the one bundled in Wildfly. If you try to use the provided one then method not found errors occur. If you instead try to exclude Jackson and then use your own local JBoss Module containing Jackson you're in for a ride because it's tied to RestEasy, which is a global critical lib and you'll likely encounter issues such as:

19:05:56,540 WARN  [org.jboss.resteasy.resteasy_jaxrs.i18n] (default task-2) RESTEASY002186: Failed to set servlet request into asynchronous mode, server sent events may not work

This ends up being about 21.5 MB and 32 jars bundled in the war lib dir.

To be clear: just bundling all deps inside the war works. Attempting to create a "local" scoped JBoss Module (not global) named say "jaws" and then including that custom module in the jboss-deployment-descriptor.xml doesn't appear to work. The custom module just takes everything that would otherwise be inside the war. So it seems the module namespacing and classloading stuff may behave different in this scenario, else I didn't quite get the config right.

@slominskir
Copy link
Member Author

Note: This isn't the first time I've punted on JBoss Module creation: JeffersonLab/smoothness#4

@slominskir
Copy link
Member Author

Turns out I was adding smoothness weblib dependency at the same time to experiment with incorporating that lib and that lib actually contains synchronous filters that caused the no async issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant