9 Migration and modularization strategies

 

This chapter covers:

  • preparing and estimating a migration to Java 9 and beyond
  • continually integrating your changes on the way to Java 9
  • incrementally modularizing projects bottom-up, top-down, or inside-out
  • generating module declarations with JDeps
  • hacking third-party JARs with the jar tool
  • publishing modular JARs for Java 8 and older
Navigation

Chapters 6, 7, and 8 discuss all the technical details behind migrating to Java 9 and turning an existing code base into a modular one. This chapter takes a broader view and looks at how to best compose these details into successful migration and modularization efforts.

  • how to perform a gradual migration that cooperates well with your development process, particularly build tools and continuous integration (9.1)
  • how to use the unnamed module and automatic modules as building blocks for specific modularization strategies (9.2)
  • options for making JARs modular—yours or your dependencies' (9.3)

When you’re done with this chapter, you not only understand the mechanisms behind migration challenges and modularization features—you also know how to best employ them in your efforts.

9.1  Migration strategies

With all the knowledge you’ve gathered in chapters 6 and 7, you’re prepared for every fight Java 9 might pick with you. Now it’s time to broaden our view and develop a larger strategy. How can you arrange the bits and pieces to make the migration as thorough and predictable as possible?

9.1.1  Preparatory updates

9.1.2  Estimating the effort

9.1.3  Continuously build on Java 9

9.1.4  Thoughts on command line options

9.2  Modularization strategies

9.2.1  Bottom-up modularization—if all project dependencies are modular

9.2.2  Top-down modularization—if your application can’t wait for its dependencies

sitemap