Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • J jruby-maven-plugins
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 23
    • Issues 23
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 7
    • Merge requests 7
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • The TorqueBox Project
  • jruby-maven-plugins
  • Issues
  • #123
Closed
Open
Issue created Feb 15, 2022 by Sean Story@seanstory

LayerInstantiationException with java 9+ and multi-modules

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.

Assignee
Assign to
Time tracking