From notifications-return-14421-archive-asf-public=cust-asf.ponee.io@groovy.apache.org Mon Oct 29 00:46:05 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 071B718077A for ; Mon, 29 Oct 2018 00:46:04 +0100 (CET) Received: (qmail 80129 invoked by uid 500); 28 Oct 2018 23:46:04 -0000 Mailing-List: contact notifications-help@groovy.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@groovy.apache.org Delivered-To: mailing list notifications@groovy.apache.org Received: (qmail 80118 invoked by uid 99); 28 Oct 2018 23:46:04 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 28 Oct 2018 23:46:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 9E52118E88F for ; Sun, 28 Oct 2018 23:46:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.501 X-Spam-Level: X-Spam-Status: No, score=-109.501 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id Vt5RtHvj3uOT for ; Sun, 28 Oct 2018 23:46:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id A10225F125 for ; Sun, 28 Oct 2018 23:46:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id A04C4E13DA for ; Sun, 28 Oct 2018 23:46:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 3622D27762 for ; Sun, 28 Oct 2018 23:46:00 +0000 (UTC) Date: Sun, 28 Oct 2018 23:46:00 +0000 (UTC) From: "Paul King (JIRA)" To: notifications@groovy.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (GROOVY-8860) Use of @Grab to get spock-core library v1.2 for groovy v2.5 causes an exception MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/GROOVY-8860?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D166= 66603#comment-16666603 ]=20 Paul King commented on GROOVY-8860: ----------------------------------- You could get the same behavior with earlier versions of Spock but it was l= ess common when using for instance groovyConsole since the console didn't u= se the all jar but Spock had the all jar as it's dependency. The all jar in= Groovy 2.5+ has been phased out due to JDK9+ modules (JPMS). So Spock now = depends on several jars and the error will be more common. As an alternative to @GrabExclude, you can try this: {code} @Grab('org.spockframework:spock-core:1.2-groovy-2.5;transitive=3Dfalse') class TestX extends spock.lang.Specification { def 'test method'() { expect: 1 + 1 =3D=3D 2 } } {code} > Use of @Grab to get spock-core library v1.2 for groovy v2.5 causes an exc= eption > -------------------------------------------------------------------------= ------ > > Key: GROOVY-8860 > URL: https://issues.apache.org/jira/browse/GROOVY-8860 > Project: Groovy > Issue Type: Bug > Components: groovy-runtime > Affects Versions: 2.5.3 > Environment: openjdk version "1.8.0_181" > OpenJDK Runtime Environment (Zulu 8.31.0.1-macosx) (build 1.8.0_181-b02) > OpenJDK 64-Bit Server VM (Zulu 8.31.0.1-macosx) (build 25.181-b02, mixed = mode) > Groovy Version: 2.5.3 JVM: 1.8.0_181 Vendor: Azul Systems, Inc. OS: Mac O= S X > Mac 10.13.6 (Darwin Kernel Version 17.7.0) > Reporter: Venkatesh-Prasad Ranganath > Priority: Major > > The use of @Grapes/@Grab to get spock-core libraries v1.2 for Groovy v2.5= causes an exception due to version mismatch of groovy-nio module. > =20 > Execute the following script with groovy: > {code} > @Grab('org.spockframework:spock-core:1.2-groovy-2.5') > class TestX extends spock.lang.Specification { > =C2=A0 def 'test method'() { > } > } > {code} > 2. Observe the following output: > {{org.codehaus.groovy.control.MultipleCompilationErrorsException: startup= failed:}} > \{{ General error during conversion: Conflicting module versions. Module= [groovy-nio is loaded in version 2.5.3 and you are trying to load version = 2.5.2}}{{groovy.lang.GroovyRuntimeException: Conflicting module versions. M= odule [groovy-nio is loaded in version 2.5.3 and you are trying to load ver= sion 2.5.2}} > \{{ =C2=A0=C2=A0 =C2=A0at org.codehaus.groovy.runtime.metaclass.MetaClas= sRegistryImpl$DefaultModuleListener.onModule(MetaClassRegistryImpl.java:523= )}} > \{{ =C2=A0=C2=A0 =C2=A0at org.codehaus.groovy.runtime.m12n.ExtensionModu= leScanner.scanExtensionModuleFromProperties(ExtensionModuleScanner.java:87)= }} > \{{ =C2=A0=C2=A0 =C2=A0at org.codehaus.groovy.runtime.metaclass.MetaClas= sRegistryImpl.registerExtensionModuleFromProperties(MetaClassRegistryImpl.j= ava:169)}} > \{{ =C2=A0=C2=A0 =C2=A0at groovy.grape.GrapeIvy.processCategoryMethods(G= rapeIvy.groovy:342)}} > \{{ =C2=A0=C2=A0 =C2=A0at groovy.grape.GrapeIvy.grab(GrapeIvy.groovy:285= )}} > \{{ =C2=A0=C2=A0 =C2=A0at groovy.grape.Grape.grab(Grape.java:165)}} > \{{ =C2=A0=C2=A0 =C2=A0at groovy.grape.GrabAnnotationTransformation.visi= t(GrabAnnotationTransformation.java:376)}} > \{{ =C2=A0=C2=A0 =C2=A0at org.codehaus.groovy.transform.ASTTransformatio= nVisitor$3.call(ASTTransformationVisitor.java:320)}} > \{{ =C2=A0=C2=A0 =C2=A0at org.codehaus.groovy.control.CompilationUnit.ap= plyToSourceUnits(CompilationUnit.java:976)}} > \{{ =C2=A0=C2=A0 =C2=A0at org.codehaus.groovy.control.CompilationUnit.do= PhaseOperation(CompilationUnit.java:651)}} > \{{ =C2=A0=C2=A0 =C2=A0at org.codehaus.groovy.control.CompilationUnit.pr= ocessPhaseOperations(CompilationUnit.java:627)}} > \{{ =C2=A0=C2=A0 =C2=A0at org.codehaus.groovy.control.CompilationUnit.co= mpile(CompilationUnit.java:604)}} > \{{ =C2=A0=C2=A0 =C2=A0at groovy.lang.GroovyClassLoader.doParseClass(Gro= ovyClassLoader.java:354)}} > \{{ =C2=A0=C2=A0 =C2=A0at groovy.lang.GroovyClassLoader.access$300(Groov= yClassLoader.java:87)}} > \{{ =C2=A0=C2=A0 =C2=A0at groovy.lang.GroovyClassLoader$5.provide(Groovy= ClassLoader.java:323)}} > \{{ =C2=A0=C2=A0 =C2=A0at groovy.lang.GroovyClassLoader$5.provide(Groovy= ClassLoader.java:320)}} > \{{ =C2=A0=C2=A0 =C2=A0at org.codehaus.groovy.runtime.memoize.Concurrent= CommonCache.getAndPut(ConcurrentCommonCache.java:147)}} > \{{ =C2=A0=C2=A0 =C2=A0at groovy.lang.GroovyClassLoader.parseClass(Groov= yClassLoader.java:318)}} > \{{ =C2=A0=C2=A0 =C2=A0at groovy.lang.GroovyShell.parseClass(GroovyShell= .java:543)}} > \{{ =C2=A0=C2=A0 =C2=A0at groovy.lang.GroovyShell.run(GroovyShell.java:3= 72)}} > \{{ =C2=A0=C2=A0 =C2=A0at groovy.lang.GroovyShell.run(GroovyShell.java:3= 62)}} > \{{ =C2=A0=C2=A0 =C2=A0at groovy.ui.GroovyMain.processOnce(GroovyMain.ja= va:588)}} > \{{ =C2=A0=C2=A0 =C2=A0at groovy.ui.GroovyMain.run(GroovyMain.java:332)}= } > \{{ =C2=A0=C2=A0 =C2=A0at groovy.ui.GroovyMain.access$1400(GroovyMain.ja= va:69)}} > \{{ =C2=A0=C2=A0 =C2=A0at groovy.ui.GroovyMain$GroovyCommand.process(Gro= ovyMain.java:291)}} > \{{ =C2=A0=C2=A0 =C2=A0at groovy.ui.GroovyMain.processArgs(GroovyMain.ja= va:134)}} > \{{ =C2=A0=C2=A0 =C2=A0at groovy.ui.GroovyMain.main(GroovyMain.java:116)= }} > \{{ =C2=A0=C2=A0 =C2=A0at sun.reflect.NativeMethodAccessorImpl.invoke0(N= ative Method)}} > \{{ =C2=A0=C2=A0 =C2=A0at sun.reflect.NativeMethodAccessorImpl.invoke(Na= tiveMethodAccessorImpl.java:62)}} > \{{ =C2=A0=C2=A0 =C2=A0at sun.reflect.DelegatingMethodAccessorImpl.invok= e(DelegatingMethodAccessorImpl.java:43)}} > \{{ =C2=A0=C2=A0 =C2=A0at java.lang.reflect.Method.invoke(Method.java:49= 8)}} > \{{ =C2=A0=C2=A0 =C2=A0at org.codehaus.groovy.tools.GroovyStarter.rootLo= ader(GroovyStarter.java:110)}} > \{{ =C2=A0=C2=A0 =C2=A0at org.codehaus.groovy.tools.GroovyStarter.main(G= roovyStarter.java:128)}} > {{1 error}} > =C2=A0 > Since I am not sure if this is a Groovy or Spock issue, I have reported t= he same issue to Spock ([https://github.com/spockframework/spock/issues/943= ]) -- This message was sent by Atlassian JIRA (v7.6.3#76005)