SlideShare a Scribd company logo
Keeping up with Java
made easy with
Apache Maven
ROBERT SCHOLTE
@RFSCHOLTE / @ASFMAVENPROJECT
Moving Java Forward Faster (2017/09/06)
Proposal
Taking inspiration from the release models used by other platforms
and by various operating-system distributions, I propose that after
Java 9 we adopt a strict, time-based model with a new feature
release every six months, update releases every quarter, and a long-
term support release every three years.
Source: https://mreinhold.org/blog/forward-faster#Proposal
Surprise?
http://openjdk.java.net/projects/jigsaw/spec/minutes/2017-05-18
Feature driven schedule
20192006 2008 2010 2012 2014 2016 2018
Java 6
December 2006
Java 7
July 2011
Java 8
March 2014
Java 9
September 2017
Time driven schedule
20212018 2019 2020 2021
Java 10
March 2018
Java 11
September 2018
Java 12
March 2019
Java 13
September 2019
Java 14
March 2020
Java 15
September 2020
Java 16
March 2021
Is there really an issue?
Let’s see…
3
6
6
6
7
JAVA 8
JAVA 9
JAVA 10
JAVA 11
JAVA 12
Java support
Classes Sources
Maven runtime versus toolchains
❖ JAVA_HOME is used for the Maven runtime
❖ For ease, JAVA_HOME is the default JDK
❖ With Maven Toolchains some plugins can get an explicit JDK
❖ Most reliable setup: toolchain
#RunsFineOnJDK9
#WorksLikeHeavenOnJDK11
❖ For Maven: YES!
❖ For the plugins: it depends… (most are fine!)
Sourcecode parser
QDox:
❖ reads model up to method signatures
❖ is less critical due to close to no language changes at this level
Bytecode parser
ASM:
❖ reads entire class, must know bytecode version
❖ is very critical, will now be updated every 6 months
20182014 2015 2016 2017 2018
Java 9-ea
8 Apr '14
Java 9
22 Sep '17
Java 10
20 Mar '18
Java 11
25 Sep '18
Jigsaw ea
3 Nov '14
Releases of Java after 2014
Java 9 / Jigsaw early access
❖ Jigsaw team
❖ Java community
❖ Maven team
2018
Today
2014 2015 2016 2017 2018
Java 9-ea
8 Apr '14
Jigsaw ea
3 Nov '14
Java 9
22 Sep '17
Java 10
20 Mar '18
Java 11
25 Sep '18
Maven Compiler Plugin 3.6.0
26 Oct '16
Maven Compiler Plugin 3.6.1
13 Jan '17
Maven Compiler Plugin 3.6.2
26 Jul '17
Maven Compiler Plugin 3.7.0
1 Sep '17
Maven Compiler
Plugin 3.8.0
26 Jul '18
Releases of Maven Compiler Plugin
Maven Compiler Plugin 3.5.1
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version>
<configuration>
<compilerArgs>
<arg>-verbose</arg>
<arg>-Xlint:all,-options,-path</arg>
</compilerArgs>
</configuration>
</plugin>
Maven Compiler Plugin 3.6.x
First implementations of module path support for early adopters
Requirements:
❖ No changes to the pom.xml
❖ (Close to) no extra configuration for developers
Dependencies:
❖ ASM 6.0_ALPHA
❖ QDox 2.0-M6
Java 9 / Maven Compiler Plugin 3.7.0
Module Resolution moved to Plexus::Java
Dependencies:
❖ ASM 6.0_BETA
❖ QDox 2.0-M7
Plexus::Java
Maven independent library for general Java features
❖LocationManager
❖JavaVersion
Used by
❖maven-compiler-plugin
❖maven-javadoc-plugin
❖maven-jlink-plugin
❖maven-jmod-plugin
❖maven-surefire-plugin / maven-failsafe-plugin
❖…
2018Sep Nov 2018 Mar May Jul Sep
Java 9
22 Sep '17
Java 10
20 Mar '18
Java 11
25 Sep '18
Maven Compiler Plugin
3.7.0
1 Sep '17
Maven Compiler Plugin
3.8.0
26 Jul '18
Releases of Maven Compiler Plugin
Java 10 / Maven Compiler Plugin ???
https://stackoverflow.com/questions/49398894/unable-to-compile-simple-java-
10-java-11-project-with-maven
Conclusion: no blocking issue
Updating ASM dependency
This implies: updating to latest asm-6.x dependency is possible,
but not to asm-7.x
Updating plugin dependencies already possible since Maven 2
ClassReader reader = new ClassReader( in );
reader.accept( new ClassVisitor( Opcodes.ASM6 )
{ … } );
2018Sep Nov 2018 Mar May Jul Sep
Java 9
22 Sep '17
Java 10
20 Mar '18
Java 11
25 Sep '18
Maven Compiler Plugin
3.7.0
1 Sep '17
Maven Compiler Plugin
3.8.0
26 Jul '18
Releases of Maven Compiler Plugin
Java 11-ea / Maven Compiler Plugin 3.8.0
❖Reduce need for ASM
❖Use java.lang.module.ModuleDescriptor#read(InputStream)
Will Maven run on future JDK releases?
Yes, most likely
Even Apache Maven 3.0 (released 4 oct 2010) runs on 12-ea
Any issues are plugin related
Is it always forward compatible?
Yes in case of modulepath resolution
No for class analyzers (depend on ASM):
❖maven-dependency-plugin (analyze)
❖maven-plugin-plugin (descriptor)
❖maven-pmd-plugin (pmd)
❖maven-shade-plugin (minifyJar)
How do we test?
https://builds.apache.org/job/maven-box/
Conclusion
Java Release Train reveals critical chain of dependencies
A few plugins might not work right after a new Java release
Depending on the problem:
❖ Update related plugin dependency in your own project
❖ Patch plugin code (please create PR to help each other)
Questions?
Up-for-grabs
~60-80% of Java Project/Developers use Maven
The Apache Maven Project holds ~100 (sub)projects
Maintained by ~5-10 active volunteers (No Company!)
Let’s restore the balance!
https://s.apache.org/up-for-grabs_maven
https://maven.apache.org/guides/development/guide-committer-school.html
20:00-21:00 BOF1
Apache Maven BOF
Robert Scholte
Karl Heinz Marbaise
Hervé Boutemy
Thank you
20:00-21:00 BOF1
Apache Maven BOF
Robert Scholte
Karl Heinz Marbaise
Hervé Boutemy

