I use the jetty-maven-plugin for local development testing. What I want is from a single jetty:run command, start a bunch of jetty containers on separate ports as specified in the pom.xml -- I don't want to specify it within the war. My current plugin configuration block looks like ::
<configuration>
<scanIntervalSeconds>0</scanIntervalSeconds>
<contextHandlers>
<contextHandler implementation="org.eclipse.jetty.webapp.WebAppContext">
<war>${basedir}/service-a/target/a.war</war>
<contextPath>/a</contextPath>
<allowNullPathInfo>true</allowNullPathInfo>
</contextHandler>
<contextHandler implementation="org.eclipse.jetty.webapp.WebAppContext">
<war>${basedir}/service-b/target/b.war</war>
<contextPath>/b</contextPath>
<allowNullPathInfo>true</allowNullPathInfo>
</contextHandler>
</contextHandlers>
</configuration>
I know I can specify a -Djetty.port but that globally sets the port. The above example starts both wars in the same jetty container instance running on port 8080. Does anyone know a switch within contextHandler to set the port or how to do it if I have multiple instances of the entire plugin block? Every example I've searched for only has the option to set it in the jetty.xml file within the war which I don't want to do.