Maven – Using maven-jetty-plugin to Start a webapp of another Maven Module

Normally, the maven-jetty-plugin should be configured in the pom of your Maven webapp project/module. But the project i am working is a legacy Java project with many modules and the webapp module depends on others. so i cannot simply start it due to the build sequence.

What i am going to do is to add an new Maven module for integration test of the Maven webapp module and it would be build in the last module such that all other modules are ready.

Assume you got a parent project with 2 child Maven modules.
1. Webapp module (Module Name: sibling_webapp)
2. Integration Test module

So you can configure a maven-jetty-plugin in the Integration Test module as follow

<!-- maven-jetty-plugin configuration -->


You can start the sibling_webapp under the Integration Test module now using the mvn jetty:run command.

Done =)


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.