More Related Content

PPTX
Apache Maven and Java 9 and 10 (Devoxx France 2018)
DOCX
Spring boot competitive tests
DOCX
Spring competitive tests
DOCX
Spring competitive tests
DOCX
Spring boot competitive tests
PDF
What's New in AppFuse 2.0
PDF
Tomcat Maven Plugin
PDF
Automated Deployment with Maven - going the whole nine yards
Apache Maven and Java 9 and 10 (Devoxx France 2018)
Spring boot competitive tests
Spring competitive tests
Spring competitive tests
Spring boot competitive tests
What's New in AppFuse 2.0
Tomcat Maven Plugin
Automated Deployment with Maven - going the whole nine yards

What's hot (20)

PDF
Maven tutorial for beginners
PPTX
Apache Maven for SoftServe IT Academy
PDF
Migrating to Java 9 Modules
PPTX
Maven 2 Introduction
PPTX
Log management (elk) for spring boot application
PPTX
PPTX
Version Management in Maven
PDF
Apache Maven In 10 Slides
PDF
Build Automation using Maven
PPTX
An Introduction to Maven
PPTX
PPTX
Apache Maven
PPTX
Continuous Deployment Pipeline with maven
PPTX
Spring boot
PDF
Introduction to Apache Maven
PPT
Maven 2 features
ODP
Springboot and camel
ODP
An Introduction to Maven Part 1
PPTX
Django simplified : by weever mbakaya
Maven tutorial for beginners
Apache Maven for SoftServe IT Academy
Migrating to Java 9 Modules
Maven 2 Introduction
Log management (elk) for spring boot application
Version Management in Maven
Apache Maven In 10 Slides
Build Automation using Maven
An Introduction to Maven
Apache Maven
Continuous Deployment Pipeline with maven
Spring boot
Introduction to Apache Maven
Maven 2 features
Springboot and camel
An Introduction to Maven Part 1
Django simplified : by weever mbakaya
Ad

