Using Build Tools and Testing Java Modules

In the previous chapter, we looked at several strategies and approaches to migrate an existing Java code base to Java 9. In this chapter, we'll wrap up our journey of Java 9 modularity by looking at two important topics that you are very likely to encounter, irrespective of whether you are migrating a legacy code base or creating a new modular application from scratch. They are build tool integration and unit testing.

Here's what we'll cover in this chapter:

  • Integrating Java 9 modules with the Maven build process
  • Working with a multi-module Java 9 Maven project
  • Writing unit test cases for Java 9 modules using JUnit
  • Handling new access issues and challenges with testing in Java 9

Considering that build systems and unit testing are extremely common and important parts of a modern Java developer's workflow, it may seem odd that we are tackling both these topics in the final chapter of this book. This is for a good reason. Understanding and working with these concepts requires an understanding of a lot of the topics we've covered in the last few chapters. Now that you have explored concepts such as open modules in Chapter 9, Module Design Patterns and Strategies, and automatic modules in Chapter 11, Migrating Your Code to Java 9, you are all set to tackle this chapter with ease!

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.17.174.0