Forum Discussion

RJanecek's avatar
RJanecek
Regular Contributor
15 years ago

properties are not set properly in maven

Hi,
I have some project properties a b c. I save this project. then I run this project with maven and set just a and b so property c isnt null but SOAP UI it takes this property from project what is I think wrong.

9 Replies

  • Hi,

    hmm.. can you please show exactly how you specified the properties in your maven pom?

    regards!

    /Ole
    SmartBear Software
  • RJanecek's avatar
    RJanecek
    Regular Contributor
    pom.xml:

    <properties>
    <a>first</a>
    <b>second</b>
    </properties>

    <plugin>
    <groupId>eviware</groupId>
    <artifactId>maven-soapui-plugin</artifactId>
    <configuration>
    <projectFile>my-soapui-project.xml</projectFile>
    <junitReport>true</junitReport>
    <exportAll>true</exportAll>
    <projectProperties>
    <projectProperty>a=${a}</projectProperty>
    <projectProperty>b=${a}</projectProperty>
    </projectProperties>
    </configuration>
    </plugin>
  • Hi,

    what if you set fixed values - does the property-assignment work then?

    ie

    <projectProperties>
    <projectProperty>a=some</projectProperty>
    <projectProperty>b=value</projectProperty>
    </projectProperties>

    /Ole
    SmartBear Software
  • RJanecek's avatar
    RJanecek
    Regular Contributor
    yes if I set value then this property has certain value. But I have in my project about hundred properties in in each profile I set just few and other I expected that is null not the value from last saved property file which can everyone changed
  • Hi,

    ok.. i'm not sure I follow here - are you saying that values set to empty do not override existing ones?

    ie

    <projectProperty>a=</projectProperty>

    does not set a to an empty string?

    regards!

    /Ole
    SmartBear Software
  • RJanecek's avatar
    RJanecek
    Regular Contributor
    no no overrides works fine. Just when I dont overrides this property, property is set from testProperties and not set to null. And I wanna know if this is feature or bug to customize my project
  • Hi,

    the maven projectProperties argument is for overriding the values that are already in the project - so the values there will be used if not overridden..

    Do you want it to work differently?

    regards!

    /Ole
    SmartBear Software