Forum Discussion
I am not sure if you have added correct path provided in "jar file" in below line.
com.eviware.soapui.support.ClasspathHacker.addURL( new URL("jar file") )
I tried with below code and it worked.
Note: We require different set of jar files for different projects created in SOAP UI and hence we maintain the folder "jars" is same location of project xml and put all required jars inside jars folder.
def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context) def classpathHacker = new com.eviware.soapui.support.ClasspathHacker() path = groovyUtils.getProjectPath() myfile = new java.io.File(path + "/jars/ojdbc7.jar") mystring = "file://" + path + "/jars/ojdbc7.jar" classpathHacker.addFile( myfile ) classpathHacker.addURL( new URL(mystring))
Thats a fair point about needing a different set of jars per project, the /ext folder configuration is more of a global option. Athough, when running SoapUI from scripts (like Maven) the -Dsoapui.ext.libraries= could always be set to the project location when running each project.
Interesting option that ClasspathHacker anyway, so thanks for sharing the solution :-)
Related Content
- 4 years ago
- 4 years ago
- 3 years ago