This is the Tools in Action version of the orginal "Java 9 and the impact on Maven Projects" presentation. It uses an old example project from the Maven by Example book, but it shows very well the issues you can hit while migrating.
3. @rfscholte#Devoxx #Maven
History
April 2014: Java 9 Early Access releases
No remarkable issues when running with Maven
September 2015: Jigsaw Early Access releases
99%+ of the Java Maven projects failed to compile
OpenJDK fixed issue and released within 72h!
zero LOCs changed in Maven core codebase to run on Java 9
4. @rfscholte#Devoxx #Maven
Maven by Example
Chapter 7
Multi-Module Enterprise Project
“In this chapter, we create a multi-module project
that evolves the examples from Chapter 6 and
Chapter 5 into a project that uses the Spring
Framework and Hibernate to create both a simple
web application and a command-line utility to read
data from the Yahoo Weather feed.”
11. @rfscholte#Devoxx #Maven
modules are not supported in -source
1.6
Options:
• Set release=9
• Apply recipe “Older projects with module-info”
• maven-compiler-plugin with 2 execution-blocks
12. @rfscholte#Devoxx #Maven
Split packages
“If two or more JAR files on the class path contain types in
the same package then at most one of them can be used
as an automatic module, since the module system still
guarantees that every named module reads at most one
named module defining a given package and that named
modules defining identically-named packages do not
interfere with each other.”
Option (just one): upgrade/replace dependencies
13. @rfscholte#Devoxx #Maven
How to continue
• Not all Java9/jigsaw changes are related to Maven
• There will be Maven recipes to help migrating to Java 9