Similar to Keeping up with Java made easy with Apache Maven (Devoxx 2018) (20)

PDF
GlassFish Embedded API
PPTX
Apache Maven supports all Java (JokerConf 2018)
PDF
Migrate Early, Migrate Often: JDK release cadence strategies
PPTX
How we took our server side application to the cloud and liked what we got
PPTX
Springboot2 postgresql-jpa-hibernate-crud-example with test
PPTX
Apache Maven supports ALL Java JEEConf 2019
PPTX
[JOI] TOTVS Developers Joinville - Java #1
PPTX
How we took our server side application to the cloud and liked what we got
PPTX
Follow these reasons to know java’s importance
PPTX
An introduction to Java 9 & Its Features
PDF
DevNexus 2019: Migrating to Java 11
PPTX
Springboot2 postgresql-jpa-hibernate-crud-example
PDF
Seven Simple Reasons to Use AppFuse
PPTX
Apache Maven supports ALL Java (Javaland 2019)
PDF
Declaring Server App Components in Pure Java
PPSX
Java 9 and the impact on Maven Projects (JavaOne 2016)
ODP
GlassFish and JavaEE, Today and Future
PPTX
Migration from Java EE to JakartaEE 10 - Challenges & Opportunities
PPTX
Java and OpenJDK: disecting the ecosystem
PDF
PDF JavaServer Pages 2nd Edition Larne Pekowsky download
GlassFish Embedded API
Apache Maven supports all Java (JokerConf 2018)
Migrate Early, Migrate Often: JDK release cadence strategies
How we took our server side application to the cloud and liked what we got
Springboot2 postgresql-jpa-hibernate-crud-example with test
Apache Maven supports ALL Java JEEConf 2019
[JOI] TOTVS Developers Joinville - Java #1
How we took our server side application to the cloud and liked what we got
Follow these reasons to know java’s importance
An introduction to Java 9 & Its Features
DevNexus 2019: Migrating to Java 11
Springboot2 postgresql-jpa-hibernate-crud-example
Seven Simple Reasons to Use AppFuse
Apache Maven supports ALL Java (Javaland 2019)
Declaring Server App Components in Pure Java
Java 9 and the impact on Maven Projects (JavaOne 2016)
GlassFish and JavaEE, Today and Future
Migration from Java EE to JakartaEE 10 - Challenges & Opportunities
Java and OpenJDK: disecting the ecosystem
PDF JavaServer Pages 2nd Edition Larne Pekowsky download
Ad

More from Robert Scholte (6)

PPTX
Broken Buildtools and Bad Habits (Oracle Code One 2019)
PPTX
The do's and don'ts with java 9 (Devoxx 2017)
PPTX
Apache maven and its impact on java 9 (Java One 2017)
PPSX
Java 9 and the impact on Maven Projects (ApacheCon Europe 2016)
PPSX
Java 9 and the impact on Maven Projects (Devoxx 2016)
PPSX
Java9 and the impact on Maven Projects (JFall 2016)
Broken Buildtools and Bad Habits (Oracle Code One 2019)
The do's and don'ts with java 9 (Devoxx 2017)
Apache maven and its impact on java 9 (Java One 2017)
Java 9 and the impact on Maven Projects (ApacheCon Europe 2016)
Java 9 and the impact on Maven Projects (Devoxx 2016)
Java9 and the impact on Maven Projects (JFall 2016)

