Sigo teniendo problemas para configurar el embarcadero.plugin en Maven para poder iniciarlo, ejecute la prueba usando maven-surefire-plugin y luego detenga el servidor Jetty. Hasta ahora solo se ejecuta el embarcadero y espera y no continúa. Otro problema es cuando el complemento debe ser jetty-maven-plugin o maven-jetty-plugin. No hago una diferencia entre ellos. De todos modos aquí un extracto de mi pom.xml.
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<!--version>9.2.11.v20150529</version-->
<configuration>
<scanIntervalSeconds>10</scanIntervalSeconds>
<webApp>
<contextPath>/hellojavaworld</contextPath>
</webApp>
<war>c:apache-tomcat-7.0.64webappshellojavaworld.war</war>
<stopPort>9966</stopPort>
<stopKey>foo</stopKey>
</configuration>
<executions>
<execution>
<id>start-jetty</id>
<phase>pre-integration-test</phase>
<goals>
<goal>run</goal>
</goals>
<!--configuration>
<daemon>true</daemon>
</configuration-->
</execution>
<execution>
<id>stop-jetty</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18.1</version>
<configuration>
<excludes>
<exclude>*.java</exclude>
</excludes>
</configuration>
<executions>
<execution>
<phase>integration-test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<skip>false</skip>
<excludes>
<exclude>none</exclude>
</excludes>
<includes>
<include>*.java</include>
</includes>
</configuration>
</execution>
</executions>
</plugin>
En la consola está solo:
[INFO] Se inició el servidor Jetty
[INFO] Arrancando el escáner a intervalos de 10 segundos.
Quiero que inicie Jetty, ejecute la prueba (se requiere un contenedor de servlet), detenga Jetty y escriba BUILD SUCCESSFUL.
¿Alguien tiene alguna sugerencia? Gracias por adelantado.
Respuestas
1 para la respuesta № 1El problema fue que la etiqueta <daemon></daemon>
tiene que ser especificado En mi caso fue comentado. Otra buena fuente para el plugin de Maven Maven es http://wiki.eclipse.org/Jetty/Feature/Jetty_Maven_Plugin
0 para la respuesta № 2
Tuve el mismo problema al usar la versión 9.2.2.v20140723 del plugin de embarcadero. Después de actualizar a 9.2.16.v20160414, maven continúa con las pruebas de integración y detiene el servidor Jetty en la fase de prueba posterior a la integración.