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

LayerInstantiationException with java 9+ and multi-modules #123

Open
seanstory opened this issue Feb 15, 2022 · 0 comments
Open

LayerInstantiationException with java 9+ and multi-modules #123

seanstory opened this issue Feb 15, 2022 · 0 comments

Comments

@seanstory
Copy link

seanstory commented Feb 15, 2022

In Java 9+, we got Java Modules. It's required that each Java Module have a unique set of packages.

The gem-maven-plugin packages gemspecs in a specifications/ directory in your jars. This leads to errors like:

[ERROR] Error occurred during initialization of boot layer
[DEBUG] Error occurred during initialization of boot layer
[DEBUG] java.lang.LayerInstantiationException: Package specifications in both module example.provider and module example.consumer
[DEBUG] Closing the fork 1 after not saying Good Bye.

Related Stack Overflow post: https://stackoverflow.com/questions/53640794/java-modules-and-resources-in-identical-directories

The only workaround I've found for this is to mark the rubygems dependencies as <scope>provided</scope> to avoid having them packaged inside my resulting jars. But this is non-ideal.

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