Uploaded image for project: 'RESTEasy'
  1. RESTEasy
  2. RESTEASY-1601

resteasy-bom: scope is not transitive

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major Major
    • None
    • 3.1.0.Final
    • jaxrs
    • Hide

      Run the following groovy script

      test.groovy
      #!/usr/bin/groovy
      @Grapes([
        @Grab(group='org.jboss.resteasy', module='resteasy-client', version='3.1.0.Final'),
      ])
      import org.jboss.resteasy.client.jaxrs.*;
      
      output.txt
      org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
      General error during conversion: Error grabbing Grapes -- [unresolved dependency: junit#junit;working@host: not found, unresolved dependency: org.jboss.spec.javax.ws.rs#jboss-jaxrs-api_2.0_spec;working@host: not found, unresolved dependency: org.jboss.spec.javax.servlet#jboss-servlet-api_3.1_spec;working@host: not found, unresolved dependency: org.jboss.spec.javax.annotation#jboss-annotations-api_1.2_spec;working@host: not found, unresolved dependency: javax.activation#activation;working@host: not found, unresolved dependency: org.apache.httpcomponents#httpclient;working@host: not found, unresolved dependency: commons-io#commons-io;working@host: not found, unresolved dependency: net.jcip#jcip-annotations;working@host: not found, unresolved dependency: org.jboss.logging#jboss-logging;working@host: not found, unresolved dependency: org.jboss.logging#jboss-logging-annotations;working@host: not found, unresolved dependency: org.jboss.logging#jboss-logging-processor;working@host: not found]
      
      java.lang.RuntimeException: Error grabbing Grapes -- [unresolved dependency: junit#junit;working@host: not found, unresolved dependency: org.jboss.spec.javax.ws.rs#jboss-jaxrs-api_2.0_spec;working@host: not found, unresolved dependency: org.jboss.spec.javax.servlet#jboss-servlet-api_3.1_spec;working@host: not found, unresolved dependency: org.jboss.spec.javax.annotation#jboss-annotations-api_1.2_spec;working@host: not found, unresolved dependency: javax.activation#activation;working@host: not found, unresolved dependency: org.apache.httpcomponents#httpclient;working@host: not found, unresolved dependency: commons-io#commons-io;working@host: not found, unresolved dependency: net.jcip#jcip-annotations;working@host: not found, unresolved dependency: org.jboss.logging#jboss-logging;working@host: not found, unresolved dependency: org.jboss.logging#jboss-logging-annotations;working@host: not found, unresolved dependency: org.jboss.logging#jboss-logging-processor;working@host: not found]
      	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
      	at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:80)
      	at org.codehaus.groovy.reflection.CachedConstructor.doConstructorInvoke(CachedConstructor.java:74)
      	at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrap.callConstructor(ConstructorSite.java:84)
      	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:60)
      	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:235)
      	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:247)
      	at groovy.grape.GrapeIvy.getDependencies(GrapeIvy.groovy:422)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSite.invoke(PogoMetaMethodSite.java:169)
      	at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:59)
      	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:52)
      	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:154)
      	at groovy.grape.GrapeIvy.resolve(GrapeIvy.groovy:567)
      	at groovy.grape.GrapeIvy$resolve$1.callCurrent(Unknown Source)
      	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:52)
      	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:154)
      	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:190)
      	at groovy.grape.GrapeIvy.resolve(GrapeIvy.groovy:536)
      	at groovy.grape.GrapeIvy$resolve$0.callCurrent(Unknown Source)
      	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:52)
      	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:154)
      	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:182)
      	at groovy.grape.GrapeIvy.grab(GrapeIvy.groovy:258)
      	at groovy.grape.Grape.grab(Grape.java:167)
      	at groovy.grape.GrabAnnotationTransformation.visit(GrabAnnotationTransformation.java:378)
      	at org.codehaus.groovy.transform.ASTTransformationVisitor$3.call(ASTTransformationVisitor.java:321)
      	at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:931)
      	at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:593)
      	at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:569)
      	at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:546)
      	at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:298)
      	at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:268)
      	at groovy.lang.GroovyShell.parseClass(GroovyShell.java:694)
      	at groovy.lang.GroovyShell.run(GroovyShell.java:523)
      	at groovy.lang.GroovyShell.run(GroovyShell.java:513)
      	at groovy.ui.GroovyMain.processOnce(GroovyMain.java:652)
      	at groovy.ui.GroovyMain.run(GroovyMain.java:384)
      	at groovy.ui.GroovyMain.process(GroovyMain.java:370)
      	at groovy.ui.GroovyMain.processArgs(GroovyMain.java:129)
      	at groovy.ui.GroovyMain.main(GroovyMain.java:109)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.codehaus.groovy.tools.GroovyStarter.rootLoader(GroovyStarter.java:109)
      	at org.codehaus.groovy.tools.GroovyStarter.main(GroovyStarter.java:131)
      
      1 error
      

      Tested without any maven configuration. The above script works under version 3.0.19.

      Show
      Run the following groovy script test.groovy #!/usr/bin/groovy @Grapes([ @Grab(group='org.jboss.resteasy', module='resteasy-client', version='3.1.0.Final'), ]) import org.jboss.resteasy.client.jaxrs.*; output.txt org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: General error during conversion: Error grabbing Grapes -- [unresolved dependency: junit#junit;working@host: not found, unresolved dependency: org.jboss.spec.javax.ws.rs#jboss-jaxrs-api_2.0_spec;working@host: not found, unresolved dependency: org.jboss.spec.javax.servlet#jboss-servlet-api_3.1_spec;working@host: not found, unresolved dependency: org.jboss.spec.javax.annotation#jboss-annotations-api_1.2_spec;working@host: not found, unresolved dependency: javax.activation#activation;working@host: not found, unresolved dependency: org.apache.httpcomponents#httpclient;working@host: not found, unresolved dependency: commons-io#commons-io;working@host: not found, unresolved dependency: net.jcip#jcip-annotations;working@host: not found, unresolved dependency: org.jboss.logging#jboss-logging;working@host: not found, unresolved dependency: org.jboss.logging#jboss-logging-annotations;working@host: not found, unresolved dependency: org.jboss.logging#jboss-logging-processor;working@host: not found] java.lang.RuntimeException: Error grabbing Grapes -- [unresolved dependency: junit#junit;working@host: not found, unresolved dependency: org.jboss.spec.javax.ws.rs#jboss-jaxrs-api_2.0_spec;working@host: not found, unresolved dependency: org.jboss.spec.javax.servlet#jboss-servlet-api_3.1_spec;working@host: not found, unresolved dependency: org.jboss.spec.javax.annotation#jboss-annotations-api_1.2_spec;working@host: not found, unresolved dependency: javax.activation#activation;working@host: not found, unresolved dependency: org.apache.httpcomponents#httpclient;working@host: not found, unresolved dependency: commons-io#commons-io;working@host: not found, unresolved dependency: net.jcip#jcip-annotations;working@host: not found, unresolved dependency: org.jboss.logging#jboss-logging;working@host: not found, unresolved dependency: org.jboss.logging#jboss-logging-annotations;working@host: not found, unresolved dependency: org.jboss.logging#jboss-logging-processor;working@host: not found] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:80) at org.codehaus.groovy.reflection.CachedConstructor.doConstructorInvoke(CachedConstructor.java:74) at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrap.callConstructor(ConstructorSite.java:84) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:60) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:235) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:247) at groovy.grape.GrapeIvy.getDependencies(GrapeIvy.groovy:422) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSite.invoke(PogoMetaMethodSite.java:169) at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:59) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:52) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:154) at groovy.grape.GrapeIvy.resolve(GrapeIvy.groovy:567) at groovy.grape.GrapeIvy$resolve$1.callCurrent(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:52) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:154) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:190) at groovy.grape.GrapeIvy.resolve(GrapeIvy.groovy:536) at groovy.grape.GrapeIvy$resolve$0.callCurrent(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:52) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:154) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:182) at groovy.grape.GrapeIvy.grab(GrapeIvy.groovy:258) at groovy.grape.Grape.grab(Grape.java:167) at groovy.grape.GrabAnnotationTransformation.visit(GrabAnnotationTransformation.java:378) at org.codehaus.groovy.transform.ASTTransformationVisitor$3.call(ASTTransformationVisitor.java:321) at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:931) at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:593) at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:569) at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:546) at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:298) at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:268) at groovy.lang.GroovyShell.parseClass(GroovyShell.java:694) at groovy.lang.GroovyShell.run(GroovyShell.java:523) at groovy.lang.GroovyShell.run(GroovyShell.java:513) at groovy.ui.GroovyMain.processOnce(GroovyMain.java:652) at groovy.ui.GroovyMain.run(GroovyMain.java:384) at groovy.ui.GroovyMain.process(GroovyMain.java:370) at groovy.ui.GroovyMain.processArgs(GroovyMain.java:129) at groovy.ui.GroovyMain.main(GroovyMain.java:109) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.codehaus.groovy.tools.GroovyStarter.rootLoader(GroovyStarter.java:109) at org.codehaus.groovy.tools.GroovyStarter.main(GroovyStarter.java:131) 1 error Tested without any maven configuration. The above script works under version 3.0.19.
    • Hide

      Presently, the only work around is to revert to release 3.0.19

      Show
      Presently, the only work around is to revert to release 3.0.19

      Due to the use of the resteasy-bom in the resteasy-jaxrs-all project all dependent projects have discarded the <scope/> element. This has caused a scenario where every used dependency is being marked as compile and being included in the final of the libraries. Libraries such as junit should not be included with libraries such as resteasy-client. Other libraries which should have been marked as runtime are being included multiple times at compile time.

      Version 3.1.0.Final contains many compile time dependancies (e.g. junit) which should not be present in the final release. Most likely these should be reverted to test dependencies as was the case in 3.0.19.Final.

      The present configuration is likely to break test cases which have an alternate version of junit.

      Additionally the present configuration is incompatible with Groovy's dependency management (Grape) and therefore the present configuration CANNOT be used for scripting.

            rhn-support-asoldano Alessio Soldano
            sparksis Colton English (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: