Hello.

I'm experimenting with modularizing an existing plugin (japicmp [0])
and am running into hundreds of errors of the form:

[ERROR] the unnamed module reads package org.apache.maven.plugin from both 
maven.plugin.api and maven.core
[ERROR] the unnamed module reads package org.apache.maven.artifact from both 
maven.artifact and maven.core
[ERROR] the unnamed module reads package org.apache.maven.artifact.resolver 
from both maven.artifact and maven.core
[ERROR] the unnamed module reads package 
org.apache.maven.artifact.resolver.filter from both maven.artifact and 
maven.core
[ERROR] the unnamed module reads package org.apache.maven.artifact.repository 
from both maven.artifact and maven.core
[ERROR] the unnamed module reads package 
org.apache.maven.artifact.repository.metadata from both maven.artifact and 
maven.core
[ERROR] the unnamed module reads package 
org.apache.maven.artifact.repository.layout from both maven.artifact and 
maven.core
[ERROR] the unnamed module reads package org.apache.maven.artifact.metadata 
from both maven.artifact and maven.core
[ERROR] the unnamed module reads package org.apache.maven.artifact.handler from 
both maven.artifact and maven.core
[ERROR] the unnamed module reads package 
org.apache.maven.artifact.handler.manager from both maven.artifact and 
maven.core
[ERROR] the unnamed module reads package org.apache.maven.artifact.factory from 
both maven.artifact and maven.core
[ERROR] module maven.plugin.annotations reads package org.apache.maven.plugin 
from both maven.plugin.api and maven.core
[ERROR] module maven.plugin.annotations reads package org.apache.maven.artifact 
from both maven.artifact and maven.core
[ERROR] module maven.plugin.annotations reads package 
org.apache.maven.artifact.resolver from both maven.artifact and maven.core
[ERROR] module maven.plugin.annotations reads package 
org.apache.maven.artifact.resolver.filter from both maven.artifact and 
maven.core
[ERROR] module maven.plugin.annotations reads package 
org.apache.maven.artifact.repository from both maven.artifact and maven.core
[ERROR] module maven.plugin.annotations reads package 
org.apache.maven.artifact.repository.metadata from both maven.artifact and 
maven.core
[ERROR] module maven.plugin.annotations reads package 
org.apache.maven.artifact.repository.layout from both maven.artifact and 
maven.core
[ERROR] module maven.plugin.annotations reads package 
org.apache.maven.artifact.metadata from both maven.artifact and maven.core
[ERROR] module maven.plugin.annotations reads package 
org.apache.maven.artifact.handler from both maven.artifact and maven.core
[ERROR] module maven.plugin.annotations reads package 
org.apache.maven.artifact.handler.manager from both maven.artifact and 
maven.core
[ERROR] module maven.plugin.annotations reads package 
org.apache.maven.artifact.factory from both maven.artifact and maven.core
[ERROR] module maven.plugin.api reads package org.apache.maven.plugin from both 
maven.plugin.api and maven.core
[ERROR] module maven.plugin.api reads package org.apache.maven.artifact from 
both maven.artifact and maven.core
[ERROR] module maven.plugin.api reads package 
org.apache.maven.artifact.resolver from both maven.artifact and maven.core
[ERROR] module maven.plugin.api reads package 
org.apache.maven.artifact.resolver.filter from both maven.artifact and 
maven.core
[ERROR] module maven.plugin.api reads package 
org.apache.maven.artifact.repository from both maven.artifact and maven.core
[ERROR] module maven.plugin.api reads package 
org.apache.maven.artifact.repository.metadata from both maven.artifact and 
maven.core
[ERROR] module maven.plugin.api reads package 
org.apache.maven.artifact.repository.layout from both maven.artifact and 
maven.core
[ERROR] module maven.plugin.api reads package 
org.apache.maven.artifact.metadata from both maven.artifact and maven.core
[ERROR] module maven.plugin.api reads package org.apache.maven.artifact.handler 
from both maven.artifact and maven.core
[ERROR] module maven.plugin.api reads package 
org.apache.maven.artifact.handler.manager from both maven.artifact and 
maven.core
[ERROR] module maven.plugin.api reads package org.apache.maven.artifact.factory 
from both maven.artifact and maven.core
[ERROR] module maven.artifact reads package org.apache.maven.plugin from both 
maven.plugin.api and maven.core
[ERROR] module maven.artifact reads package org.apache.maven.artifact from both 
maven.artifact and maven.core
[ERROR] module maven.artifact reads package org.apache.maven.artifact.resolver 
from both maven.artifact and maven.core
[ERROR] module maven.artifact reads package 
org.apache.maven.artifact.resolver.filter from both maven.artifact and 
maven.core
[ERROR] module maven.artifact reads package 
org.apache.maven.artifact.repository from both maven.artifact and maven.core
[ERROR] module maven.artifact reads package 
org.apache.maven.artifact.repository.metadata from both maven.artifact and 
maven.core
[ERROR] module maven.artifact reads package 
org.apache.maven.artifact.repository.layout from both maven.artifact and 
maven.core
[ERROR] module maven.artifact reads package org.apache.maven.artifact.metadata 
from both maven.artifact and maven.core
[ERROR] module maven.artifact reads package org.apache.maven.artifact.handler 
from both maven.artifact and maven.core
[ERROR] module maven.artifact reads package 
org.apache.maven.artifact.handler.manager from both maven.artifact and 
maven.core
[ERROR] module maven.artifact reads package org.apache.maven.artifact.factory 
from both maven.artifact and maven.core
[ERROR] module com.google.common reads package org.apache.maven.plugin from 
both maven.plugin.api and maven.core
[ERROR] module com.google.common reads package org.apache.maven.artifact from 
both maven.artifact and maven.core
[ERROR] module com.google.common reads package 
org.apache.maven.artifact.resolver from both maven.artifact and maven.core
[ERROR] module com.google.common reads package 
org.apache.maven.artifact.resolver.filter from both maven.artifact and 
maven.core
[ERROR] module com.google.common reads package 
org.apache.maven.artifact.repository from both maven.artifact and maven.core
[ERROR] module com.google.common reads package 
org.apache.maven.artifact.repository.metadata from both maven.artifact and 
maven.core
[ERROR] module com.google.common reads package 
org.apache.maven.artifact.repository.layout from both maven.artifact and 
maven.core
[ERROR] module com.google.common reads package 
org.apache.maven.artifact.metadata from both maven.artifact and maven.core
[ERROR] module com.google.common reads package 
org.apache.maven.artifact.handler from both maven.artifact and maven.core
[ERROR] module com.google.common reads package 
org.apache.maven.artifact.handler.manager from both maven.artifact and 
maven.core
[ERROR] module com.google.common reads package 
org.apache.maven.artifact.factory from both maven.artifact and maven.core

This looks to be a case of split packages amongst all of the various
Maven artifacts. I'm adding dependency exclusions to try to work around
the issues, but I'm not confident that'll actually work.

Are there efforts underway to clean this stuff up?

The reason I'm modularizing the plugin is due to this:

  "To build and run japicmp under Java 1.9, you must add the following module: 
java.xml.bind. This can be done for the maven plugin for example by:

export MAVEN_OPTS="--add-modules java.xml.bind"

I'd rather not have to do this as I'm committed to having all of my
project builds run without needing extra Maven flags: "mvn clean install"
*must* just work on every system, no exceptions.

Am I undertaking a fool's errand trying to get this stuff to work cleanly?
If not, is there any documentation on modularizing existing plugins?

[0] https://github.com/siom79/japicmp/

-- 
Mark Raynsford | http://www.io7m.com

Attachment: pgp_PxSu3QvkH.pgp
Description: OpenPGP digital signature

Reply via email to