groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: Java fails because groovy modules are exporting the same package to another module
Date Wed, 01 Jul 2020 06:55:45 GMT
<div dir='auto'>Thanks Paul for your explanation.&nbsp; I now have my project working.<br><br><div
data-smartmail="gmail_signature">Kind regards, Warren Milburn</div></div><div
class="gmail_extra"><br><div class="gmail_quote">On 1 Jul 2020 06:20, Paul
King &lt;; wrote:<br type="attribution" /><blockquote
class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div
dir="ltr"><div>TL;DR version: Groovy 3 doesn&#39;t support using the multiple
Groovy jars as automatic modules. I&#39;d recommend placing them on the classpath.</div><div><br
/></div><div>More details:</div><div>Groovy prior to 3 had numerous
jars with classes having common package names, e.g. &#34;groovy.util&#34;. Groovy
3 has repackaged all such offending classes but retained deprecated original packages for
backwards compatibility. If you only use the newer versions of those classes, you could do
extra work to explicitly declare modules and export only the non-offending packages but we
don&#39;t currently do that for you. Groovy 4 has only the new package names and so will
be module friendly out of the box but no longer backwards compatible.</div><div><br
/></div><div>Cheers, Paul.</div><div><br /></div></div><br
/><div class="elided-text"><div dir="ltr">On Mon, Jun 29, 2020 at 6:13 PM Warren
Milburn &lt;<a href="mailto:warren&#64;">warren&#64;</a>&gt;
wrote:<br /></div><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px
solid rgb( 204 , 204 , 204 );padding-left:1ex"><div><div><p>I have a
multi-module project that uses maven as its build system.  I’m using Adopt OpenJDK 11.0.7
with Groovy 3.0.4 and building with Maven 3.6.3.  The other suspect in this case is the module
xml.resolver which is version 1.2.<u></u><u></u></p><p><u></u> <u></u></p><p>After
much coaxing and cajoling, the project builds but when I try to run it up, it gives this error:<u></u><u></u></p><p><u></u> <u></u></p><p><span
style="font-family:&#39;courier new&#39;">Error occurred during initialization
of boot layer<u></u><u></u></span></p><p><span
style="font-family:&#39;courier new&#39;">java.lang.module.ResolutionException:
Modules org.codehaus.groovy.test and org.codehaus.groovy.xml export package groovy.util to
module xml.resolver<u></u><u></u></span></p><p><span
style="font-family:&#39;courier new&#39;"><u></u> <u></u></span></p><p><span
style="font-family:&#39;courier new&#39;"><u></u> <u></u></span></p><p>Has
anyone come across this yet?  Or have any clues as to how I can resolve it?<u></u><u></u></p><p><u></u> <u></u></p></div></div></blockquote></div>
View raw message