Forum Discussion

apattanayak's avatar
apattanayak
Occasional Contributor
5 years ago

In jenkins external groovy scripts dont find jars to import

The groovy scripts which are present under project.xml does find all jars to be imported which are present

 

I pulled out common functions and built a seperate script library and placed it outside the project xml, and call those methods from a groovy script present inside project.xml: the dependenices could not be imported. 

 

INFO  [SoapUI] Adding [/***/jenkins/home/workspace/******Regression_Maven/***soapui-integration/ext/xyz.jar] to extensions classpath

All those jars are required seperately are present in the workspace, but the seperate groovy script is unable to find it. 

 

 

file:/***/jenkins/home/workspace/*****-Regression_Maven/****-soapui/****-soapui-projects/Regression_****/groovy-lib/***/Create***.groovy: 7: unable to resolve class  xyz.xyzUtility
 @ line 7, column 1.
   import xyz.xyzUtility

Any suggession would be highly appreciated.

    • sonya_m's avatar
      sonya_m
      SmartBear Alumni (Retired)

      Thank you a lot Nastya!

       

      apattanayak please let us know if this helped.

    • apattanayak's avatar
      apattanayak
      Occasional Contributor

      Nastya_Khovrina Thank you very much for your reply. Sorry for late reply. This does not help, I think, I might have raised the question under SOAP UI pro, instead of cummunity edtition.

       

      Let me try to elaborate more, we use soap ui community version, until now it has worked fine. In jenkins, for all of our internal Jars, we use 'Additional classpath' under 'build environment' step. So, the groovy scripts which are present under multiple projectX.xml, do find the related dependencies properly. 

       

      As soon as, there is an independent groovy script, which is outside the project xml, can not find those dependencies. Any lead would be highly appreaciated.

      • Nastya_Khovrina's avatar
        Nastya_Khovrina
        SmartBear Alumni (Retired)

         Hi apattanayak,

         

        I'm sorry, but I don't fully understand this statement: 
        "As soon as, there is an independent groovy script, which is outside the project xml, can not find those dependencies."

         

        Can you please provide more details about your configuration and errors that you get?