Skip to content

Latest commit

 

History

57 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jig

Maven Central JDK 25+

jig provides module version resolution, compilation and assembly for the Java Module System. It resolves source modules, local binaries and artifacts published to Maven repositories together, then produces the standard module system arguments accepted by javac, java, javadoc, jlink and other tools. The same module graph and compilation work can be reused across tools.

The same module model extends to Maven repositories. Existing artifacts can be located by Java module name, while modules can be installed or published with consumer POMs generated from their descriptors. A repository proxy makes the module namespace available to ordinary Maven clients.

Source modules are provided metadata that isn't supported by the source module descriptor with Javadoc tags and version comments on requires directives:

/**
 * @mainClass com.example.application.Main
 */
module com.example.application {
    requires com.example.framework; // @1.2.3
}

ja uses jig for module resolution, compilation, assembly and publishing. Prefer ja for module development tasks, using jig directly to bring the same module model to another tool or build.

Important

This tool is currently in preview. We are collecting feedback for all of the tools together in Discussions.

Installation

Note

Netflix engineers should use the internally bundled toolchain rather than installing this tool separately.

Follow the ja Installation Guide to install the bundled tools, including jig.

For standalone use, jar and jmod artifacts for the tool are available on Maven Central.

Quick start

Look up a Maven artifact's module name

jig --lookup-module \
  pkg:maven/org.junit.platform/junit-platform-console@6.1.3
org.junit.platform.console

List a module's available versions

jig --list-module-versions org.junit.platform.console
...
6.1.0
6.1.1
6.1.2
6.1.3

Run a published module

Resolve the JUnit Platform Console Launcher by module name and write its java arguments to a file:

jig --add-requires org.junit.platform.console@6.1.3 \
  --resolve-options module-path,module \
  --write-argfile junit.args

java @junit.args --help
Usage: junit [OPTIONS] COMMAND
Launches the JUnit Platform for test discovery and execution.

Documentation

The wiki covers:

Use jig --help for the complete option reference.

About

Java Module System version resolution, proxy and deployment tool

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages