An open API service indexing awesome lists of open source software.

https://github.com/consulo/java9-maven-plugin

Java 9 module-info generator
https://github.com/consulo/java9-maven-plugin

Last synced: about 1 month ago
JSON representation

Java 9 module-info generator

Awesome Lists containing this project

README

          

# Java 9 module generator - maven plugin

## About

This plugin will helps migration from Java 8 to Java 9. It will generate module-info.class file while Java 8 compilation, which will be usable while Java 9 compilation. At Java 8 file will be ignored

## Goals
* `generate-source-module-info` - generate source module info, and add it to generated source directory (**ignored if running in pre java 9 jdk**)
* `generate-source-module-info-nocheck` - generate source module info without JDK check
* `generate-binary-module-info` - generate binary module info, and add it to build directory (**ignored if running in java 9+ jdk**)
* `generate-binary-module-info-nocheck` - generate binary module info without JDK check

## Module declaration

You can declarate module in few ways.

### First
Via module-info.java file in src/main directory

```java
open module untitled {
requires transitive org.objectweb.asm;
}
```

### Second

Via plugin configuration

```xml

consulo.maven
java9-maven-plugin
1.0-SNAPSHOT
true


true
untitled


org.objectweb.asm
true



```

## Usage example

```xml

4.0.0

consulo.internal
untitled4
1.0



consulo
https://maven.consulo.io/repository/snapshots/

true
always





org.apache.maven.plugins
maven-compiler-plugin
3.7.0

1.8
1.8


consulo.maven
java9-maven-plugin
1.0-SNAPSHOT
true



java9
generate-sources

generate-source-module-info



pre-java9
process-classes

generate-binary-module-info







org.ow2.asm
asm
6.2

```