I have a reactor project with the following structure
server
- pom.xml (parent)
-- appserver (has a server socket)
-- webserver (connects to the socket in appserver and gets data)
The appserver pom.xml
has a maven-exec-plugin
that runs the main method in my java class AppServer
.
When I run goal verify in my topmost (server) project my build gets stuck at appserver - exec goal and never proceeds to building / running my webserver.
Ideally I would like to run my appserver first and then my webserver in a single install or verify run on my top most project.
Here is the exec maven plugin configuration in my appserver pom.
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>java</goal>
</goals>
</execution>
</executions>
<configuration>
<mainClass>somepackage.AppServer</mainClass>
</configuration>
I am aware that many other questions of similar nature have been asked before and most answers revolve around use of shell scripts with antrun plugin and almost all of them atleast 3 / 4 years old and I hope there is new solution in a more platform independent manner available now.