Recently uploaded (20)

PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Empathic Computing: Creating Shared Understanding
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Electronic commerce courselecture one. Pdf
PDF
KodekX | Application Modernization Development
PDF
cuic standard and advanced reporting.pdf
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PPTX
A Presentation on Artificial Intelligence
PDF
Modernizing your data center with Dell and AMD
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Machine learning based COVID-19 study performance prediction
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
NewMind AI Weekly Chronicles - August'25 Week I
Spectral efficient network and resource selection model in 5G networks
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Empathic Computing: Creating Shared Understanding
Advanced methodologies resolving dimensionality complications for autism neur...
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Encapsulation_ Review paper, used for researhc scholars
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Electronic commerce courselecture one. Pdf
KodekX | Application Modernization Development
cuic standard and advanced reporting.pdf
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
A Presentation on Artificial Intelligence
Modernizing your data center with Dell and AMD
Understanding_Digital_Forensics_Presentation.pptx
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Dropbox Q2 2025 Financial Results & Investor Presentation
Machine learning based COVID-19 study performance prediction

Keeping up with Java made easy with Apache Maven (Devoxx 2018)

  • 1. Keeping up with Java made easy with Apache Maven ROBERT SCHOLTE @RFSCHOLTE / @ASFMAVENPROJECT
  • 2. Moving Java Forward Faster (2017/09/06) Proposal Taking inspiration from the release models used by other platforms and by various operating-system distributions, I propose that after Java 9 we adopt a strict, time-based model with a new feature release every six months, update releases every quarter, and a long- term support release every three years. Source: https://mreinhold.org/blog/forward-faster#Proposal
  • 4. Feature driven schedule 20192006 2008 2010 2012 2014 2016 2018 Java 6 December 2006 Java 7 July 2011 Java 8 March 2014 Java 9 September 2017
  • 5. Time driven schedule 20212018 2019 2020 2021 Java 10 March 2018 Java 11 September 2018 Java 12 March 2019 Java 13 September 2019 Java 14 March 2020 Java 15 September 2020 Java 16 March 2021
  • 6. Is there really an issue? Let’s see…
  • 7. 3 6 6 6 7 JAVA 8 JAVA 9 JAVA 10 JAVA 11 JAVA 12 Java support Classes Sources
  • 8. Maven runtime versus toolchains ❖ JAVA_HOME is used for the Maven runtime ❖ For ease, JAVA_HOME is the default JDK ❖ With Maven Toolchains some plugins can get an explicit JDK ❖ Most reliable setup: toolchain
  • 9. #RunsFineOnJDK9 #WorksLikeHeavenOnJDK11 ❖ For Maven: YES! ❖ For the plugins: it depends… (most are fine!)
  • 10. Sourcecode parser QDox: ❖ reads model up to method signatures ❖ is less critical due to close to no language changes at this level
  • 11. Bytecode parser ASM: ❖ reads entire class, must know bytecode version ❖ is very critical, will now be updated every 6 months
  • 12. 20182014 2015 2016 2017 2018 Java 9-ea 8 Apr '14 Java 9 22 Sep '17 Java 10 20 Mar '18 Java 11 25 Sep '18 Jigsaw ea 3 Nov '14 Releases of Java after 2014
  • 13. Java 9 / Jigsaw early access ❖ Jigsaw team ❖ Java community ❖ Maven team
  • 14. 2018 Today 2014 2015 2016 2017 2018 Java 9-ea 8 Apr '14 Jigsaw ea 3 Nov '14 Java 9 22 Sep '17 Java 10 20 Mar '18 Java 11 25 Sep '18 Maven Compiler Plugin 3.6.0 26 Oct '16 Maven Compiler Plugin 3.6.1 13 Jan '17 Maven Compiler Plugin 3.6.2 26 Jul '17 Maven Compiler Plugin 3.7.0 1 Sep '17 Maven Compiler Plugin 3.8.0 26 Jul '18 Releases of Maven Compiler Plugin
  • 15. Maven Compiler Plugin 3.5.1 <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.5.1</version> <configuration> <compilerArgs> <arg>-verbose</arg> <arg>-Xlint:all,-options,-path</arg> </compilerArgs> </configuration> </plugin>
  • 16. Maven Compiler Plugin 3.6.x First implementations of module path support for early adopters Requirements: ❖ No changes to the pom.xml ❖ (Close to) no extra configuration for developers Dependencies: ❖ ASM 6.0_ALPHA ❖ QDox 2.0-M6
  • 17. Java 9 / Maven Compiler Plugin 3.7.0 Module Resolution moved to Plexus::Java Dependencies: ❖ ASM 6.0_BETA ❖ QDox 2.0-M7
  • 18. Plexus::Java Maven independent library for general Java features ❖LocationManager ❖JavaVersion Used by ❖maven-compiler-plugin ❖maven-javadoc-plugin ❖maven-jlink-plugin ❖maven-jmod-plugin ❖maven-surefire-plugin / maven-failsafe-plugin ❖…
  • 19. 2018Sep Nov 2018 Mar May Jul Sep Java 9 22 Sep '17 Java 10 20 Mar '18 Java 11 25 Sep '18 Maven Compiler Plugin 3.7.0 1 Sep '17 Maven Compiler Plugin 3.8.0 26 Jul '18 Releases of Maven Compiler Plugin
  • 20. Java 10 / Maven Compiler Plugin ??? https://stackoverflow.com/questions/49398894/unable-to-compile-simple-java- 10-java-11-project-with-maven Conclusion: no blocking issue
  • 21. Updating ASM dependency This implies: updating to latest asm-6.x dependency is possible, but not to asm-7.x Updating plugin dependencies already possible since Maven 2 ClassReader reader = new ClassReader( in ); reader.accept( new ClassVisitor( Opcodes.ASM6 ) { … } );
  • 22. 2018Sep Nov 2018 Mar May Jul Sep Java 9 22 Sep '17 Java 10 20 Mar '18 Java 11 25 Sep '18 Maven Compiler Plugin 3.7.0 1 Sep '17 Maven Compiler Plugin 3.8.0 26 Jul '18 Releases of Maven Compiler Plugin
  • 23. Java 11-ea / Maven Compiler Plugin 3.8.0 ❖Reduce need for ASM ❖Use java.lang.module.ModuleDescriptor#read(InputStream)
  • 24. Will Maven run on future JDK releases? Yes, most likely Even Apache Maven 3.0 (released 4 oct 2010) runs on 12-ea Any issues are plugin related
  • 25. Is it always forward compatible? Yes in case of modulepath resolution No for class analyzers (depend on ASM): ❖maven-dependency-plugin (analyze) ❖maven-plugin-plugin (descriptor) ❖maven-pmd-plugin (pmd) ❖maven-shade-plugin (minifyJar)
  • 26. How do we test? https://builds.apache.org/job/maven-box/
  • 27. Conclusion Java Release Train reveals critical chain of dependencies A few plugins might not work right after a new Java release Depending on the problem: ❖ Update related plugin dependency in your own project ❖ Patch plugin code (please create PR to help each other)
  • 29. Up-for-grabs ~60-80% of Java Project/Developers use Maven The Apache Maven Project holds ~100 (sub)projects Maintained by ~5-10 active volunteers (No Company!) Let’s restore the balance! https://s.apache.org/up-for-grabs_maven https://maven.apache.org/guides/development/guide-committer-school.html
  • 30. 20:00-21:00 BOF1 Apache Maven BOF Robert Scholte Karl Heinz Marbaise Hervé Boutemy
  • 31. Thank you 20:00-21:00 BOF1 Apache Maven BOF Robert Scholte Karl Heinz Marbaise Hervé Boutemy