Questions tagged [groovy-grape]

85 questions
4
votes
2 answers

Failing scripts in groovy using Grab

The following groovy scripts fail using command line @Grab("org.apache.poi:poi:3.9") println "test" Error: unexpected token: println @ line 2, column 1. println "test" ^ 1 error Removing the Grab, it works! Anything I missed? $>groovy…
fixitagain
  • 6,543
  • 3
  • 20
  • 24
4
votes
1 answer

How to grab a dependency and make it work with IntelliJ project?

I am trying to start a GroovyFX project within IntelliJ 12. However, I have not been able to get IntelliJ to compile and run the following simple script (for reproducing the problem in the simplest manner…
Renato
  • 12,940
  • 3
  • 54
  • 85
4
votes
3 answers

Can I avoid using Grape to load modules in Groovy?

I am writing my first automation script in groovy and I've hit a roadblock. While making use of the AntBuilder class to run sshexec() I run into the following error: : Problem: failed to create task or type sshexec Cause: the class…
Ryan
  • 51
  • 6
3
votes
2 answers

How to add Ivy as module dependency to IntelliJ

I'm trying to use Grape for: @Grab(group='org.codehaus.groovy.modules.http-builder', module='http-builder', version='0.7' ) However when I add that line in IntelliJ, I get the message: Error:Groovyc: While compiling [project]: Cannot @Grab without…
Sam Jones
  • 43
  • 5
3
votes
1 answer

How to import the jenkins-api in Groovy?

I have a small groovy script that I want to edit and I have issues with the dependency management in Groovy. I am new to groovy and sorry in advance if this question is kinda studip / easy to answer. I use IntelliJ as…
3
votes
0 answers

Error grabbing Grapes -- [unresolved dependency: commons-io#commons-io;1.2: not found]

I have a new groovy installation and i am trying to execute a simple groovy script // Test.Groovy @Grab('commons-io:commons-io:1.2') import org.apache.commons.io.CopyUtils println "Resolved!" But i get the below error , even after creating a…
DevOops
  • 276
  • 2
  • 8
  • 20
3
votes
3 answers

Disable automatic download for Groovy grapes

A sample script ss.groovy: @Grab(group='org.codehaus.groovy.modules.http-builder', module='http-builder', version='0.5.0') import groovyx.net.http.HTTPBuilder println('done') for some reason takes ~25 seconds to load when run with…
icyrock.com
  • 27,952
  • 4
  • 66
  • 85
3
votes
1 answer

What's the difference between Grape and Yum for installing dependencies?

I can find no question even slightly addressing this, so I imagine I'm missing something important, but I would appreciate if someone could even tell me that. I have recently been self-learning some programming languages, and I can't figure out the…
Sean Branchaw
  • 597
  • 1
  • 5
  • 21
3
votes
1 answer

Groovy Grape is not downloading new revisions

I believe I have everything configured correctly such that grape ought to be asking the repository if there is a new revision, but it isn't. As long as the jar exists in .groovy/grapes it uses it. I'm doing the grab via Java code via our…
danno
  • 31
  • 3
3
votes
1 answer

Groovy Grape dealing with dependency resolution

I am trying to use org.xhtmlrenderer:core-renderer:R8pre2 in a groovy script, but I get a Linkage error: Caught: java.lang.LinkageError: loader constraint violation in interface itable initialization: when resolving method …
rdmueller
  • 10,742
  • 10
  • 69
  • 126
3
votes
2 answers

Grape Configuration for Protected Nexus Repository

My company uses Nexus as its internal repository, and I'm trying to write a Groovy script that will pull dependencies from it. The issue though is that this repository is password protected. What does my GrapeConfig.xml file have to look like to…
Steve
  • 4,457
  • 12
  • 48
  • 89
3
votes
2 answers

Why won't Groovy/Grape resolve artifacts from Maven Central?

With a fresh download of Groovy 2.1.9, I create: // Test.Groovy @Grab('commons-io:commons-io:1.2') import org.apache.commons.io.CopyUtils println "Resolved!" Then I try running $ ./groovy-2.1.9/bin/groovy Test.groovy which fails with General error…
Bosh
  • 8,138
  • 11
  • 51
  • 77
3
votes
1 answer

Groovy grapes freeze after downloading artifacts

After updating my ubuntu system I have problem to run groovy grapes scripts. All dependecies are download but process is still running in about 100 % I have ubuntu : lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: …
hudi
  • 15,555
  • 47
  • 142
  • 246
3
votes
1 answer

Groovy's Ivy cache (@Grab) not caching?

I'm running this simply groovy script using groovyConsole (version 1.8.1): println "Start " + new Date() @Grab( 'log4j:log4j:1.2.16' ) import org.apache.log4j.Logger println "End " + new Date() Usually, it executes very quickly (~ 0…
ripper234
  • 222,824
  • 274
  • 634
  • 905
2
votes
0 answers

Grab does not download dependency in soap ui

I am trying to download a dependency via @Grab in SOAP UI, running the below script @Grab('com.xlson.groovycsv:groovycsv:1.3') import static com.xlson.groovycsv.CsvParser.parseCsv def csv = '''Name,Lastname Mark,Andersson Pete,Hansen''' …
oldcode
  • 1,669
  • 3
  • 22
  • 41