Forum Discussion

Alcatel-Lucent__5's avatar
Alcatel-Lucent__5
Occasional Contributor
12 years ago

[Resolved] Groovy Class replace in deployed project

Hi,

I wrote a groovy script for my soapui projects(single groovy class for all project) and deploying the project as war to run on the tomcat server.

What if need to do some changes in groovy class? Do I need to redeploy all the deployed project? or placing the script inside the deployed folder works?

Thanks in Advance.

6 Replies

  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi,

    I would say it depends on tomcat server and how it handles reloading when something changes inside the directory where you have deployed your projects.

    So, I think you have to try it out and see how it works.

    Regards,
    Shadid
    SmartBear Sweden
  • Alcatel-Lucent__5's avatar
    Alcatel-Lucent__5
    Occasional Contributor
    13:29:52,237 INFO  [SoapUIProGroovyScriptEngineFactory] Setting Script Library to [C:\tomcat6\webapps\xxxxx\WEB-INF\scripts]


    I tried replacing the edited groovy script in the specified folder. Still its not taking my new groovy script. I even restarted my tomcat server. Not working!!
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi,

    You have to redeploy the project in order for it to start using the new code. Try that out and let me know if it works.

    Regards,

    Arian
    SmartBear Sweden
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi,

    It seems SoapUI caches the script the first time it reads it. Tomcat will re-deploy your application automatically (unless you disabled that in tomcat config) when you copy a new WAR file into the Tomcat webapps folder. You could just change your groovy script, create a new war file, and then copy the war file into that folder. Would this be a satisfactory solution for you?

    Regards,

    Renato Athaydes
    SmartBear Sweden