[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-4330?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17370640#comment-17370640
 ] 

Christopher Tubbs commented on ZOOKEEPER-4330:
----------------------------------------------

See related instructions for jar sealing: 
https://docs.oracle.com/javase/tutorial/deployment/jar/sealman.html
This can be accomplished in Maven with the maven-jar-plugin. Example:
https://github.com/apache/accumulo/blob/8a636a3ba91f5dae1d8b09b095178889a7d79c1d/pom.xml#L761-L772

Using jar sealing won't fix the problem (the fix is to relocate the classes to 
a unique package for the jar), but it can help enforce it. An integration test 
(using maven-failsafe-plugin, after the 'package' phase of the build, after the 
jars are created) that requires loading classes from one of the sealed packages 
will catch sealing violations during the build process, without requiring the 
use of any Java modules.


> Unable to run solrj in module path because zookeeper and zookeeper-jute 
> export same packages
> --------------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-4330
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-4330
>             Project: ZooKeeper
>          Issue Type: Bug
>    Affects Versions: 3.6.2
>            Reporter: Christian Beikov
>            Priority: Critical
>
> I guess this affects all versions, but I just checked 3.6.2 and this is a 
> problem. SolrJ depends on the zookeeper and zookeeper-jute artifacts which 
> both export the packages:
>  * {{org.apache.zookeeper.server.persistence}}
>  * {{org.apache.zookeeper.server.quorum}}
> It is not possible to run in module mode with this split package problem. The 
> zookeeper-jute artifact should use different packages e.g. 
>  * {{org.apache.zookeeper.jute.persistence}}
>  * {{org.apache.zookeeper.jute.quorum}}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to