Submit and vote on feature ideas.

Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

Maven config params do not seem to be accepted

Options
a_nagel
a_nagel Posts: 5

Hi,

Trying to reduce the number of flags on the maven run command. I followed the documentation regarding parameters that could be incorporated into maven.

  <plugin>
    <groupId>Parasoft</groupId>
    <artifactId>maven-parasoft-plugin</artifactId>
    <executions>
      <execution>
        <id>soatest-test</id>
        <phase>verify</phase>
        <goals>
          <goal>soatest</goal>
        </goals>
        <configuration>
          <clean>false</clean>
          <config>soatest.builtin://Demo Configuration</config>
          <!-- <soatestHome>C:/Program Files/Parasoft/SOAtest &amp; Virtualize/2022.1</soatestHome> -->
          <!-- <localsettings>src/test/resources/soatest/localsettings.properties</localsettings> -->
        </configuration>
      </execution>
    </executions>
  </plugin>

Using the above maven config and:

mvn Parasoft:maven-parasoft-plugin:soatest -Dparasoft.soatest.home="C:\Program Files\Parasoft\SOAtest & Virtualize\2022.1" -Dparasoft.localsettings="C:\WS\workspaces\SoaTest\Settings\settings.txt"

things run as expected (Vanilla config).

Now the fun begins. If I uncomment the local settings in the pom, and run:

mvn Parasoft:maven-parasoft-plugin:soatest -Dparasoft.soatest.home="C:\Program Files\Parasoft\SOAtest & Virtualize\2022.1"

it will not work, UNLESS I place the localsettings.properties in the root directory, per the documentation. In other words, it appears to be flat out ignoring the definition from within the pom.

This problem is further exhibited when uncommenting both the local settings and the home in the pom, and run:

mvn Parasoft:maven-parasoft-plugin:soatest

At this point, we get the behavior seen when no home is defined.

I'm lead to believe that NONE of the properties defined in the pom are being read. Please advise. Thanks.

Comments

  • benken_parasoft
    benken_parasoft Posts: 1,235 ✭✭✭
    Options

    it will not work, UNLESS I place the localsettings.properties in the root directory, per the documentation. In other words, it appears to be flat out ignoring the definition from within the pom.

    Your pom looks incorrect. You probably want ${project.basedir} in the front of the path as in ${project.basedir}/src/test/resources/soatest/localsettings.properties

    At this point, we get the behavior seen when no home is defined

    When I do not define the SOAtest "home" then I see an error like this:
    Cannot run program "soatestcli": error=2, No such file or directory

    This error goes away if I set parasoft.soatest.home on the command line or if I set the soatestHome configuration element in my pom.xml. The soatestcli is found when I set the SOAtest "home" either way.

  • benken_parasoft
    benken_parasoft Posts: 1,235 ✭✭✭
    Options

    Please use the new SOAtest Maven Plugin: https://parasoft.github.io/soatest-maven-plugin/