开发者

how to let maven war plugin to create multiple war file

开发者 https://www.devze.com 2023-02-03 21:26 出处:网络
i used selenium-mave-plugin for integration test, which require the war file named: project.artifactId-version(say: myproj-0.1-SNAPSHOT.war)while the default war created by maven-war-plugin is project

i used selenium-mave-plugin for integration test, which require the war file named: project.artifactId-version(say: myproj-0.1-SNAPSHOT.war) while the default war created by maven-war-plugin is project.artifactId.war(say myproj-SNAPSHOT.war).

in order to let selenium plugin, i override the maven-war-plugin in that selenium profile as:

        <plugin>
          <artifactId>maven-war-plugin</artifactId>
          <version>2.1-beta-1</version>
          <configuration>
            <warName>${project.artifactId}-${project.version}</warName>
            </configuration>
       </plugin>

now when i build the project, it failed at rpm:rpm, complaining:

source location ..../myProj.war does 开发者_Go百科not exist

my question is if it's possible to create 2 war files: myProj.war and myProj-0.1-SNAPSHOT.war so both rpm and selenium plugins are happy? Thanks


For rpm plugin, please make sure you use the location directive. If you need further help, please post your full pom.xml.

As for selenium, it doesn't really need to know where your .war file resides. Only the web application server needs to know. Sadly, you didn't provide information in which phase of maven the "does not exist" error occured. So I can only guess it's while starting jetty, tomcat or another web application server.

You should run your full build (including tests) with: mvn clean verify integration-test rpm:prm.

0

精彩评论

暂无评论...
验证码 换一张
取 消