Ask a Question

How @Grab works in SoapUI

ericjvdvelden
New Contributor

How @Grab works in SoapUI

I use SoapUI-5.4.0. I work on Windows, and I am behind a proxy an work with Nexus. How do I get this to work?

 

@Grab(group='commons-lang', module='commons-lang', version='2.4')
import org.apache.commons.lang.WordUtils
println "Hello ${WordUtils.capitalize('world')}"

 

I put ivy-2.4.0.jar in the lib directory. I see in the log:

 

General error during conversion: Error grabbing Grapes -- [unresolved dependency: commons-lang#commons-lang;2.4: several problems occurred while resolving dependency: commons-lang#commons-lang;2.4 {default=[default]}:
several problems occurred while resolving dependency: org.apache.commons#commons-parent;9 {}:
several problems occurred while resolving dependency: org.apache#apache;4 {}:
java.util.NoSuchElementException

 

There are:

C:\Users\isc30565\.groovy\grapes\commons-lang\commons-lang\ivydata-2.4.properties

C:\Users\isc30565\.groovy\grapes\org.apache.commons\commons-parent\ivydata-9.properties

C:\Users\isc30565\.groovy\grapes\org.apache\apache\ivydata-4.properties

 

For example in the first one:

#ivy cached data file for commons-lang#commons-lang;2.4
#Fri Sep 17 13:42:05 CEST 2021
artifact\:commons-lang\#pom.original\#pom\#-<a number>.location=file\:C\:/Users/<me>/.m2/repository/commons-lang/commons-lang/2.4/commons-lang-2.4.pom
artifact\:commons-lang\#pom.original\#pom\#-<a number>.is-local=true
artifact\:commons-lang\#pom.original\#pom\#-<a number>.original=artifact\:commons-lang\#pom.original\#pom\#-2103761529
artifact\:commons-lang\#pom.original\#pom\#-<a number>.exists=true

 

 

 

3 REPLIES 3
ashu248
Contributor

Re: How @Grab works in SoapUI

Hi @ericjvdvelden,

 

You need to add other required jars as well in SoapUI lib directory and restart SoapUi.

Please let me know if you need any other assistance.

 

Thanks, 

ericjvdvelden
New Contributor

Re: How @Grab works in SoapUI

Hi,

 

I added ivy jar in the lib directory. Are there more jar's required?

ashu248
Contributor

Re: How @Grab works in SoapUI

Hi @ericjvdvelden ,

add the below jar as well.

https://mvnrepository.com/artifact/commons-lang/commons-lang/2.6

 

and restart the soapUi.

 

Thanks,

cancel
Showing results for 
Search instead for 
Did you mean: