Compile Fails When using Remote-Test module

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Compile Fails When using Remote-Test module

uris77
I'm getting this compile error when trying to use remote-test:

Information:Groovyc: java.lang.reflect.InvocationTargetException
        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:483)
        at org.jetbrains.groovy.compiler.rt.GroovycRunner.main(GroovycRunner.java:100)
        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:483)
        at com.intellij.rt.execution.CommandLineWrapper.main(CommandLineWrapper.java:121)
Caused by: java.lang.NoClassDefFoundError: Unable to load class ratpack.test.remote.RemoteControl due to missing dependency io/remotecontrol/client/CommandGenerator
        at org.codehaus.groovy.vmplugin.v5.Java5.configureClassNode(Java5.java:389)
        at org.codehaus.groovy.ast.ClassNode.lazyClassInit(ClassNode.java:261)
        at org.codehaus.groovy.ast.ClassNode.getDeclaredMethods(ClassNode.java:849)
        at org.codehaus.groovy.ast.ClassNode.getMethods(ClassNode.java:864)
        at org.spockframework.compiler.SpecialMethodCall.checkIsConditionBlock(SpecialMethodCall.java:194)
        at org.spockframework.compiler.SpecialMethodCall.parse(SpecialMethodCall.java:151)
        at org.spockframework.compiler.AbstractDeepBlockRewriter.visitMethodCallExpression(AbstractDeepBlockRewriter.java:110)
        at org.codehaus.groovy.ast.expr.MethodCallExpression.visit(MethodCallExpression.java:64)
        at org.codehaus.groovy.ast.CodeVisitorSupport.visitExpressionStatement(CodeVisitorSupport.java:69)
        at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitExpressionStatement(ClassCodeVisitorSupport.java:193)
        at org.spockframework.compiler.AbstractDeepBlockRewriter.doVisitExpressionStatement(AbstractDeepBlockRewriter.java:146)
        at org.spockframework.compiler.DeepBlockRewriter.doVisitExpressionStatement(DeepBlockRewriter.java:61)
        at org.spockframework.compiler.AbstractDeepBlockRewriter.visitExpressionStatement(AbstractDeepBlockRewriter.java:87)
        at org.codehaus.groovy.ast.stmt.ExpressionStatement.visit(ExpressionStatement.java:40)
        at org.spockframework.compiler.StatementReplacingVisitorSupport.replace(StatementReplacingVisitorSupport.java:44)
        at org.spockframework.compiler.AbstractDeepBlockRewriter.visit(AbstractDeepBlockRewriter.java:71)
        at org.spockframework.compiler.DeepBlockRewriter.visit(DeepBlockRewriter.java:49)
        at org.spockframework.compiler.SpecRewriter.visitAnyBlock(SpecRewriter.java:316)
        at org.spockframework.compiler.model.AnonymousBlock.accept(AnonymousBlock.java:32)
        at org.spockframework.compiler.model.Method.accept(Method.java:70)
        at org.spockframework.compiler.model.Spec.accept(Spec.java:113)
        at org.spockframework.compiler.SpockTransform$Impl.processSpec(SpockTransform.java:77)
        at org.spockframework.compiler.SpockTransform$Impl.visit(SpockTransform.java:64)
        at org.spockframework.compiler.SpockTransform.visit(SpockTransform.java:47)
        at org.codehaus.groovy.transform.ASTTransformationVisitor$3.call(ASTTransformationVisitor.java:319)
        at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:923)
        at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:585)
        at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:561)
        at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:538)
        at org.jetbrains.groovy.compiler.rt.GroovyCompilerWrapper.compile(GroovyCompilerWrapper.java:54)
        at org.jetbrains.groovy.compiler.rt.DependentGroovycRunner.runGroovyc(DependentGroovycRunner.java:87)
        ... 10 more

I've included both remote and remote-test modules:

compile ratpack.dependency("remote")
testCompile ratpack.dependency("remote-test")

I remember seeing this before and somehow fixed it. But when I switched away from the gradle wrapper in IntelliJ, I'm getting this error again.
Reply | Threaded
Open this post in threaded view
|

Re: Compile Fails When using Remote-Test module

Luke Daley
Administrator
It might be because this dependency is on a snapshot (which I’ll fix soon).

Can you run the build with —refresh-dependencies to ensure you have the latest?
Reply | Threaded
Open this post in threaded view
|

Re: Compile Fails When using Remote-Test module

uris77
Oh. You're right. Can't resolve the dependency:

FAILURE: Build failed with an exception.

* What went wrong:
Could not resolve all dependencies for configuration ':compile'.
> Could not resolve io.remotecontrol:remote-core:0.6-SNAPSHOT.
  Required by:
      :esa-proxy:unspecified > io.ratpack:ratpack-remote:0.9.9
   > Unable to load Maven meta-data from http://repo.springsource.org/repo/io/remotecontrol/remote-core/0.6-SNAPSHOT/maven-metadata.xml.
      > Could not GET 'http://repo.springsource.org/repo/io/remotecontrol/remote-core/0.6-SNAPSHOT/maven-metadata.xml'. Received status code 401 from server: Unauthorized
Reply | Threaded
Open this post in threaded view
|

Re: Compile Fails When using Remote-Test module

Luke Daley
Administrator
Looks like the Spring folks have made conf changes to their repo. 

SpringLoaded is now in central/jcenter, so I’d remove the Spring repo from the list and change the spring loaded dependency to "org.springframework:springloaded:1.2.1.RELEASE”.
Reply | Threaded
Open this post in threaded view
|

Re: Compile Fails When using Remote-Test module

uris77
Thanks. Can resolve the dependencies now. But got back to having this issue http://forum.ratpack.io/Tests-failing-in-IntelliJ-td734.html . I need to call it a night and approach it with a clearer mind tomorrow. Thank you for the help.