KMR
12 years agoOccasional Contributor
Error in loading groovy class with maven plug in
Can you please let me know how I can load the groovy libraries through the pom file so that my scripts can work fine.
i am using soapUi version 4.6.1 and soapUi-maven-plugin 4.6.1
Below is the details of the issue I am facing
I have created a groovy class file which is placed in the the <soapui installation folder>/bin/script
My soapUi test cases are referring to the functions inside the class library. Scripts are working fine and I am able to execute them from test runner also.
Now I am trying to integrate the soapUi scripts with maven.
When I execute the scripts through maven, I am getting the below error.
Error:org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
Script1.groovy: 1: unable to resolve class scripts.testLibrary
@ line 1, column 17.
def testClass = new scripts.testLibrary()
^
org.codehaus.groovy.syntax.SyntaxException: unable to resolve class scripts.testLibrary
@ line 1, column 17.
at org.codehaus.groovy.ast.ClassCodeVisitorSupport.addError(ClassCodeVisitorSupport.java:148)
at org.codehaus.groovy.control.ResolveVisitor.resolveOrFail(ResolveVisitor.java:229)
at org.codehaus.groovy.control.ResolveVisitor.resolveOrFail(ResolveVisitor.java:239)
i am using soapUi version 4.6.1 and soapUi-maven-plugin 4.6.1
Below is the details of the issue I am facing
I have created a groovy class file which is placed in the the <soapui installation folder>/bin/script
My soapUi test cases are referring to the functions inside the class library. Scripts are working fine and I am able to execute them from test runner also.
Now I am trying to integrate the soapUi scripts with maven.
When I execute the scripts through maven, I am getting the below error.
Error:org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
Script1.groovy: 1: unable to resolve class scripts.testLibrary
@ line 1, column 17.
def testClass = new scripts.testLibrary()
^
org.codehaus.groovy.syntax.SyntaxException: unable to resolve class scripts.testLibrary
@ line 1, column 17.
at org.codehaus.groovy.ast.ClassCodeVisitorSupport.addError(ClassCodeVisitorSupport.java:148)
at org.codehaus.groovy.control.ResolveVisitor.resolveOrFail(ResolveVisitor.java:229)
at org.codehaus.groovy.control.ResolveVisitor.resolveOrFail(ResolveVisitor.java:239)