Cómo ejecutar diferentes proyectos web en un puerto con Jetty
Frecuentes
Visto 232 veces
1 Respuestas
3
Suppose the structure is
principal
l_ main-a
l_ main-b
and the main-a is the main module.main-b is for simulating static resource service.you can run two web apps in jetty.
You can deploy jetty in main-a,and after the main-a is done ,then upload main-b
the Xml code:
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<configuration>
<webApp>${basedir}/target/main-a</webApp>
<scanIntervalSeconds>10</scanIntervalSeconds>
<contextPath>/main-a</contextPath>
<contextHandlers>
<contextHandler implementation="org.mortbay.jetty.webapp.WebAppContext">
<war>${project.parent.basedir}/main-b/target/main-b.war</war>
<contextPath>/main-b</contextPath>
</contextHandler>
</contextHandlers>
</configuration>
then after main-b generate the war package,execute mvn jetty:run in main-a .then you can run main-a and main-b with jetty at the same time.
Respondido 27 ago 12, 04:08
No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas maven jetty or haz tu propia pregunta.