1

My application is built on maven and I am having below information and modules I am having an application.xml with below content

<module id="WebModule_1344925542124">
        <web>
            <web-uri>Test1-module-timerweb-3.2.0.0-SNAPSHOT.war</web-uri>
            <context-root>/Test1</context-root>
        </web>
    </module>
    <module id="WebModule_1344925542155">
        <web>
            <web-uri>Test2-module-web-3.2.0.0-SNAPSHOT.war</web-uri>
            <context-root>/Test2</context-root>
        </web>
    </module>
    <module id="WebModule_1344925542187">
        <web>
            <web-uri>Test3-module-web-3.2.0.0-SNAPSHOT.war</web-uri>
            <context-root>/Test3</context-root>
        </web>
    </module>
    <module id="WebModule_1344926714491">
        <web>
            <web-uri>Test4-module-web-3.2.0.0-SNAPSHOT.war</web-uri>
            <context-root>/Test4</context-root>
        </web>
    </module>

is there any maven command to change the web-uri file name in all places all together at a time. For changing the version no in pom.xml I am using mvn versions:set -DnewVersion=3.2.10.2 command after executing the command all version no's and module names are changing except the names in application.xml. Because of this my application is not working and I am changing manually in all the places and working.

Kindly help me if there is any other way to change the file names in application.xml along with version no's.

anudeep
  • 11
  • 2
  • Usually what I do is I rename the `war` file in the target as part of the build, then I use that renamed file in any references. I'm not going to be deploying multiple versions at the same time, so it doesn't make sense to have the version number in the deployed environment. – Larry B. Sep 13 '16 at 16:48
  • I am having around 64 modules in the project and we will change the version very frequently and each time I am changing the versions by using the maven command mvn versions:set -DnewVersion. Next I will change the application.xml file manually with the versions what I set. If there is any command like above will help me – anudeep Sep 20 '16 at 14:21

0 Answers0