Forum Discussion

ValerieC's avatar
ValerieC
New Contributor
12 years ago

Override property on maven command - simple how to question

I've integrated my soapui project with the maven build http://www.soapui.org/Test-Automation/maven-2x.html and that works great. What I'm trying to do now is to pass in a value for the database connection string because it has the password associated with it and it is dynamic. I have a project level property called "dbConnection". I see there is a setting in the documentation for projectProperties but I don't know how to use it in the mvn command and I don't think my syntax is right. Here is the command I'm trying to use with some of the connection string removed for security reasons.

mvn eviware:maven-soapui-pro-plugin:test -Deviware.soapui.test.projectProperties.dbConnection=jdbc:postgres://localhost:5432...

3 Replies

  • ValerieC's avatar
    ValerieC
    New Contributor
    Hmm well I've changed it to the following which i'd expect is closer to what I want but it still doesn't work. Actually when I try and put this variable in the pom.xml it won't work because it complains about the = sign (user=user password=password in the connection string). I can pass another value like "test" and it works. However with the maven command I can't override any property values. (I have a groovy test step logging the value of the property so I can see if it is changing)

    mvn eviware:maven-soapui-pro-plugin:test -Deviware:soapui:test:projectProperties:dbConnection=jdbc:postgres://localhost:5432/database?user=user&password=password
  • Hi,

    Are you still having issues with this? Let me know if that's the case, and I'll happily assist.

    Regards,
    Arian
    SmartBear Sweden