I have the following use-case: I am having a web-application implemented with Spring MVC using a Web service implemented with Spring WS.
The projects are using maven as build tool. Now I want to implement integration test for the web-application. For this I want to use the maven-embedded-glassfish-plugin. I have the following maven configuration in pom.xml:
<plugin>
<groupId>org.glassfish</groupId>
<artifactId>maven-embedded-glassfish-plugin</artifactId>
<version>3.1.1</version>
<configuration>
<goalPrefix>embedded-glassfish</goalPrefix>
<app>${basedir}/target/web-app.war</app>
<autoDelete>true</autoDelete>
<port>8080</port>
<name>web-app</name>
<configFile>src/test/resources/glassfish/domain.xml</configFile>
</configuration>
<executions>
<execution>
<id>start-glassfish</id>
<phase>pre-integration-test</phase>
<goals>
<goal>start</goal>
</goals>
</execution>
<execution>
<id>glassfish-deploy</id>
<phase>pre-integration-test</phase>
<goals>
<goal>deploy</goal>
</goals>
</execution>
<execution>
<id>glassfish-undeploy</id>
<phase>post-integration-test</phase>
<goals>
<goal>undeploy</goal>
</goals>
</execution>
<execution>
<id>stop-glassfish</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</plugin>
Everything works fine. But now I need to add the deployment of the webservice.war file. This is not a dependency of my pom in this moment. I am having only a stub class for calling the web service defined in the web-app.war application.
So any good solution how to deploy this second application ?
I would like to be something automatically, maybe using the maven repository for it, cause if I make a modification I want to use automatically the new version of the web-service.