I created a simple [GitHub project (branch moduleClash)|https://github.com/manovotn/JDK9Playground/tree/moduleClash] which can simulate this problem. Its an SE application which (for reasons unknown) decides to {{extends org.jboss.weld.environment.ContainerContext}} while using modular system in JDK 9.
Now, this happens if you depend on relevant Weld part (servlet-core here, as that depends on weld-environment-common) *AND IN THE SAME TIME have this Weld jar added on module path* (not class path). The reason being that this way Maven will force the creation of so called [automatic modules|http://openjdk.java.net/projects/jigsaw/spec/sotms/#automatic-modules] out of Weld dependencies. If you added the jar on a classpath instead, this should work, but as of now, I am unable to convince Maven to do just that :-/
Also, I cannot really say if this would be a blocker if we were to modularize Weld (which I unsure we aim to, at least any time soon^TM^), but it might prove to be so. I'll just keep poking my nose into this a while longer. |
|