diff --git a/jetty-maven-plugin/src/it/javax-annotation-api/pom.xml b/jetty-maven-plugin/src/it/javax-annotation-api/pom.xml index 4290f267702..612e7d020a8 100644 --- a/jetty-maven-plugin/src/it/javax-annotation-api/pom.xml +++ b/jetty-maven-plugin/src/it/javax-annotation-api/pom.xml @@ -18,6 +18,7 @@ 8 ${project.build.directory}/jetty-run-mojo-annotation.txt + EMBED @@ -86,7 +87,9 @@ ${jetty.port.file} - ${basedir}/src/config/jetty.xml + + ${basedir}/src/config/jetty.xml + diff --git a/jetty-maven-plugin/src/it/javax-annotation-api/postbuild.groovy b/jetty-maven-plugin/src/it/javax-annotation-api/postbuild.groovy index 9533c9ecc2c..f3d4457eee4 100644 --- a/jetty-maven-plugin/src/it/javax-annotation-api/postbuild.groovy +++ b/jetty-maven-plugin/src/it/javax-annotation-api/postbuild.groovy @@ -17,5 +17,5 @@ * under the License. */ File buildLog = new File( basedir, 'build.log' ) -assert buildLog.text.contains( 'Started Jetty Server' ) +assert buildLog.text.contains( 'Started Server' ) assert buildLog.text.contains( 'all good guys get a good Beer') diff --git a/jetty-maven-plugin/src/it/jetty-maven-plugin-provided-module-dep/postbuild.groovy b/jetty-maven-plugin/src/it/jetty-maven-plugin-provided-module-dep/postbuild.groovy index 4c12de49d83..1ec1341da06 100644 --- a/jetty-maven-plugin/src/it/jetty-maven-plugin-provided-module-dep/postbuild.groovy +++ b/jetty-maven-plugin/src/it/jetty-maven-plugin-provided-module-dep/postbuild.groovy @@ -17,5 +17,5 @@ * under the License. */ File buildLog = new File( basedir, 'build.log' ) -assert buildLog.text.contains( 'Started Jetty Server' ) -assert buildLog.text.contains( 'ClassNotFoundException') \ No newline at end of file +assert buildLog.text.contains( 'Started Server' ) +assert buildLog.text.contains( 'ClassNotFoundException') diff --git a/jetty-maven-plugin/src/it/jetty-maven-plugin-provided-module-dep/web/pom.xml b/jetty-maven-plugin/src/it/jetty-maven-plugin-provided-module-dep/web/pom.xml index dd221342be9..9b18fb91ab3 100755 --- a/jetty-maven-plugin/src/it/jetty-maven-plugin-provided-module-dep/web/pom.xml +++ b/jetty-maven-plugin/src/it/jetty-maven-plugin-provided-module-dep/web/pom.xml @@ -9,6 +9,10 @@ web war + + EMBED + + ${project.groupId} @@ -41,13 +45,14 @@ start-jetty - test-compile + pre-integration-test - start + newstart - true - ${basedir}/src/config/jetty.xml + + ${basedir}/src/config/jetty.xml + diff --git a/jetty-maven-plugin/src/it/jetty-maven-plugin-provided-module-dep/web/src/main/java/test/ClassLoadingTestingServletContextListener.java b/jetty-maven-plugin/src/it/jetty-maven-plugin-provided-module-dep/web/src/main/java/test/ClassLoadingTestingServletContextListener.java index e5c41993eb0..e96fce2432d 100755 --- a/jetty-maven-plugin/src/it/jetty-maven-plugin-provided-module-dep/web/src/main/java/test/ClassLoadingTestingServletContextListener.java +++ b/jetty-maven-plugin/src/it/jetty-maven-plugin-provided-module-dep/web/src/main/java/test/ClassLoadingTestingServletContextListener.java @@ -33,12 +33,12 @@ public class ClassLoadingTestingServletContextListener try { Api api = new Api(); + //System.out.println("Class " + api.getClass().getName() + " is available and loaded by classloader " + api.getClass().getClassLoader().toString() + ". Expected ClassNotFoundException."); } catch (java.lang.Exception exception) { exception.printStackTrace(); } - //System.out.println("Class " + api.getClass().getName() + " is available and loaded by classloader " + api.getClass().getClassLoader().toString() + ". Expected ClassNotFoundException."); } @Override diff --git a/jetty-maven-plugin/src/it/jetty-run-distro-mojo-it/invoker.properties b/jetty-maven-plugin/src/it/jetty-run-distro-mojo-it/invoker.properties index df6cbf2d0bc..e5f71487474 100644 --- a/jetty-maven-plugin/src/it/jetty-run-distro-mojo-it/invoker.properties +++ b/jetty-maven-plugin/src/it/jetty-run-distro-mojo-it/invoker.properties @@ -1,2 +1,2 @@ -invoker.goals = test -fae +invoker.goals = verify -fae invoker.debug = true diff --git a/jetty-maven-plugin/src/it/jetty-run-distro-mojo-it/jetty-simple-webapp/pom.xml b/jetty-maven-plugin/src/it/jetty-run-distro-mojo-it/jetty-simple-webapp/pom.xml index 1c1b58ea4d2..b9e6a79102b 100644 --- a/jetty-maven-plugin/src/it/jetty-run-distro-mojo-it/jetty-simple-webapp/pom.xml +++ b/jetty-maven-plugin/src/it/jetty-run-distro-mojo-it/jetty-simple-webapp/pom.xml @@ -87,7 +87,7 @@ start-jetty - test-compile + process-test-classes newstart diff --git a/jetty-maven-plugin/src/it/jetty-run-distro-mojo-it/postbuild.groovy b/jetty-maven-plugin/src/it/jetty-run-distro-mojo-it/postbuild.groovy index 14242d18b34..b4711856c5b 100644 --- a/jetty-maven-plugin/src/it/jetty-run-distro-mojo-it/postbuild.groovy +++ b/jetty-maven-plugin/src/it/jetty-run-distro-mojo-it/postbuild.groovy @@ -12,7 +12,7 @@ s.close() File buildLog = new File( basedir, 'build.log' ) -assert buildLog.text.contains( 'Forking command line' ) +assert buildLog.text.contains( 'Started Server' ) assert buildLog.text.contains( 'Running org.eclipse.jetty.maven.plugin.it.TestGetContent') assert buildLog.text.contains( 'pingServlet ok') assert buildLog.text.contains( 'helloServlet') diff --git a/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/invoker.properties b/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/invoker.properties deleted file mode 100644 index 2fc6409821b..00000000000 --- a/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/invoker.properties +++ /dev/null @@ -1 +0,0 @@ -invoker.goals = test -fae \ No newline at end of file diff --git a/jetty-maven-plugin/src/it/jetty-run-mojo-it/postbuild.groovy b/jetty-maven-plugin/src/it/jetty-run-mojo-it/postbuild.groovy index 323b5da5d72..d0cf33391a6 100644 --- a/jetty-maven-plugin/src/it/jetty-run-mojo-it/postbuild.groovy +++ b/jetty-maven-plugin/src/it/jetty-run-mojo-it/postbuild.groovy @@ -17,7 +17,7 @@ * under the License. */ File buildLog = new File( basedir, 'build.log' ) -assert buildLog.text.contains( 'Started Jetty Server' ) +assert buildLog.text.contains( 'Started Server' ) assert buildLog.text.contains( 'Running org.eclipse.jetty.maven.plugin.it.TestGetContent') assert buildLog.text.contains( 'pingServlet ok') -assert buildLog.text.contains( 'helloServlet') \ No newline at end of file +assert buildLog.text.contains( 'helloServlet') diff --git a/jetty-maven-plugin/src/it/jetty-run-mojo-jsp/postbuild.groovy b/jetty-maven-plugin/src/it/jetty-run-mojo-jsp/postbuild.groovy index 4c4b42e2f2f..d70b253e946 100644 --- a/jetty-maven-plugin/src/it/jetty-run-mojo-jsp/postbuild.groovy +++ b/jetty-maven-plugin/src/it/jetty-run-mojo-jsp/postbuild.groovy @@ -17,6 +17,6 @@ * under the License. */ File buildLog = new File( basedir, 'build.log' ) -assert buildLog.text.contains( 'Started Jetty Server' ) +assert buildLog.text.contains( 'Started Server' ) assert buildLog.text.contains( 'Running org.eclipse.jetty.maven.plugin.it.TestGetContent') assert buildLog.text.contains( 'contentCheck') diff --git a/jetty-maven-plugin/src/it/jetty-run-mojo-multi-module-single-war-it/postbuild.groovy b/jetty-maven-plugin/src/it/jetty-run-mojo-multi-module-single-war-it/postbuild.groovy index 202881ac1a1..536e759eb15 100644 --- a/jetty-maven-plugin/src/it/jetty-run-mojo-multi-module-single-war-it/postbuild.groovy +++ b/jetty-maven-plugin/src/it/jetty-run-mojo-multi-module-single-war-it/postbuild.groovy @@ -17,7 +17,7 @@ * under the License. */ File buildLog = new File( basedir, 'build.log' ) -assert buildLog.text.contains( 'Started Jetty Server' ) +assert buildLog.text.contains( 'Started Server' ) assert buildLog.text.contains( '(1a) >> javax.servlet.ServletContextListener loaded from jar:' ) diff --git a/jetty-maven-plugin/src/it/jetty-run-mojo-multi-module-single-war-it/webapp-war/pom.xml b/jetty-maven-plugin/src/it/jetty-run-mojo-multi-module-single-war-it/webapp-war/pom.xml index 99c213c243b..31c5c72cb07 100644 --- a/jetty-maven-plugin/src/it/jetty-run-mojo-multi-module-single-war-it/webapp-war/pom.xml +++ b/jetty-maven-plugin/src/it/jetty-run-mojo-multi-module-single-war-it/webapp-war/pom.xml @@ -22,6 +22,7 @@ ${project.build.directory}/jetty-run-mojo.txt + EMBED @@ -34,17 +35,15 @@ start-jetty test-compile - start + newstart - - jetty.port.file - ${jetty.port.file} - + ${jetty.port.file} - true - ${basedir}/src/config/jetty.xml + + ${basedir}/src/config/jetty.xml + diff --git a/jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/invoker.properties b/jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/invoker.properties deleted file mode 100644 index b8a016f5093..00000000000 --- a/jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/invoker.properties +++ /dev/null @@ -1,2 +0,0 @@ -invoker.goals = verify -V -#test-compile failsafe:integration-test \ No newline at end of file diff --git a/jetty-maven-plugin/src/it/jetty-run-war-mojo-it/postbuild.groovy b/jetty-maven-plugin/src/it/jetty-run-war-mojo-it/postbuild.groovy index 323b5da5d72..d0cf33391a6 100644 --- a/jetty-maven-plugin/src/it/jetty-run-war-mojo-it/postbuild.groovy +++ b/jetty-maven-plugin/src/it/jetty-run-war-mojo-it/postbuild.groovy @@ -17,7 +17,7 @@ * under the License. */ File buildLog = new File( basedir, 'build.log' ) -assert buildLog.text.contains( 'Started Jetty Server' ) +assert buildLog.text.contains( 'Started Server' ) assert buildLog.text.contains( 'Running org.eclipse.jetty.maven.plugin.it.TestGetContent') assert buildLog.text.contains( 'pingServlet ok') -assert buildLog.text.contains( 'helloServlet') \ No newline at end of file +assert buildLog.text.contains( 'helloServlet') diff --git a/jetty-maven-plugin/src/it/jetty-start-forked-mojo-it/invoker.properties b/jetty-maven-plugin/src/it/jetty-start-forked-mojo-it/invoker.properties new file mode 100644 index 00000000000..850d38aa127 --- /dev/null +++ b/jetty-maven-plugin/src/it/jetty-start-forked-mojo-it/invoker.properties @@ -0,0 +1 @@ +invoker.goals = verify -fae diff --git a/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-base/pom.xml b/jetty-maven-plugin/src/it/jetty-start-forked-mojo-it/jetty-simple-base/pom.xml similarity index 94% rename from jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-base/pom.xml rename to jetty-maven-plugin/src/it/jetty-start-forked-mojo-it/jetty-simple-base/pom.xml index f89fb007715..dbeced3c66b 100644 --- a/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-base/pom.xml +++ b/jetty-maven-plugin/src/it/jetty-start-forked-mojo-it/jetty-simple-base/pom.xml @@ -3,7 +3,7 @@ 4.0.0 - org.eclipse.jetty.its.jetty-run-forked-mojo-it + org.eclipse.jetty.its.jetty-start-forked-mojo-it jetty-simple-project 0.0.1-SNAPSHOT diff --git a/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-base/src/main/java/org/eclipse/jetty/its/jetty_run_forked_mojo_it/HelloServlet.java b/jetty-maven-plugin/src/it/jetty-start-forked-mojo-it/jetty-simple-base/src/main/java/org/eclipse/jetty/its/jetty_run_forked_mojo_it/HelloServlet.java similarity index 100% rename from jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-base/src/main/java/org/eclipse/jetty/its/jetty_run_forked_mojo_it/HelloServlet.java rename to jetty-maven-plugin/src/it/jetty-start-forked-mojo-it/jetty-simple-base/src/main/java/org/eclipse/jetty/its/jetty_run_forked_mojo_it/HelloServlet.java diff --git a/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-base/src/main/java/org/eclipse/jetty/its/jetty_run_forked_mojo_it/PingServlet.java b/jetty-maven-plugin/src/it/jetty-start-forked-mojo-it/jetty-simple-base/src/main/java/org/eclipse/jetty/its/jetty_run_forked_mojo_it/PingServlet.java similarity index 100% rename from jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-base/src/main/java/org/eclipse/jetty/its/jetty_run_forked_mojo_it/PingServlet.java rename to jetty-maven-plugin/src/it/jetty-start-forked-mojo-it/jetty-simple-base/src/main/java/org/eclipse/jetty/its/jetty_run_forked_mojo_it/PingServlet.java diff --git a/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-base/src/main/resources/META-INF/web-fragment.xml b/jetty-maven-plugin/src/it/jetty-start-forked-mojo-it/jetty-simple-base/src/main/resources/META-INF/web-fragment.xml similarity index 100% rename from jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-base/src/main/resources/META-INF/web-fragment.xml rename to jetty-maven-plugin/src/it/jetty-start-forked-mojo-it/jetty-simple-base/src/main/resources/META-INF/web-fragment.xml diff --git a/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-webapp/pom.xml b/jetty-maven-plugin/src/it/jetty-start-forked-mojo-it/jetty-simple-webapp/pom.xml similarity index 90% rename from jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-webapp/pom.xml rename to jetty-maven-plugin/src/it/jetty-start-forked-mojo-it/jetty-simple-webapp/pom.xml index 59318f70b5f..a765c2b014c 100644 --- a/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-webapp/pom.xml +++ b/jetty-maven-plugin/src/it/jetty-start-forked-mojo-it/jetty-simple-webapp/pom.xml @@ -3,7 +3,7 @@ 4.0.0 - org.eclipse.jetty.its.jetty-run-forked-mojo-it + org.eclipse.jetty.its.jetty-start-forked-mojo-it jetty-simple-project 0.0.1-SNAPSHOT @@ -15,14 +15,14 @@ @jetty.jvmArgs@ - ${project.build.directory}/jetty-run-forked-port.txt + ${project.build.directory}/jetty-start-forked-port.txt FORK - org.eclipse.jetty.its.jetty-run-forked-mojo-it + org.eclipse.jetty.its.jetty-start-forked-mojo-it jetty-simple-base @@ -87,7 +87,7 @@ start-jetty - test-compile + process-test-classes newstart @@ -97,7 +97,7 @@ ${jetty.jvmArgs} - jetty.port.file=${jetty.port.file} + ${jetty.port.file} diff --git a/jetty-maven-plugin/src/it/jetty-deploy-war-mojo-it/src/config/jetty.xml b/jetty-maven-plugin/src/it/jetty-start-forked-mojo-it/jetty-simple-webapp/src/config/jetty.xml similarity index 100% rename from jetty-maven-plugin/src/it/jetty-deploy-war-mojo-it/src/config/jetty.xml rename to jetty-maven-plugin/src/it/jetty-start-forked-mojo-it/jetty-simple-webapp/src/config/jetty.xml diff --git a/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-webapp/src/main/webapp/WEB-INF/web.xml b/jetty-maven-plugin/src/it/jetty-start-forked-mojo-it/jetty-simple-webapp/src/main/webapp/WEB-INF/web.xml similarity index 100% rename from jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-webapp/src/main/webapp/WEB-INF/web.xml rename to jetty-maven-plugin/src/it/jetty-start-forked-mojo-it/jetty-simple-webapp/src/main/webapp/WEB-INF/web.xml diff --git a/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/pom.xml b/jetty-maven-plugin/src/it/jetty-start-forked-mojo-it/pom.xml similarity index 89% rename from jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/pom.xml rename to jetty-maven-plugin/src/it/jetty-start-forked-mojo-it/pom.xml index 813ecc5bfd0..d3c377f9a86 100644 --- a/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/pom.xml +++ b/jetty-maven-plugin/src/it/jetty-start-forked-mojo-it/pom.xml @@ -8,7 +8,7 @@ 0.0.1-SNAPSHOT - org.eclipse.jetty.its.jetty-run-forked-mojo-it + org.eclipse.jetty.its.jetty-start-forked-mojo-it jetty-simple-project 0.0.1-SNAPSHOT pom @@ -31,7 +31,7 @@ - org.eclipse.jetty.its.jetty-run-forked-mojo-it + org.eclipse.jetty.its.jetty-start-forked-mojo-it jetty-simple-base ${project.version} diff --git a/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/postbuild.groovy b/jetty-maven-plugin/src/it/jetty-start-forked-mojo-it/postbuild.groovy similarity index 100% rename from jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/postbuild.groovy rename to jetty-maven-plugin/src/it/jetty-start-forked-mojo-it/postbuild.groovy diff --git a/jetty-maven-plugin/src/it/jetty-start-mojo-it/postbuild.groovy b/jetty-maven-plugin/src/it/jetty-start-mojo-it/postbuild.groovy index 323b5da5d72..d0cf33391a6 100644 --- a/jetty-maven-plugin/src/it/jetty-start-mojo-it/postbuild.groovy +++ b/jetty-maven-plugin/src/it/jetty-start-mojo-it/postbuild.groovy @@ -17,7 +17,7 @@ * under the License. */ File buildLog = new File( basedir, 'build.log' ) -assert buildLog.text.contains( 'Started Jetty Server' ) +assert buildLog.text.contains( 'Started Server' ) assert buildLog.text.contains( 'Running org.eclipse.jetty.maven.plugin.it.TestGetContent') assert buildLog.text.contains( 'pingServlet ok') -assert buildLog.text.contains( 'helloServlet') \ No newline at end of file +assert buildLog.text.contains( 'helloServlet') diff --git a/jetty-maven-plugin/src/it/jetty-start-war-forked-mojo-it/invoker.properties b/jetty-maven-plugin/src/it/jetty-start-war-forked-mojo-it/invoker.properties new file mode 100644 index 00000000000..d2583001859 --- /dev/null +++ b/jetty-maven-plugin/src/it/jetty-start-war-forked-mojo-it/invoker.properties @@ -0,0 +1,2 @@ +invoker.goals = verify -V -X +#test-compile failsafe:integration-test diff --git a/jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/jetty-simple-base/pom.xml b/jetty-maven-plugin/src/it/jetty-start-war-forked-mojo-it/jetty-simple-base/pom.xml similarity index 95% rename from jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/jetty-simple-base/pom.xml rename to jetty-maven-plugin/src/it/jetty-start-war-forked-mojo-it/jetty-simple-base/pom.xml index 348a3bc6e8d..f5126ccc20c 100644 --- a/jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/jetty-simple-base/pom.xml +++ b/jetty-maven-plugin/src/it/jetty-start-war-forked-mojo-it/jetty-simple-base/pom.xml @@ -3,7 +3,7 @@ 4.0.0 - org.eclipse.jetty.its.jetty-run-war-exploded-mojo-it + org.eclipse.jetty.its.jetty-start-war-forked-mojo-it jetty-simple-project 0.0.1-SNAPSHOT diff --git a/jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/jetty-simple-base/src/main/java/org/eclipse/jetty/its/jetty_run_war_exploded_mojo_it/HelloServlet.java b/jetty-maven-plugin/src/it/jetty-start-war-forked-mojo-it/jetty-simple-base/src/main/java/org/eclipse/jetty/its/jetty_run_war_exploded_mojo_it/HelloServlet.java similarity index 100% rename from jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/jetty-simple-base/src/main/java/org/eclipse/jetty/its/jetty_run_war_exploded_mojo_it/HelloServlet.java rename to jetty-maven-plugin/src/it/jetty-start-war-forked-mojo-it/jetty-simple-base/src/main/java/org/eclipse/jetty/its/jetty_run_war_exploded_mojo_it/HelloServlet.java diff --git a/jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/jetty-simple-base/src/main/java/org/eclipse/jetty/its/jetty_run_war_exploded_mojo_it/PingServlet.java b/jetty-maven-plugin/src/it/jetty-start-war-forked-mojo-it/jetty-simple-base/src/main/java/org/eclipse/jetty/its/jetty_run_war_exploded_mojo_it/PingServlet.java similarity index 100% rename from jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/jetty-simple-base/src/main/java/org/eclipse/jetty/its/jetty_run_war_exploded_mojo_it/PingServlet.java rename to jetty-maven-plugin/src/it/jetty-start-war-forked-mojo-it/jetty-simple-base/src/main/java/org/eclipse/jetty/its/jetty_run_war_exploded_mojo_it/PingServlet.java diff --git a/jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/jetty-simple-base/src/main/resources/META-INF/web-fragment.xml b/jetty-maven-plugin/src/it/jetty-start-war-forked-mojo-it/jetty-simple-base/src/main/resources/META-INF/web-fragment.xml similarity index 100% rename from jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/jetty-simple-base/src/main/resources/META-INF/web-fragment.xml rename to jetty-maven-plugin/src/it/jetty-start-war-forked-mojo-it/jetty-simple-base/src/main/resources/META-INF/web-fragment.xml diff --git a/jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/jetty-simple-webapp/pom.xml b/jetty-maven-plugin/src/it/jetty-start-war-forked-mojo-it/jetty-simple-webapp/pom.xml similarity index 81% rename from jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/jetty-simple-webapp/pom.xml rename to jetty-maven-plugin/src/it/jetty-start-war-forked-mojo-it/jetty-simple-webapp/pom.xml index 7c9eae6c588..bb100cae149 100644 --- a/jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/jetty-simple-webapp/pom.xml +++ b/jetty-maven-plugin/src/it/jetty-start-war-forked-mojo-it/jetty-simple-webapp/pom.xml @@ -3,9 +3,10 @@ 4.0.0 - org.eclipse.jetty.its.jetty-run-war-exploded-mojo-it + org.eclipse.jetty.its.jetty-start-war-forked-mojo-it jetty-simple-project 0.0.1-SNAPSHOT + ../pom.xml jetty-simple-webapp @@ -14,12 +15,13 @@ Jetty :: Simple :: Webapp - ${project.build.directory}/jetty-run-war-exploded-port.txt + ${project.build.directory}/jetty-start-war-forked-port.txt + FORK - org.eclipse.jetty.its.jetty-run-war-exploded-mojo-it + org.eclipse.jetty.its.jetty-start-war-forked-mojo-it jetty-simple-base @@ -62,6 +64,30 @@ true + + org.eclipse.jetty + jetty-maven-plugin + + + start-jetty + pre-integration-test + + newstart-war + + + + ${project.build.directory}/${project.artifactId}-${project.version} + + + ${jetty.port.file} + + + ${basedir}/src/config/jetty.xml + + + + + org.apache.maven.plugins maven-failsafe-plugin @@ -94,29 +120,6 @@ - - org.eclipse.jetty - jetty-maven-plugin - - - start-jetty - test-compile - - run-exploded - - - true - - - jetty.port.file - ${jetty.port.file} - - - ${basedir}/src/config/jetty.xml - - - - diff --git a/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-webapp/src/config/jetty.xml b/jetty-maven-plugin/src/it/jetty-start-war-forked-mojo-it/jetty-simple-webapp/src/config/jetty.xml similarity index 100% rename from jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-webapp/src/config/jetty.xml rename to jetty-maven-plugin/src/it/jetty-start-war-forked-mojo-it/jetty-simple-webapp/src/config/jetty.xml diff --git a/jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/jetty-simple-webapp/src/main/webapp/WEB-INF/web.xml b/jetty-maven-plugin/src/it/jetty-start-war-forked-mojo-it/jetty-simple-webapp/src/main/webapp/WEB-INF/web.xml similarity index 100% rename from jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/jetty-simple-webapp/src/main/webapp/WEB-INF/web.xml rename to jetty-maven-plugin/src/it/jetty-start-war-forked-mojo-it/jetty-simple-webapp/src/main/webapp/WEB-INF/web.xml diff --git a/jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/pom.xml b/jetty-maven-plugin/src/it/jetty-start-war-forked-mojo-it/pom.xml similarity index 86% rename from jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/pom.xml rename to jetty-maven-plugin/src/it/jetty-start-war-forked-mojo-it/pom.xml index b6ac179988a..0d5808b0ca0 100644 --- a/jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/pom.xml +++ b/jetty-maven-plugin/src/it/jetty-start-war-forked-mojo-it/pom.xml @@ -6,9 +6,10 @@ org.eclipse.jetty.its it-parent-pom 0.0.1-SNAPSHOT + ../it-parent-pom/pom.xml - org.eclipse.jetty.its.jetty-run-war-exploded-mojo-it + org.eclipse.jetty.its.jetty-start-war-forked-mojo-it jetty-simple-project 0.0.1-SNAPSHOT pom @@ -30,7 +31,7 @@ - org.eclipse.jetty.its.jetty-run-war-exploded-mojo-it + org.eclipse.jetty.its.jetty-start-war-forked-mojo-it jetty-simple-base ${project.version} diff --git a/jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/postbuild.groovy b/jetty-maven-plugin/src/it/jetty-start-war-forked-mojo-it/postbuild.groovy similarity index 69% rename from jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/postbuild.groovy rename to jetty-maven-plugin/src/it/jetty-start-war-forked-mojo-it/postbuild.groovy index 323b5da5d72..5fb67f5c912 100644 --- a/jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/postbuild.groovy +++ b/jetty-maven-plugin/src/it/jetty-start-war-forked-mojo-it/postbuild.groovy @@ -16,8 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -File buildLog = new File( basedir, 'build.log' ) -assert buildLog.text.contains( 'Started Jetty Server' ) -assert buildLog.text.contains( 'Running org.eclipse.jetty.maven.plugin.it.TestGetContent') -assert buildLog.text.contains( 'pingServlet ok') -assert buildLog.text.contains( 'helloServlet') \ No newline at end of file +File outputLog = new File( basedir, 'jetty-simple-webapp/target/jetty-start-war.out' ) +assert outputLog.text.contains( 'Started Server' ) +assert outputLog.text.contains( 'Running org.eclipse.jetty.maven.plugin.it.TestGetContent') +assert outputLog.text.contains( 'pingServlet ok') +assert outputLog.text.contains( 'helloServlet') diff --git a/jetty-maven-plugin/src/it/jetty-deploy-war-mojo-it/invoker.properties b/jetty-maven-plugin/src/it/jetty-start-war-mojo-it/invoker.properties similarity index 100% rename from jetty-maven-plugin/src/it/jetty-deploy-war-mojo-it/invoker.properties rename to jetty-maven-plugin/src/it/jetty-start-war-mojo-it/invoker.properties diff --git a/jetty-maven-plugin/src/it/jetty-deploy-war-mojo-it/pom.xml b/jetty-maven-plugin/src/it/jetty-start-war-mojo-it/pom.xml similarity index 95% rename from jetty-maven-plugin/src/it/jetty-deploy-war-mojo-it/pom.xml rename to jetty-maven-plugin/src/it/jetty-start-war-mojo-it/pom.xml index 23ccad2096c..eb3789b52d4 100644 --- a/jetty-maven-plugin/src/it/jetty-deploy-war-mojo-it/pom.xml +++ b/jetty-maven-plugin/src/it/jetty-start-war-mojo-it/pom.xml @@ -8,15 +8,15 @@ 0.0.1-SNAPSHOT - org.eclipse.jetty.its.jetty-deploy-war-mojo-it + org.eclipse.jetty.its.jetty-start-war-mojo-it jetty-simple-project 0.0.1-SNAPSHOT pom - Jetty :: Simple deploy war mojo test + Jetty :: Simple start war mojo test - ${project.build.directory}/jetty-deploy-war-port.txt + ${project.build.directory}/jetty-start-war-port.txt @@ -75,7 +75,7 @@ start-jetty test-compile - newdeploy + newstart-war diff --git a/jetty-maven-plugin/src/it/jetty-deploy-war-mojo-it/postbuild.groovy b/jetty-maven-plugin/src/it/jetty-start-war-mojo-it/postbuild.groovy similarity index 88% rename from jetty-maven-plugin/src/it/jetty-deploy-war-mojo-it/postbuild.groovy rename to jetty-maven-plugin/src/it/jetty-start-war-mojo-it/postbuild.groovy index b5f4344c4a6..d70b253e946 100644 --- a/jetty-maven-plugin/src/it/jetty-deploy-war-mojo-it/postbuild.groovy +++ b/jetty-maven-plugin/src/it/jetty-start-war-mojo-it/postbuild.groovy @@ -17,6 +17,6 @@ * under the License. */ File buildLog = new File( basedir, 'build.log' ) -assert buildLog.text.contains( 'Started Jetty Server' ) +assert buildLog.text.contains( 'Started Server' ) assert buildLog.text.contains( 'Running org.eclipse.jetty.maven.plugin.it.TestGetContent') -assert buildLog.text.contains( 'contentCheck') \ No newline at end of file +assert buildLog.text.contains( 'contentCheck') diff --git a/jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/jetty-simple-webapp/src/config/jetty.xml b/jetty-maven-plugin/src/it/jetty-start-war-mojo-it/src/config/jetty.xml similarity index 100% rename from jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/jetty-simple-webapp/src/config/jetty.xml rename to jetty-maven-plugin/src/it/jetty-start-war-mojo-it/src/config/jetty.xml diff --git a/jetty-maven-plugin/src/it/run-mojo-gwt-it/beer-server/pom.xml b/jetty-maven-plugin/src/it/run-mojo-gwt-it/beer-server/pom.xml index 1417ac27263..72170630fa3 100644 --- a/jetty-maven-plugin/src/it/run-mojo-gwt-it/beer-server/pom.xml +++ b/jetty-maven-plugin/src/it/run-mojo-gwt-it/beer-server/pom.xml @@ -13,6 +13,7 @@ ${project.build.directory}/jetty-run-mojo.txt + EMBED @@ -89,18 +90,16 @@ run test-compile - run + newrun - - jetty.port.file - ${jetty.port.file} - + ${jetty.port.file} - true ${basedir}/src/main/jettyconf/context.xml - ${basedir}/src/config/jetty.xml + + ${basedir}/src/config/jetty.xml + diff --git a/jetty-maven-plugin/src/it/run-mojo-gwt-it/postbuild.groovy b/jetty-maven-plugin/src/it/run-mojo-gwt-it/postbuild.groovy index b5f4344c4a6..d70b253e946 100644 --- a/jetty-maven-plugin/src/it/run-mojo-gwt-it/postbuild.groovy +++ b/jetty-maven-plugin/src/it/run-mojo-gwt-it/postbuild.groovy @@ -17,6 +17,6 @@ * under the License. */ File buildLog = new File( basedir, 'build.log' ) -assert buildLog.text.contains( 'Started Jetty Server' ) +assert buildLog.text.contains( 'Started Server' ) assert buildLog.text.contains( 'Running org.eclipse.jetty.maven.plugin.it.TestGetContent') -assert buildLog.text.contains( 'contentCheck') \ No newline at end of file +assert buildLog.text.contains( 'contentCheck') diff --git a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/AbstractWebAppMojo.java b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/AbstractWebAppMojo.java index 84c640ec865..2f0c3e3ff27 100644 --- a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/AbstractWebAppMojo.java +++ b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/AbstractWebAppMojo.java @@ -1140,6 +1140,7 @@ public abstract class AbstractWebAppMojo extends AbstractMojo //the former could be the location of a packed war, while the latter is the location //after any unpacking. With this mojo, you are running an unpacked, unassembled webapp, //so the two locations should be equal. + System.err.println("SRC WEBAPP: "+webAppSourceDirectory); Resource webAppSourceDirectoryResource = Resource.newResource(webAppSourceDirectory.getCanonicalPath()); if (webApp.getWar() == null) webApp.setWar(webAppSourceDirectoryResource.toString()); diff --git a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/NewJettyRunWarMojo.java b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/NewJettyRunWarMojo.java index 80382e67c60..c271ac067f0 100644 --- a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/NewJettyRunWarMojo.java +++ b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/NewJettyRunWarMojo.java @@ -51,7 +51,7 @@ import org.eclipse.jetty.util.StringUtil; @Execute(phase = LifecyclePhase.PACKAGE) public class NewJettyRunWarMojo extends AbstractWebAppMojo { - //Start of parameters only valid for runType=inprocess + //Start of parameters only valid for runType=EMBED /** * The interval in seconds to pause before checking if changes * have occurred and re-deploying as necessary. A value diff --git a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/NewJettyDeployMojo.java b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/NewJettyStartWarMojo.java similarity index 94% rename from jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/NewJettyDeployMojo.java rename to jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/NewJettyStartWarMojo.java index f52430d2448..d757cf1a6e9 100644 --- a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/NewJettyDeployMojo.java +++ b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/NewJettyStartWarMojo.java @@ -44,8 +44,8 @@ import org.eclipse.jetty.util.StringUtil; * HTTP client components via binding to the test-integration build phase. *

*/ -@Mojo(name = "newdeploy", requiresDependencyResolution = ResolutionScope.RUNTIME) -public class NewJettyDeployMojo extends AbstractWebAppMojo +@Mojo(name = "newstart-war", requiresDependencyResolution = ResolutionScope.RUNTIME) +public class NewJettyStartWarMojo extends AbstractWebAppMojo { protected JettyEmbedder embedder; protected JettyForker forker; @@ -55,10 +55,10 @@ public class NewJettyDeployMojo extends AbstractWebAppMojo @Override public void configureWebApp() throws Exception { - if (StringUtil.isBlank(webApp.getWar())) - throw new MojoExecutionException("No war specified"); - super.configureWebApp(); + if (StringUtil.isBlank(webApp.getWar())) + configureUnassembledWebApp(); + getLog().info("War = "+webApp.getWar()); } @@ -92,7 +92,7 @@ public class NewJettyDeployMojo extends AbstractWebAppMojo { forker = newJettyForker(); forker.setWaitForChild(false); //we never wait for child - forker.setJettyOutputFile(getJettyOutputFile("jetty-deploy.out")); + forker.setJettyOutputFile(getJettyOutputFile("jetty-start-war.out")); forker.start(); //forks jetty instance } @@ -112,7 +112,7 @@ public class NewJettyDeployMojo extends AbstractWebAppMojo { distroForker = newJettyDistroForker(); distroForker.setWaitForChild(false); //never wait for child - distroForker.setJettyOutputFile(getJettyOutputFile("jetty-deploy.out")); + distroForker.setJettyOutputFile(getJettyOutputFile("jetty-start-war.out")); distroForker.start(); //forks a jetty distro } catch (Exception e)