Forum Discussion

bmgriner's avatar
bmgriner
Frequent Contributor
15 years ago

[Res] Running Scripts in Script Library from Maven Plugin

Is there any documentation on how to run the scripts in the script library from the SoapUI Maven Plugin? I want to be able to run my scripts as part of an automated build and so the regular scripts folder will not be available on the server that is running the build. My guess is that I will need to add the scripts to the ext folder in my project. Do I need to jar up the scripts? Do they need to be in a scripts folder? Do I need a new settings file that I will specify in the plugin that will point to the location of the scripts?

2 Replies

  • bmgriner's avatar
    bmgriner
    Frequent Contributor
    Figured this out.

    I tried adding the relative url to my Script Library setting on the project level. It works when I run it in SoapUI, but not through the SoapUI maven plugin.

    I tried adding a link to a configuration file, but when I use ${projectDir} with the script library path it does not seem to recognize that and just makes whatever is after the ${projectDir} the path.

    I finally tried just putting the path scripts in my settings file instead of /scripts and it seems to take the relative path from the base of my project (the directory I am running maven from). From that I was able to modify the path appropriately.

    I'm still curious what exactly the Script Library setting on the project level is for? It only seems to work when you are running SoapUI and not when you use the maven plugin.
  • This is old post but for someone googling themselves here:

    You can run groovy scripts from the maven pro plugin - you just have to tell maven where your scripts directory is.

    Like this

    <soapuiProperties>
    <property>
    <name>soapui.scripting.library</name>
    <value>${basedir}/scripts</value>
    </property>
    </soapuiProperties>