maven-java9-jigsaw
maven-java9-jigsaw copied to clipboard
How to Use External Dependencies
How would you go about incorporating an external dependency into one of your modules? For example lets say you used a Math dependency in one of your implementations:
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-math3</artifactId>
<version>3.2</version>
</dependency>
With this added to your POM, would your run command still work? I've used your project as a template for a playground project and I'm getting a java.lang.module.FindException: Module XXXXX not found, required by ....
In my module-info.java for the service provider provider I require the non-modular dependency
I have the same issue, any workarounds?
While this is very late, but relevant, you can "require" non-modular jars by their jar name. That is considered as "depending on a module with automatic name"