diff --git a/jetty-maven-plugin/src/it/jetty-cdi-run-forked/verify.groovy b/jetty-maven-plugin/src/it/jetty-cdi-run-forked/verify.groovy new file mode 100644 index 00000000000..b6658aabeec --- /dev/null +++ b/jetty-maven-plugin/src/it/jetty-cdi-run-forked/verify.groovy @@ -0,0 +1,21 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +File buildLog = new File( basedir, 'build.log' ) +assert buildLog.text.contains( 'Forked process starting' ) +assert buildLog.text.contains( 'Running test.TestGetContent') \ No newline at end of file diff --git a/jetty-maven-plugin/src/it/jetty-deploy-war-mojo-it/pom.xml b/jetty-maven-plugin/src/it/jetty-deploy-war-mojo-it/pom.xml index d654bf0a736..c048789de8d 100644 --- a/jetty-maven-plugin/src/it/jetty-deploy-war-mojo-it/pom.xml +++ b/jetty-maven-plugin/src/it/jetty-deploy-war-mojo-it/pom.xml @@ -6,6 +6,7 @@ org.eclipse.jetty.its.jetty-deploy-war-mojo-it jetty-simple-project 0.0.1-SNAPSHOT + jar Jetty :: Simple deploy war mojo test @@ -61,7 +62,7 @@ ${jetty.port.file} - **/*TestHelloServlet* + **/*TestGetContent* @@ -91,6 +92,9 @@ deploy-war + + pom + ${project.build.directory}/bean-validation-webapp-2.25.1.war true diff --git a/jetty-maven-plugin/src/it/jetty-deploy-war-mojo-it/verify.groovy b/jetty-maven-plugin/src/it/jetty-deploy-war-mojo-it/verify.groovy new file mode 100644 index 00000000000..cf5abbfb416 --- /dev/null +++ b/jetty-maven-plugin/src/it/jetty-deploy-war-mojo-it/verify.groovy @@ -0,0 +1,21 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * 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.its.jetty_run_war_mojo_it.TestGetContent') \ No newline at end of file diff --git a/jetty-maven-plugin/src/it/jetty-run-distro-mojo-it/verify.groovy b/jetty-maven-plugin/src/it/jetty-run-distro-mojo-it/verify.groovy new file mode 100644 index 00000000000..8cbf3cc0283 --- /dev/null +++ b/jetty-maven-plugin/src/it/jetty-run-distro-mojo-it/verify.groovy @@ -0,0 +1,21 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +File buildLog = new File( basedir, 'build.log' ) +assert buildLog.text.contains( 'Forking command line' ) +assert buildLog.text.contains( 'org.eclipse.jetty.its.jetty_run_distro_mojo_it.TestGetContent') \ No newline at end of file diff --git a/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/verify.groovy b/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/verify.groovy new file mode 100644 index 00000000000..e87b398c6ef --- /dev/null +++ b/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/verify.groovy @@ -0,0 +1,21 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +File buildLog = new File( basedir, 'build.log' ) +assert buildLog.text.contains( 'Forked process starting' ) +assert buildLog.text.contains( 'org.eclipse.jetty.its.jetty_run_forked_mojo_it.TestGetContent') \ No newline at end of file diff --git a/jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-webapp/src/test/java/org/eclipse/jetty/its/jetty_run_mojo_it/TestGetContent.java b/jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-webapp/src/test/java/org/eclipse/jetty/its/jetty_run_mojo_it/TestGetContent.java index a0da6ee489c..298262cac09 100644 --- a/jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-webapp/src/test/java/org/eclipse/jetty/its/jetty_run_mojo_it/TestGetContent.java +++ b/jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-webapp/src/test/java/org/eclipse/jetty/its/jetty_run_mojo_it/TestGetContent.java @@ -16,7 +16,7 @@ // ======================================================================== // -package org.eclipse.jetty.its.jetty_run_forked_mojo_it; +package org.eclipse.jetty.its.jetty_run_mojo_it; import java.io.File; import java.io.FileReader; diff --git a/jetty-maven-plugin/src/it/jetty-run-mojo-it/verify.groovy b/jetty-maven-plugin/src/it/jetty-run-mojo-it/verify.groovy new file mode 100644 index 00000000000..19583fe2eac --- /dev/null +++ b/jetty-maven-plugin/src/it/jetty-run-mojo-it/verify.groovy @@ -0,0 +1,21 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * 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( 'org.eclipse.jetty.its.jetty_run_mojo_it.TestGetContent') \ No newline at end of file diff --git a/jetty-maven-plugin/src/it/jetty-run-package-jar-mojo-it/invoker.properties b/jetty-maven-plugin/src/it/jetty-run-package-jar-mojo-it/invoker.properties deleted file mode 100644 index b8a016f5093..00000000000 --- a/jetty-maven-plugin/src/it/jetty-run-package-jar-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-package-jar-mojo-it/jetty-simple-base/pom.xml b/jetty-maven-plugin/src/it/jetty-run-package-jar-mojo-it/jetty-simple-base/pom.xml deleted file mode 100644 index d959259ea9a..00000000000 --- a/jetty-maven-plugin/src/it/jetty-run-package-jar-mojo-it/jetty-simple-base/pom.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - 4.0.0 - - - org.eclipse.jetty.its.jetty-run-package-jar-mojo-it - jetty-simple-project - 0.0.1-SNAPSHOT - - - jetty-simple-base - jar - - Jetty :: Simple :: Base - - - - - javax.servlet - javax.servlet-api - jar - provided - - - - org.slf4j - slf4j-api - - - - commons-io - commons-io - - - - org.eclipse.jetty.toolchain - jetty-perf-helper - 1.0.5 - - - - com.fasterxml.jackson.core - jackson-databind - 2.8.1 - - - - - diff --git a/jetty-maven-plugin/src/it/jetty-run-package-jar-mojo-it/jetty-simple-base/src/main/java/org/eclipse/jetty/its/jetty_run_mojo_it/HelloServlet.java b/jetty-maven-plugin/src/it/jetty-run-package-jar-mojo-it/jetty-simple-base/src/main/java/org/eclipse/jetty/its/jetty_run_mojo_it/HelloServlet.java deleted file mode 100644 index 812cf60aa2e..00000000000 --- a/jetty-maven-plugin/src/it/jetty-run-package-jar-mojo-it/jetty-simple-base/src/main/java/org/eclipse/jetty/its/jetty_run_mojo_it/HelloServlet.java +++ /dev/null @@ -1,45 +0,0 @@ -// -// ======================================================================== -// Copyright (c) 1995-2018 Mort Bay Consulting Pty. Ltd. -// ------------------------------------------------------------------------ -// All rights reserved. This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v1.0 -// and Apache License v2.0 which accompanies this distribution. -// -// The Eclipse Public License is available at -// http://www.eclipse.org/legal/epl-v10.html -// -// The Apache License v2.0 is available at -// http://www.opensource.org/licenses/apache2.0.php -// -// You may elect to redistribute this code under either of these licenses. -// ======================================================================== -// - - -package org.eclipse.jetty.its.jetty_run_mojo_it; - -import javax.servlet.ServletException; -import javax.servlet.annotation.WebServlet; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; - -/** - * - */ -@WebServlet("/hello") -public class HelloServlet - extends HttpServlet -{ - - @Override - protected void doGet( HttpServletRequest req, HttpServletResponse resp ) - throws ServletException, IOException - { - String who = req.getParameter( "name" ); - - resp.getWriter().write( "hello " + (who == null ? "unknown" : who) ); - } -} diff --git a/jetty-maven-plugin/src/it/jetty-run-package-jar-mojo-it/jetty-simple-base/src/main/java/org/eclipse/jetty/its/jetty_run_mojo_it/PingServlet.java b/jetty-maven-plugin/src/it/jetty-run-package-jar-mojo-it/jetty-simple-base/src/main/java/org/eclipse/jetty/its/jetty_run_mojo_it/PingServlet.java deleted file mode 100644 index dc1d723151f..00000000000 --- a/jetty-maven-plugin/src/it/jetty-run-package-jar-mojo-it/jetty-simple-base/src/main/java/org/eclipse/jetty/its/jetty_run_mojo_it/PingServlet.java +++ /dev/null @@ -1,41 +0,0 @@ -// -// ======================================================================== -// Copyright (c) 1995-2018 Mort Bay Consulting Pty. Ltd. -// ------------------------------------------------------------------------ -// All rights reserved. This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v1.0 -// and Apache License v2.0 which accompanies this distribution. -// -// The Eclipse Public License is available at -// http://www.eclipse.org/legal/epl-v10.html -// -// The Apache License v2.0 is available at -// http://www.opensource.org/licenses/apache2.0.php -// -// You may elect to redistribute this code under either of these licenses. -// ======================================================================== -// - - -package org.eclipse.jetty.its.jetty_run_mojo_it; - -import javax.servlet.ServletException; -import javax.servlet.annotation.WebServlet; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; - -public class PingServlet - extends HttpServlet -{ - - @Override - protected void doGet( HttpServletRequest req, HttpServletResponse resp ) - throws ServletException, IOException - { - String who = req.getParameter( "name" ); - - resp.getWriter().write( "pong " + (who == null ? "unknown" : who) ); - } -} diff --git a/jetty-maven-plugin/src/it/jetty-run-package-jar-mojo-it/jetty-simple-base/src/main/resources/META-INF/web-fragment.xml b/jetty-maven-plugin/src/it/jetty-run-package-jar-mojo-it/jetty-simple-base/src/main/resources/META-INF/web-fragment.xml deleted file mode 100644 index a1ec4e27ce4..00000000000 --- a/jetty-maven-plugin/src/it/jetty-run-package-jar-mojo-it/jetty-simple-base/src/main/resources/META-INF/web-fragment.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - FragmentA - - - - - - - Ping - org.eclipse.jetty.its.jetty_run_mojo_it.PingServlet - - extra1123 - - - extra2345 - - - - - Ping - /ping - - - - \ No newline at end of file diff --git a/jetty-maven-plugin/src/it/jetty-run-package-jar-mojo-it/jetty-simple-webapp/pom.xml b/jetty-maven-plugin/src/it/jetty-run-package-jar-mojo-it/jetty-simple-webapp/pom.xml deleted file mode 100644 index 01c526f11a7..00000000000 --- a/jetty-maven-plugin/src/it/jetty-run-package-jar-mojo-it/jetty-simple-webapp/pom.xml +++ /dev/null @@ -1,122 +0,0 @@ - - - 4.0.0 - - - org.eclipse.jetty.its.jetty-run-package-jar-mojo-it - jetty-simple-project - 0.0.1-SNAPSHOT - - - jetty-simple-webapp - jar - - Jetty :: Simple :: Webapp as a Jar - - - - ${project.build.directory}/jetty-run-war-port.txt - - - - - - - org.eclipse.jetty.its.jetty-run-package-jar-mojo-it - jetty-simple-base - - - - org.eclipse.jetty - jetty-servlet - provided - - - - org.eclipse.jetty - jetty-client - @project.version@ - test - - - - junit - junit - 4.12 - test - - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - @surefireVersion@ - - true - - ${jetty.port.file} - - - - - org.apache.maven.plugins - maven-failsafe-plugin - @surefireVersion@ - - - ${jetty.port.file} - - - **/*TestHelloServlet* - - - - - integration-test - - integration-test - - - - verify - - verify - - - - - - org.eclipse.jetty - jetty-maven-plugin - - - start-jetty - test-compile - - run-war - - - - jar - - true - - - jetty.port.file - ${jetty.port.file} - - - ${basedir}/src/config/jetty.xml - - - - - - - - - diff --git a/jetty-maven-plugin/src/it/jetty-run-package-jar-mojo-it/jetty-simple-webapp/src/config/jetty.xml b/jetty-maven-plugin/src/it/jetty-run-package-jar-mojo-it/jetty-simple-webapp/src/config/jetty.xml deleted file mode 100644 index c38bcced0e1..00000000000 --- a/jetty-maven-plugin/src/it/jetty-run-package-jar-mojo-it/jetty-simple-webapp/src/config/jetty.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - https - - 32768 - 8192 - 8192 - 512 - - - - - - - - - - - - - - - - - - - - - - - - 0 - 30000 - - - - diff --git a/jetty-maven-plugin/src/it/jetty-run-package-jar-mojo-it/jetty-simple-webapp/src/main/webapp/WEB-INF/web.xml b/jetty-maven-plugin/src/it/jetty-run-package-jar-mojo-it/jetty-simple-webapp/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 2a5ac4b71bf..00000000000 --- a/jetty-maven-plugin/src/it/jetty-run-package-jar-mojo-it/jetty-simple-webapp/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - Jetty Simple Webapp run-mojo-it - diff --git a/jetty-maven-plugin/src/it/jetty-run-package-jar-mojo-it/jetty-simple-webapp/src/test/java/org/eclipse/jetty/its/jetty_run_war_mojo_it/TestGetContent.java b/jetty-maven-plugin/src/it/jetty-run-package-jar-mojo-it/jetty-simple-webapp/src/test/java/org/eclipse/jetty/its/jetty_run_war_mojo_it/TestGetContent.java deleted file mode 100644 index a0da6ee489c..00000000000 --- a/jetty-maven-plugin/src/it/jetty-run-package-jar-mojo-it/jetty-simple-webapp/src/test/java/org/eclipse/jetty/its/jetty_run_war_mojo_it/TestGetContent.java +++ /dev/null @@ -1,94 +0,0 @@ -// -// ======================================================================== -// Copyright (c) 1995-2018 Mort Bay Consulting Pty. Ltd. -// ------------------------------------------------------------------------ -// All rights reserved. This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v1.0 -// and Apache License v2.0 which accompanies this distribution. -// -// The Eclipse Public License is available at -// http://www.eclipse.org/legal/epl-v10.html -// -// The Apache License v2.0 is available at -// http://www.opensource.org/licenses/apache2.0.php -// -// You may elect to redistribute this code under either of these licenses. -// ======================================================================== -// - -package org.eclipse.jetty.its.jetty_run_forked_mojo_it; - -import java.io.File; -import java.io.FileReader; -import java.io.LineNumberReader; - -import org.eclipse.jetty.client.HttpClient; -import org.junit.Assert; -import org.junit.Test; - -/** - * - */ -public class TestGetContent - -{ - @Test - public void get_ping_response() - throws Exception - { - - int port = getPort(); - Assert.assertTrue(port > 0); - HttpClient httpClient = new HttpClient(); - try - { - httpClient.start(); - - String response = httpClient.GET( "http://localhost:" + port + "/hello?name=beer" ).getContentAsString(); - - Assert.assertEquals( "hello beer", response.trim() ); - - response = httpClient.GET( "http://localhost:" + port + "/ping?name=beer" ).getContentAsString(); - - Assert.assertEquals( "pong beer", response.trim() ); - } - finally - { - httpClient.stop(); - } - } - - - public int getPort() - throws Exception - { - int attempts = 20; - int port = -1; - String s = System.getProperty("jetty.port.file"); - Assert.assertNotNull(s); - File f = new File(s); - while (true) - { - if (f.exists()) - { - try (FileReader r = new FileReader(f); - LineNumberReader lnr = new LineNumberReader(r); - ) - { - s = lnr.readLine(); - Assert.assertNotNull(s); - port = Integer.parseInt(s.trim()); - } - break; - } - else - { - if (--attempts < 0) - break; - else - Thread.currentThread().sleep(100); - } - } - return port; - } -} diff --git a/jetty-maven-plugin/src/it/jetty-run-package-jar-mojo-it/pom.xml b/jetty-maven-plugin/src/it/jetty-run-package-jar-mojo-it/pom.xml deleted file mode 100644 index 4aa1e74b9aa..00000000000 --- a/jetty-maven-plugin/src/it/jetty-run-package-jar-mojo-it/pom.xml +++ /dev/null @@ -1,85 +0,0 @@ - - - 4.0.0 - - org.eclipse.jetty.its.jetty-run-package-jar-mojo-it - jetty-simple-project - 0.0.1-SNAPSHOT - pom - - Jetty :: Simple - - - UTF-8 - UTF-8 - 1.8 - 3.0.0 - @project.version@ - - - - jetty-simple-base - jetty-simple-webapp - - - - - - - org.eclipse.jetty.its.jetty-run-package-jar-mojo-it - jetty-simple-base - ${project.version} - - - - javax.servlet - javax.servlet-api - 3.1.0 - jar - provided - - - - org.slf4j - slf4j-api - 1.7.21 - - - - commons-io - commons-io - 2.5 - - - - org.eclipse.jetty - jetty-servlet - ${jetty.version} - - - - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.5.1 - - 1.8 - 1.8 - - - - org.eclipse.jetty - jetty-maven-plugin - ${jetty.version} - - - - - - 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-run-war-exploded-mojo-it/jetty-simple-webapp/pom.xml index 3b433d1d6a2..770b3c1b2ba 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-run-war-exploded-mojo-it/jetty-simple-webapp/pom.xml @@ -81,7 +81,7 @@ ${jetty.port.file} - **/*TestHelloServlet* + **/*TestGetContent* diff --git a/jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/jetty-simple-webapp/src/test/java/org/eclipse/jetty/its/jetty_run_war_exploded_mojo_it/TestGetContent.java b/jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/jetty-simple-webapp/src/test/java/org/eclipse/jetty/its/jetty_run_war_exploded_mojo_it/TestGetContent.java index a0da6ee489c..06bfd2c109c 100644 --- a/jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/jetty-simple-webapp/src/test/java/org/eclipse/jetty/its/jetty_run_war_exploded_mojo_it/TestGetContent.java +++ b/jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/jetty-simple-webapp/src/test/java/org/eclipse/jetty/its/jetty_run_war_exploded_mojo_it/TestGetContent.java @@ -16,7 +16,7 @@ // ======================================================================== // -package org.eclipse.jetty.its.jetty_run_forked_mojo_it; +package org.eclipse.jetty.its.jetty_run_war_exploded_mojo_it; import java.io.File; import java.io.FileReader; diff --git a/jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/verify.groovy b/jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/verify.groovy new file mode 100644 index 00000000000..02aa23ef304 --- /dev/null +++ b/jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/verify.groovy @@ -0,0 +1,21 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * 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( 'org.eclipse.jetty.its.jetty_run_war_exploded_mojo_it.TestGetContent') \ No newline at end of file diff --git a/jetty-maven-plugin/src/it/jetty-run-war-mojo-it/jetty-simple-webapp/pom.xml b/jetty-maven-plugin/src/it/jetty-run-war-mojo-it/jetty-simple-webapp/pom.xml index 7126b33630b..7ca5716eda8 100644 --- a/jetty-maven-plugin/src/it/jetty-run-war-mojo-it/jetty-simple-webapp/pom.xml +++ b/jetty-maven-plugin/src/it/jetty-run-war-mojo-it/jetty-simple-webapp/pom.xml @@ -83,7 +83,7 @@ ${jetty.port.file} - **/*TestHelloServlet* + **/*TestGetContent* diff --git a/jetty-maven-plugin/src/it/jetty-run-war-mojo-it/jetty-simple-webapp/src/test/java/org/eclipse/jetty/its/jetty_run_war_mojo_it/TestGetContent.java b/jetty-maven-plugin/src/it/jetty-run-war-mojo-it/jetty-simple-webapp/src/test/java/org/eclipse/jetty/its/jetty_run_war_mojo_it/TestGetContent.java index a0da6ee489c..09a9d4abb79 100644 --- a/jetty-maven-plugin/src/it/jetty-run-war-mojo-it/jetty-simple-webapp/src/test/java/org/eclipse/jetty/its/jetty_run_war_mojo_it/TestGetContent.java +++ b/jetty-maven-plugin/src/it/jetty-run-war-mojo-it/jetty-simple-webapp/src/test/java/org/eclipse/jetty/its/jetty_run_war_mojo_it/TestGetContent.java @@ -16,7 +16,7 @@ // ======================================================================== // -package org.eclipse.jetty.its.jetty_run_forked_mojo_it; +package org.eclipse.jetty.its.jetty_run_war_mojo_it; import java.io.File; import java.io.FileReader; diff --git a/jetty-maven-plugin/src/it/jetty-run-war-mojo-it/verify.groovy b/jetty-maven-plugin/src/it/jetty-run-war-mojo-it/verify.groovy new file mode 100644 index 00000000000..6e5bbbaa2e0 --- /dev/null +++ b/jetty-maven-plugin/src/it/jetty-run-war-mojo-it/verify.groovy @@ -0,0 +1,21 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * 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( 'org.eclipse.jetty.its.jetty_run_war_mojo_it.TestGetContent') \ No newline at end of file diff --git a/jetty-maven-plugin/src/it/jetty-start-mojo-it/verify.groovy b/jetty-maven-plugin/src/it/jetty-start-mojo-it/verify.groovy new file mode 100644 index 00000000000..960c599f90c --- /dev/null +++ b/jetty-maven-plugin/src/it/jetty-start-mojo-it/verify.groovy @@ -0,0 +1,20 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +File buildLog = new File( basedir, 'build.log' ) +assert buildLog.text.contains( 'Started Jetty Server' ) \ No newline at end of file diff --git a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyDeployWar.java b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyDeployWar.java index 8477b175edc..bc608a2bc9e 100644 --- a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyDeployWar.java +++ b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyDeployWar.java @@ -68,6 +68,7 @@ public class JettyDeployWar extends JettyRunWarMojo } + @Override public void finishConfigurationBeforeStart() throws Exception {