Forum Discussion

leskop's avatar
leskop
Occasional Contributor
12 years ago

Dynamic ProjectName

Hello,

Because I'm facing issue with getting Jenkins reports for multiple maven sub-modules (http://www.soapui.org/forum/viewtopic.php?f=14&t=5381&sid=2fcc904e767cb355d03028b9aa8c571b&sid=2fcc904e767cb355d03028b9aa8c571b#p37338), I need find other solution. One of them should be setting different project name for each maven submodule.
Is there any way how to do that?

I've tryed set following in pom.xml:

<projectProperties>
<project.name>XXX</project.name>
</projectProperties>


or


<projectProperties>
<name>YYY</name>
</projectProperties>


but with no results. Any idea?

1 Reply

  • leskop's avatar
    leskop
    Occasional Contributor
    after investigation I found temporary solution, while this feature will be supported nativly...

    point is use replacement of project name in project file by maven plugin. (note: I couldn't use replacement by XPath, while project name is stored in root element)


    <plugin>
    <groupId>com.google.code.maven-replacer-plugin</groupId>
    <artifactId>replacer</artifactId>
    <version>1.5.1</version>
    <configuration>
    <quiet>false</quiet>
    </configuration>
    <executions>

    <execution>
    <id>xpath-in-replacements</id>
    <phase>process-test-resources</phase>
    <goals>
    <goal>replace</goal>
    </goals>
    <configuration>
    <file>\..\..\src\test\soapui\My-Soapui-project.xml</file>
    <outputFile>\..\..\src\test\soapui\proccessedMy-Soapui-project.xml</outputFile>
    <replacements>
    <replacement>
    <token>MyProjectName</token>
    <value>MyRenamedProjectName</value>
    </replacement>
    </replacements>
    </configuration>
    </execution>
    </executions>
    </plugin>
    ...