Project Jigsaw vs Maven

justAbit picture justAbit · Oct 4, 2016 · Viewed 9.3k times · Source

From Jigsaw Project:

Make it easier for developers to construct and maintain libraries and large applications, for both the Java SE and EE Platforms.

I'm trying to learn what project Jigsaw is and till now it seems that the goal of Project Jigsaw somewhat overlaps with what we did using Maven (or Gradle) dependency management:

  • Is it a threat to build tools like Maven?
  • Or my understanding is wrong and project Jigsaw is going to complement these build tools in some way?

Answer

michaldo picture michaldo · Oct 4, 2016

Very simplified answer

After Jigsaw, public will be public only within the JAR scope. To see the class outside the JAR it must be exported.

Java will force modularization because any inter module interaction will have to be specified in the module-info file.

For example, if you produce a WAR it will remain almost unchanged but all JARs packages in the WAR must define a module-info (or not define it and be treated as automatic or unnamed modules).

Maven has 2 main features: dependency management and building:

  • Dependency management means Maven can determine versions of libraries and download them from repositiories.
  • Building means Maven can compile code and package it into artifacts.

To conclude: Maven will still be responsible for building, but one must learn how to compile and package using Jigsaw modules.