anchor.diff:  To do this add a _grapeConfig.xml_ in your jenkins MASTER installation, in the $JENKINS_HOME/.groovy directory.
   You can generate Ivy config from the artifactory instance.
   An example can be : 
  -
   [source,xml]
   ----
   <?xml version="1.0" encoding="UTF-8"?>
  -<ivy-settings>
  +<ivy-settings
     <settings defaultResolver="downloadGrapes" />
     <credentials host="artifactoryHostname" realm="Artifactory Realm" username="user" passwd="password" />
     <resolvers>
  
positive.code: 
   org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
   General error during conversion: Error grabbing Grapes -- [unresolved dependency: com.oracle#ojdbc6;11.2.0.4: not found]
  
   java.lang.RuntimeException: Error grabbing Grapes -- [unresolved dependency: com.oracle#ojdbc6;11.2.0.4: not found]
  	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
  
  
negative.code: ----
  
  WARNING: You need to restart Jenkins MASTER to load new _grapeConfig.xml" file.
  
  With this config, the jars we be downloading correctly and will be in the grape cache under $JENKINS_HOME/.groovy/grapes directory.
  
  === 2nd problem : JDBC
  Now we have a good configuration of Grape (and Ivy) in Jenkins, but this example still does not work.
  The new error is : 
  
   java.sql.SQLException: No suitable driver found for jdbc:oracle:thin:@SERVER:2483/INSTANCE
  	at java.sql.DriverManager.getConnection(DriverManager.java:689)
  	at java.sql.DriverManager.getConnection(DriverManager.java:247)
  	at groovy.sql.Sql.newInstance(Sql.java:402)
  	at groovy.sql.Sql.newInstance(Sql.java:446)
  	at groovy.sql.Sql$newInstance.call(Unknown Source)
  	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
  	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
  	at com.cloudbees.groovy.cps.sandbox.DefaultInvoker.methodCall(DefaultInvoker.java:18)
  
  The problem is JDBC itself, it need to be loading by the system classloader to work correctly.
  First idea : http://docs.groovy-lang.org/latest/html/documentation/grape.html#Grape-JDBCDrivers[@GrabConfig(systemClassLoader=true)]. It's the Groovy way to deal with JDBC driver.
  I try it, but actually Jenkins does not support this solution and raise this error : 
  
   org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
   General error during conversion: No suitable ClassLoader found for grab
   java.lang.RuntimeException: No suitable ClassLoader found for grab
  	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:83)
  	at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:105)
  	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:247)
  	at groovy.grape.GrapeIvy.chooseClassLoader(GrapeIvy.groovy:182)
  	at groovy.grape.GrapeIvy$chooseClassLoader.callCurrent(Unknown Source)
  	at groovy.grape.GrapeIvy.grab(GrapeIvy.groovy:249)
  	at groovy.grape.Grape.grab(Grape.java:167)
  