Skip to content
This repository has been archived by the owner on Nov 22, 2022. It is now read-only.

Add CLI app using Java Modules -- requires Java 11 #45

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

msgilligan
Copy link

Add a CLI app example using Java Modules

Use the org.javamodularity.moduleplugin Gradle plugin (which requires Java 11)

Does not work with Micronaut 1.1.0:

./gradlew clean run

> Configure project :
Found module name 'cli.app.modular.java'

> Task :compileJava FAILED
error: the unnamed module reads package javax.annotation from both java.annotation and jsr305
error: module io.micronaut.configuration.picocli reads package javax.annotation from both java.annotation and jsr305
error: module io.micronaut.validation reads package javax.annotation from both java.annotation and jsr305
error: module io.micronaut.http reads package javax.annotation from both java.annotation and jsr305
error: module io.micronaut.aop reads package javax.annotation from both java.annotation and jsr305
error: module io.micronaut.core reads package javax.annotation from both java.annotation and jsr305
error: module slf4j.api reads package javax.annotation from both java.annotation and jsr305
error: module java.validation reads package javax.annotation from both java.annotation and jsr305
error: module com.fasterxml.jackson.datatype.jdk8 reads package javax.annotation from both java.annotation and jsr305
error: module com.fasterxml.jackson.datatype.jsr310 reads package javax.annotation from both java.annotation and jsr305
error: module com.fasterxml.jackson.databind reads package javax.annotation from both java.annotation and jsr305
error: module io.reactivex.rxjava2 reads package javax.annotation from both java.annotation and jsr305
error: module java.annotation reads package javax.annotation from both java.annotation and jsr305
error: module javax.inject reads package javax.annotation from both java.annotation and jsr305
error: module snakeyaml reads package javax.annotation from both java.annotation and jsr305
error: module com.fasterxml.jackson.annotation reads package javax.annotation from both java.annotation and jsr305
error: module com.fasterxml.jackson.core reads package javax.annotation from both java.annotation and jsr305
error: module org.reactivestreams reads package javax.annotation from both java.annotation and jsr305
error: module jsr305 reads package javax.annotation from both java.annotation and jsr305
error: module io.micronaut.inject reads package javax.annotation from both java.annotation and jsr305
error: module info.picocli reads package javax.annotation from both java.annotation and jsr305
error: module io.micronaut.runtime reads package javax.annotation from both java.annotation and jsr305
/Users/sean/git/micronaut-examples/cli-app-modular-java/src/main/java/module-info.java:1: error: module cli.app.modular.java reads package javax.annotation from both java.annotation and jsr305
module cli.app.modular.java {
^
23 errors

msgilligan added 3 commits May 6, 2019 10:47
You should now be getting:
error: the unnamed module reads package javax.annotation from both jsr305 and java.annotation
@CLAassistant
Copy link

CLAassistant commented May 6, 2019

CLA assistant check
All committers have signed the CLA.

Note: There are still some conflicts between shadow plugin and
module plugin and between picocli and application plugin run task.
@msgilligan
Copy link
Author

ee2b20c fixes the split package problem.

Note: There are still some conflicts between shadow plugin and
module plugin and between picocli and application plugin run task.

@msgilligan msgilligan changed the title Add CLI app using Java Modules -- requires Java 11, doesn't work with Micronaut 1.1.0 Add CLI app using Java Modules -- requires Java 11 May 6, 2019
@benmccann
Copy link

It might be considered to remove the shadow plugin: #9

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants