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
- Host: GitHub
- URL: https://github.com/consulo/java9-maven-plugin
- Owner: consulo
- License: apache-2.0
- Created: 2018-07-16T10:27:03.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2026-03-15T10:01:39.000Z (5 months ago)
- Last Synced: 2026-03-15T22:49:23.596Z (4 months ago)
- Language: Java
- Size: 32.2 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
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
```