Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does the new Java 9 Platform Module System integrate into Maven?

I have recently looked at the new Java Platform Module System which provides functionality that seems to overlap with what Maven offers in terms of dependency management between jar files. I was wondering how this new Java feature will affect Maven and if it has already been integrated into Maven or a similar tool, and if so, what would be a hello-world usage example.

Cheers

like image 269
Fede Garcia Avatar asked Feb 26 '26 01:02

Fede Garcia


1 Answers

You seemed to misundestand the module system. Maven offers a dependency management system. The module system offers a system to define modules and the exported/required interfaces of modules...(something like OSGi without the dynamic part of OSGi)...Apart from that you can compile modules usign a module-info.java file for a longer time.

http://blog.soebes.de/blog/2017/06/06/howto-create-a-java-run-time-image-with-maven/ https://maven.apache.org/plugins/maven-compiler-plugin/examples/module-info.html https://www.slideshare.net/RobertScholte/java-9-and-the-impact-on-maven-projects http://blog.joda.org/2017/04/java-se-9-jpms-modules-are-not-artifacts.html

like image 60
khmarbaise Avatar answered Feb 28 '26 13:02

khmarbaise



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!