[ https://issues.apache.org/jira/browse/MNG-7223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17406717#comment-17406717 ]
Tomas Langer commented on MNG-7223: ----------------------------------- I will create an issue in our tracker to see how to move forward. > Jansi dependency seems to be stripped from a plugin > --------------------------------------------------- > > Key: MNG-7223 > URL: https://issues.apache.org/jira/browse/MNG-7223 > Project: Maven > Issue Type: Bug > Components: Plugins and Lifecycle > Affects Versions: 3.8.2 > Environment: Mac OS-X (Darwin Kernel Version 18.7.0) > java 11.0.11 2021-04-20 LTS > Java(TM) SE Runtime Environment 18.9 (build 11.0.11+9-LTS-194) > Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.11+9-LTS-194, mixed mode) > Reporter: Tomas Langer > Priority: Major > Fix For: waiting-for-feedback > > > I have a plugin that uses jansi (dependency defined in compile scope). > This is beginning of output from mvn dependency:tree: > [INFO] > io.helidon.build-tools:helidon-services-plugin:maven-plugin:2.2.2-SNAPSHOT > [INFO] +- io.helidon.build-tools:helidon-utils:jar:2.2.2-SNAPSHOT:compile > [INFO] | +- org.fusesource.jansi:jansi:jar:1.18:compile > [INFO] | +- info.picocli:picocli-jansi-graalvm:jar:1.1.0:compile > [INFO] | +- org.apache.maven:maven-model:jar:3.6.2:compile > [INFO] | +- org.apache.maven:maven-artifact:jar:3.6.2:compile > [INFO] | \- com.github.spullara.mustache.java:compiler:jar:0.9.6:compile > Version 3.6.3 works fine. > In version 3.8.2 my plugin fails with the following message: > [ERROR] Failed to execute goal > io.helidon.build-tools:helidon-services-plugin:2.2.1:services > (generate-meta-inf-services) on project helidon-common: Execution > generate-meta-inf-services of goal > io.helidon.build-tools:helidon-services-plugin:2.2.1:services failed: A > required class was missing while executing > io.helidon.build-tools:helidon-services-plugin:2.2.1:services: > org/fusesource/jansi/AnsiOutputStream > [ERROR] ----------------------------------------------------- > [ERROR] realm = plugin>io.helidon.build-tools:helidon-services-plugin:2.2.1 > [ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy > [ERROR] urls[0] = > file:/Users/tomas/.m2/repository/io/helidon/build-tools/helidon-services-plugin/2.2.1/helidon-services-plugin-2.2.1.jar > [ERROR] urls[1] = > file:/Users/tomas/.m2/repository/io/helidon/build-tools/helidon-utils/2.2.1/helidon-utils-2.2.1.jar > [ERROR] urls[2] = > file:/Users/tomas/.m2/repository/info/picocli/picocli-jansi-graalvm/1.1.0/picocli-jansi-graalvm-1.1.0.jar > [ERROR] urls[3] = > file:/Users/tomas/.m2/repository/com/github/spullara/mustache/java/compiler/0.9.6/compiler-0.9.6.jar > [ERROR] urls[4] = > file:/Users/tomas/.m2/repository/javax/enterprise/cdi-api/2.0/cdi-api-2.0.jar > [ERROR] urls[5] = > file:/Users/tomas/.m2/repository/javax/el/javax.el-api/3.0.0/javax.el-api-3.0.0.jar > [ERROR] urls[6] = > file:/Users/tomas/.m2/repository/javax/interceptor/javax.interceptor-api/1.2/javax.interceptor-api-1.2.jar > [ERROR] urls[7] = > file:/Users/tomas/.m2/repository/org/eclipse/sisu/org.eclipse.sisu.inject/0.3.3/org.eclipse.sisu.inject-0.3.3.jar > [ERROR] urls[8] = > file:/Users/tomas/.m2/repository/org/codehaus/plexus/plexus-component-annotations/2.0.0/plexus-component-annotations-2.0.0.jar > [ERROR] urls[9] = > file:/Users/tomas/.m2/repository/org/codehaus/plexus/plexus-utils/3.3.0/plexus-utils-3.3.0.jar > [ERROR] urls[10] = > file:/Users/tomas/.m2/repository/org/sonatype/plexus/plexus-build-api/0.0.7/plexus-build-api-0.0.7.jar > [ERROR] Number of foreign imports: 1 > [ERROR] import: Entry[import from realm > ClassRealm[project>io.helidon.common:helidon-common:2.4.0-SNAPSHOT, parent: > ClassRealm[maven.api, parent: null]]] > [ERROR] > > It seems like the jansi dependency was removed by Maven and is no longer > available as part of maven classpath. > > To reproduce > * create a project with Java11+ that has a module-info.java > * configure the following plugin > <plugin> > <groupId>io.helidon.build-tools</groupId> > <artifactId>helidon-services-plugin</artifactId> > <version>2.2.1</version> > <configuration> > <mode>fail</mode> > </configuration> > <executions> > <execution> > <id>generate-meta-inf-services</id> > <phase>compile</phase> > <goals> > <goal>services</goal> > </goals> > </execution> > </executions> > </plugin> > * run mvn clean install > > When I run in debug, there is the following unusual thing: > Dependency collection clearly shows jansi: > [DEBUG] Dependency collection stats \{ConflictMarker.analyzeTime=50589, > ConflictMarker.markTime=15312, ConflictMarker.nodeCount=30, > ConflictIdSorter.graphTime=28795, ConflictIdSorter.topsortTime=11990, > ConflictIdSorter.conflictIdCount=19, ConflictIdSorter.conflictIdCycleCount=0, > ConflictResolver.totalTime=192212, ConflictResolver.conflictItemCount=28, > DefaultDependencyCollector.collectTime=38128269, > DefaultDependencyCollector.transformTime=318141} > [DEBUG] io.helidon.build-tools:helidon-services-plugin:jar:2.2.1 > [DEBUG] io.helidon.build-tools:helidon-utils:jar:2.2.1:compile > [DEBUG] org.fusesource.jansi:jansi:jar:1.18:compile (version managed from > default) > [DEBUG] info.picocli:picocli-jansi-graalvm:jar:1.1.0:compile (version managed > from default) > ... > > But class realm does not contain it: > [DEBUG] Importing foreign packages into class realm > plugin>io.helidon.build-tools:helidon-services-plugin:2.2.1 > [DEBUG] Imported: < project>me.tomas-helidon:quickstart-se:1.0-SNAPSHOT > [DEBUG] Populating class realm > plugin>io.helidon.build-tools:helidon-services-plugin:2.2.1 > [DEBUG] Included: io.helidon.build-tools:helidon-services-plugin:jar:2.2.1 > [DEBUG] Included: io.helidon.build-tools:helidon-utils:jar:2.2.1 > [DEBUG] Included: info.picocli:picocli-jansi-graalvm:jar:1.1.0 > [DEBUG] Included: com.github.spullara.mustache.java:compiler:jar:0.9.6 > [DEBUG] Included: javax.enterprise:cdi-api:jar:2.0 > [DEBUG] Included: javax.el:javax.el-api:jar:3.0.0 > [DEBUG] Included: javax.interceptor:javax.interceptor-api:jar:1.2 > [DEBUG] Included: org.eclipse.sisu:org.eclipse.sisu.inject:jar:0.3.3 > [DEBUG] Included: org.codehaus.plexus:plexus-component-annotations:jar:2.0.0 > [DEBUG] Included: org.codehaus.plexus:plexus-utils:jar:3.3.0 > [DEBUG] Included: org.sonatype.plexus:plexus-build-api:jar:0.0.7 > -- This message was sent by Atlassian Jira (v8.3.4#803005)