Forum Discussion

TestDriven's avatar
14 years ago

How to load global properties from external file in a maven

Does anyone know what is a proper syntax for loading global properties from the external file in a maven pom?
 
here is a linemode call I'm trying to implement in pom: testrunner.bat "my_soapui_project.xml" -Dsoapui.properties="my.GlobalProperties" -G"g_RunOnThisEnv"="QA " -s"my.TestSuite"
 
Here is my pom: 
<plugin>
<groupId>eviware</groupId>
<artifactId>maven-soapui-plugin</artifactId>
<version>4.0.1</version>
<configuration>
<projectFile>${project.build.directory}/my_soapui_project.xml</projectFile>

            <!--Want to call this here: -Dsoapui.properties="my.GlobalProperties" -->
<globalProperties>
<value>g_RunOnThisEnv=QA </value>
</globalProperties>
</configuration>


Any feedback is highly appreciated.
  • redfish4ktc2's avatar
    redfish4ktc2
    Super Contributor
    Add the following to your plugin configuration

      <soapuiProperties>
    <property>
    <name>soapui.properties</name>
    <value>path_to_your_properties_file</value>
    </property>
    </soapuiProperties>