Details

    • Type: Sub-task
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 3.0.0.Beta1
    • Fix Version/s: 3.0.0.CR1
    • Component/s: None
    • Labels:
    • Environment:

      JDK 9

      Description

      When building a modular JDK 9 project, any pom.xml dependency will be added onto module path. If that dependency is not a module itself, it will be converted to an "automatic module".

      This is the case if someone uses Weld in JDK 9 project.
      JDK 9 also poses a strict requirement on modules, similar to what was up until now known as sealed JAR. That means you cannot have the same package coming from more than one JAR (or module in this case).

      If the project depends on Weld Core and Weld API, we got a problem. Both projects have many same packages.

      Reproducer can be found within my playground project. Just build it with JDK 9.

      Here is a stacktrace of clashing packages:

      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.6.0:compile (default-compile) on project JDK9Playground: Compilation failure: Compilation failure:
      [ERROR] module  reads package org.jboss.weld.context from both weld.core.impl and weld.api
      [ERROR] module  reads package org.jboss.weld.context.bound from both weld.core.impl and weld.api
      [ERROR] module  reads package org.jboss.weld.context.activator from both weld.core.impl and weld.api
      [ERROR] module  reads package org.jboss.weld.context.unbound from both weld.core.impl and weld.api
      [ERROR] module weld.core.impl reads package org.jboss.weld.context from both weld.api and weld.core.impl
      [ERROR] module weld.core.impl reads package org.jboss.weld.context.bound from both weld.api and weld.core.impl
      [ERROR] module weld.core.impl reads package org.jboss.weld.context.activator from both weld.api and weld.core.impl
      [ERROR] module weld.core.impl reads package org.jboss.weld.context.unbound from both weld.api and weld.core.impl
      [ERROR] module javax.inject reads package org.jboss.weld.context from both weld.api and weld.core.impl
      [ERROR] module javax.inject reads package org.jboss.weld.context.bound from both weld.api and weld.core.impl
      [ERROR] module javax.inject reads package org.jboss.weld.context.activator from both weld.api and weld.core.impl
      [ERROR] module javax.inject reads package org.jboss.weld.context.unbound from both weld.api and weld.core.impl
      [ERROR] module cdi.api reads package org.jboss.weld.context from both weld.api and weld.core.impl
      [ERROR] module cdi.api reads package org.jboss.weld.context.bound from both weld.api and weld.core.impl
      [ERROR] module cdi.api reads package org.jboss.weld.context.activator from both weld.api and weld.core.impl
      [ERROR] module cdi.api reads package org.jboss.weld.context.unbound from both weld.api and weld.core.impl
      [ERROR] module weld.environment.common reads package org.jboss.weld.context from both weld.api and weld.core.impl
      [ERROR] module weld.environment.common reads package org.jboss.weld.context.bound from both weld.api and weld.core.impl
      [ERROR] module weld.environment.common reads package org.jboss.weld.context.activator from both weld.api and weld.core.impl
      [ERROR] module weld.environment.common reads package org.jboss.weld.context.unbound from both weld.api and weld.core.impl
      [ERROR] module weld.api reads package org.jboss.weld.context from both weld.core.impl and weld.api
      [ERROR] module weld.api reads package org.jboss.weld.context.bound from both weld.core.impl and weld.api
      [ERROR] module weld.api reads package org.jboss.weld.context.activator from both weld.core.impl and weld.api
      [ERROR] module weld.api reads package org.jboss.weld.context.unbound from both weld.core.impl and weld.api
      [ERROR] module weld.se.core reads package org.jboss.weld.context from both weld.api and weld.core.impl
      [ERROR] module weld.se.core reads package org.jboss.weld.context.bound from both weld.api and weld.core.impl
      [ERROR] module weld.se.core reads package org.jboss.weld.context.activator from both weld.api and weld.core.impl
      [ERROR] module weld.se.core reads package org.jboss.weld.context.unbound from both weld.api and weld.core.impl
      
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                manovotn manovotn
                Reporter:
                manovotn manovotn
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: