Questions tagged [groovy-grape]

85 questions
1
vote
0 answers

How to install maven artifact directly into repo

In grape there is a nice way to download any artifact to repo directly, just calling something like grape install org.apache.derby derby 10.5.3.0 As far as I understand, maven install:install goal requires pom.xml file, and maven…
shabunc
  • 23,119
  • 19
  • 77
  • 102
1
vote
1 answer

Groovy Grape in high volume applications

I have seen examples of Groovy Grape being used for scripts to perform FTPs and other basic scripting tasks. Is anyone using Groovy Grape in applications that execute a high volume of transactions? We are executing a Groovy Scripts frequently (up…
user938614
1
vote
1 answer

Run class main from groovy script using grape

I would like to run the main method of a java class by using @Grab so that requirements are taken care of automatically. More specifically I would like to run the pdfbox example…
mauvilsa
  • 150
  • 1
  • 12
1
vote
2 answers

groovy grape grab not using proxy settings

I'm running Groovy v2.4.5 behind a firewall and I have a local cntlm proxy. FYI, when I use grab on open networks, it works. I've tried running my script this way: groovy -Dhttp.proxyHost=127.0.0.1 -Dhttp.proxyPort=3128 -Divy.message.logger.level=3…
Lars Nordin
  • 2,785
  • 1
  • 22
  • 25
1
vote
0 answers

No suitable ClassLoader found for grab wenn starting from SCM jenkins pipeline

Why if i run pipeline script there is no problem, and if i run it from SCM i get No suitable ClassLoader found for grab How can I fix this?
rikkatti
  • 706
  • 1
  • 8
  • 14
1
vote
1 answer

Groovy isn't able to load a library installed with Grape

Can someone explain why Groovy isn't able to find a JDBC driver even if I've already installed the dependency using Grape? $ grape --version Groovy Version: 1.7.7 JVM: 1.6.0_20 $ grape install org.apache.derby derby 10.5.3.0 :: loading settings ::…
alessmar
  • 4,689
  • 7
  • 43
  • 52
1
vote
0 answers

Which libraries does Jenkins load when I start a pipeline?

I recently ran into the problem that a Java library I loaded through grape was obviously hidden by a dependency of the Jira Plugin (Which Jersey version runs in Jenkins 2.107.1?). The possibility of such a conflict is also documented in…
J Fabian Meier
  • 33,516
  • 10
  • 64
  • 142
1
vote
1 answer

Unable to resolve library using Gradle. Resolved using Grape

I'm fairly new to Groovy and I'm trying to wrap my head around Gradle. If I import the org.jvnet.hudson.plugins through Grapes it works perfectly and the dependency is resolved. But if I try to retrieve the dependency using Gradle the dependency is…
user634545
  • 9,099
  • 5
  • 29
  • 40
1
vote
2 answers

Issues using Grapes to grab JDBC driver

I've read a lot of similar posts about using Grapes to load dependencies but everything I try is getting me nowhere. Using: @Grapes([ @Grab(group='com.microsoft', module='sqljdbc4', version='3.0') ]) class DatabaseTest { static void…
SourMonk
  • 344
  • 1
  • 3
  • 15
1
vote
0 answers

Is there a way to grab dependencies when running groovy script with groovy-all-*.jar?

I am trying to run a groovy script like: java -jar %JAVA_HOME%\..\lib\groovy-all-2.1.7.jar hello.groovy. The problem is, I am grabbing dependencies in the beggining of the script like: @Grapes([ @Grab("org.apache.poi:poi:3.11"), ]) but I…
Christina
  • 361
  • 1
  • 5
  • 17
1
vote
2 answers

Why am I getting an "unable to resolve class" error with groovysh and Grape?

I am using Groovysh and I need to load some classes with Grape. Right now I am trying this: > @Grab(group='group.example', module='module.example', version='1.2.3') > import group.example.TheClass > theClass = new TheClass() However, after I enter…
1
vote
1 answer

Import library into Jenkins groovy script

In my Jenkins build, I have a Groovy script(because I am using the Pipeline plugin) where I am trying to make an API call using OkHttpClient. I have the following Grape code that I got from here: @Grapes( @Grab(group='com.squareup.okhttp',…
bsky
  • 19,326
  • 49
  • 155
  • 270
1
vote
1 answer

Groovy grape not resolving artifacts in Maven central

Fresh install of Groovy and for some reason it isn't pulling artifacts from Maven central: $ grape resolve org.apache.httpcomponents httpclient 4.2.1 Error in resolve: Error grabbing Grapes -- [download failed:…
Mike Robinet
  • 823
  • 6
  • 19
1
vote
3 answers

Downloading dependencies using grape with Jenkins Job DSL plugin error

I did a job using Jenkins Job DSL plugin to get SVN branches with SVNKit libraries, but I have one problem setting de jar libraries using Grape (which uses Ivy). If I set this in my script: @Grapes( @Grab(group='org.tmatesoft.svnkit',…
padilo
  • 996
  • 9
  • 18
1
vote
1 answer

How can I configure grapeConfig.xml to use a private, remote repository?

I have a Maven repo set up as a website, hosted on an Amazon S3 bucket. In my Groovy code, if I use the @GrabResolver annotation with my @Grab annotation, Grape successfully finds the jar I need and the script runs. I want to set up grapeConfig.xml…
LenF
  • 21
  • 4