title: General error during conversion: Error grabbing Grapes download failed net.java.dev.jna
body: <p>groovy version 2.3.7 installed with gvm on a mac. We are behind a corporate proxy, but maven works fine for java projects here.</p>
  
  <p>Tried the following</p>
  
  <pre><code>groovy groovySSHtest.groovy
  </code></pre>
  
  <p>contents here</p>
  
  <pre><code>@Grab(group='org.hidetake', module='groovy-ssh', version='1.0.1')
  import org.hidetake.groovy.ssh.Ssh
  def ssh = Ssh.newService()
  
  ssh.remotes {
    mylaptop {
      host = '127.0.0.1'
      user = 'username'
      identity = new File('id_rsa')
    }
  }
  
  ssh.run {
    session(ssh.remotes.mylaptop) {
      //put 'example.war', '/webapps'
      execute 'pwd'
    }
  }
  </code></pre>
  
  <p>and received the following error</p>
  
  <pre><code>org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
  General error during conversion: Error grabbing Grapes -- [download failed: net.java.dev.jna#jna;3.4.0!jna.jar]
  
  java.lang.RuntimeException: Error grabbing Grapes -- [download failed: net.java.dev.jna#jna;3.4.0!jna.jar]
          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:408)
          at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:77)
          at org.codehaus.groovy.reflection.CachedConstructor.doConstructorInvoke(CachedConstructor.java:71)
          at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrap.callConstructor(ConstructorSite.java:81)
          at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:57)
          at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:182)
          at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:190)
          at groovy.grape.GrapeIvy.getDependencies(GrapeIvy.groovy:421)
          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.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSite.invoke(PogoMetaMethodSite.java:166)
          at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:56)
          at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:49)
          at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133)
          at groovy.grape.GrapeIvy.resolve(GrapeIvy.groovy:566)
          at groovy.grape.GrapeIvy$resolve$3.callCurrent(Unknown Source)
          at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:49)
          at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133)
          at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:153)
          at groovy.grape.GrapeIvy.resolve(GrapeIvy.groovy:535)
          at groovy.grape.GrapeIvy$resolve$2.callCurrent(Unknown Source)
          at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:49)
          at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133)
          at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:149)
          at groovy.grape.GrapeIvy.grab(GrapeIvy.groovy:252)
          at groovy.grape.Grape.grab(Grape.java:163)
          at groovy.grape.GrabAnnotationTransformation.visit(GrabAnnotationTransformation.java:358)
          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 groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:286)
          at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:259)
          at groovy.lang.GroovyShell.parseClass(GroovyShell.java:674)
          at groovy.lang.GroovyShell.run(GroovyShell.java:501)
          at groovy.lang.GroovyShell.run(GroovyShell.java:491)
          at groovy.ui.GroovyMain.processOnce(GroovyMain.java:650)
          at groovy.ui.GroovyMain.run(GroovyMain.java:381)
          at groovy.ui.GroovyMain.process(GroovyMain.java:367)
          at groovy.ui.GroovyMain.processArgs(GroovyMain.java:126)
          at groovy.ui.GroovyMain.main(GroovyMain.java:106)
          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.codehaus.groovy.tools.GroovyStarter.rootLoader(GroovyStarter.java:106)
          at org.codehaus.groovy.tools.GroovyStarter.main(GroovyStarter.java:128)
  
  1 error
  </code></pre>
  
  <p>Already tried looking for cache to blow away in .m2 and .groovy, but found nothing.</p>
  
  <p>Tried setting the user/pass JAVA_OPTS, but no luck with that. Added the following debug setting for ivy</p>
  
  <pre><code>groovy -Divy.message.logger.level=4 groovySSHtest.groovy
  </code></pre>
  
  <p>tried it with proxy user/pass, same error</p>
  
  <pre><code>groovy -Divy.message.logger.level=4 -Dhttp.proxyUser=user -Dhttp.proxyPassword=pass groovySSHtest.groovy
  </code></pre>
  
  <p>found this additional information</p>
  
  <pre><code>Module descriptor is processed : net.java.dev.jna#jna;3.4.0
  Module descriptor is processed : net.java.dev.jna#platform;3.4.0
  storing dependency org.hidetake#groovy-ssh;1.0.1 in props
          resolved ivy file produced in cache
  :: downloading artifacts ::
          [NOT REQUIRED] org.hidetake#groovy-ssh;1.0.1!groovy-ssh.jar
          [NOT REQUIRED] org.codehaus.groovy#groovy-all;2.3.6!groovy-all.jar
          [NOT REQUIRED] org.slf4j#slf4j-api;1.7.7!slf4j-api.jar
          [NOT REQUIRED] com.jcraft#jsch;0.1.51!jsch.jar
          [NOT REQUIRED] com.jcraft#jsch.agentproxy.connector-    factory;0.0.7!jsch.agentproxy.connector-factory.jar(bundle)
          [NOT REQUIRED] com.jcraft#jsch.agentproxy.jsch;0.0.7!jsch.agentproxy.jsch.jar
          [NOT REQUIRED] com.jcraft#jsch.agentproxy.core;0.0.7!jsch.agentproxy.core.jar(bundle)
          [NOT REQUIRED] com.jcraft#jsch.agentproxy.usocket-jna;0.0.7!jsch.agentproxy.usocket-jna.jar(bundle)
          [NOT REQUIRED] com.jcraft#jsch.agentproxy.usocket-nc;0.0.7!jsch.agentproxy.usocket-nc.jar(bundle)
          [NOT REQUIRED] com.jcraft#jsch.agentproxy.sshagent;0.0.7!jsch.agentproxy.sshagent.jar(bundle)
          [NOT REQUIRED] com.jcraft#jsch.agentproxy.pageant;0.0.7!jsch.agentproxy.pageant.jar(bundle)
           trying file:/Users/m673639/.m2/repository/net/java/dev/jna/jna/3.4.0/jna-3.4.0.jar
                  tried file:/Users/m673639/.m2/repository/net/java/dev/jna/jna/3.4.0/jna-3.4.0.jar
          localm2: resource not reachable for net/java/dev/jna#jna;3.4.0: res=file:/Users/m673639/.m2/repository/net/java/dev/jna/jna/3.4.0/jna-3.4.0.jar
  WARN:   [NOT FOUND  ] net.java.dev.jna#jna;3.4.0!jna.jar (1ms)
  WARN: ==== localm2: tried
  WARN:   file:/Users/m673639/.m2/repository/net/java/dev/jna/jna/3.4.0/jna-3.4.0.jar
          [NOT REQUIRED] net.java.dev.jna#platform;3.4.0!platform.jar
          resolve done (371ms resolve - 7ms download)
  
  :: problems summary ::
  :::: WARNINGS
                  [NOT FOUND  ] net.java.dev.jna#jna;3.4.0!jna.jar (1ms)
  
          ==== localm2: tried
  
            file:/Users/m673639/.m2/repository/net/java/dev/jna/jna/3.4.0/jna-3.4.0.jar
  </code></pre>
  
  <p>..will try this when WFH on non-corp proxy network to rule that out as possibility.</p>