From 6f2f599b17209e117d5f3e582dd36340a4495efa Mon Sep 17 00:00:00 2001 From: Jan Bartel Date: Mon, 13 May 2024 01:44:13 +0200 Subject: [PATCH] Issue #11761 fix jetty maven doco and integration test (#11771) * Issue #11761 fix jetty maven doco and integration test --- .../maven/jetty-maven-plugin.adoc | 4 +++- .../jetty-ee10-demo-jetty-webapp/pom.xml | 4 +++- .../jetty-ee10-demo-spec-webapp/pom.xml | 4 +++- .../jetty-simple-webapp/pom.xml | 3 ++- .../config/{login.xml => realm.properties} | 0 .../src/main/webapp/WEB-INF/web.xml | 20 +++++++++++++++++++ .../src/main/webapp/auth/index.html | 3 +++ .../src/main/webapp/logon.html | 20 +++++++++++++++++++ .../src/main/webapp/logonError.html | 4 ++++ .../jetty-ee8-demo-jetty-webapp/pom.xml | 4 +++- .../jetty-ee8-demo-spec-webapp/pom.xml | 4 +++- .../jetty-simple-webapp/pom.xml | 3 ++- .../config/{login.xml => realm.properties} | 0 .../src/main/webapp/WEB-INF/web.xml | 20 +++++++++++++++++++ .../src/main/webapp/auth/index.html | 3 +++ .../src/main/webapp/logon.html | 20 +++++++++++++++++++ .../src/main/webapp/logonError.html | 4 ++++ .../jetty-ee9-demo-jetty-webapp/pom.xml | 4 +++- .../jetty-ee9-demo-spec-webapp/pom.xml | 4 +++- .../jetty-simple-webapp/pom.xml | 3 ++- .../config/{login.xml => realm.properties} | 0 .../src/main/webapp/WEB-INF/web.xml | 20 +++++++++++++++++++ .../src/main/webapp/auth/index.html | 3 +++ .../src/main/webapp/logon.html | 20 +++++++++++++++++++ .../src/main/webapp/logonError.html | 4 ++++ 25 files changed, 168 insertions(+), 10 deletions(-) rename jetty-ee10/jetty-ee10-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/config/{login.xml => realm.properties} (100%) create mode 100644 jetty-ee10/jetty-ee10-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/main/webapp/auth/index.html create mode 100644 jetty-ee10/jetty-ee10-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/main/webapp/logon.html create mode 100644 jetty-ee10/jetty-ee10-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/main/webapp/logonError.html rename jetty-ee8/jetty-ee8-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/config/{login.xml => realm.properties} (100%) create mode 100644 jetty-ee8/jetty-ee8-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/main/webapp/auth/index.html create mode 100644 jetty-ee8/jetty-ee8-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/main/webapp/logon.html create mode 100644 jetty-ee8/jetty-ee8-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/main/webapp/logonError.html rename jetty-ee9/jetty-ee9-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/config/{login.xml => realm.properties} (100%) create mode 100644 jetty-ee9/jetty-ee9-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/main/webapp/auth/index.html create mode 100644 jetty-ee9/jetty-ee9-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/main/webapp/logon.html create mode 100644 jetty-ee9/jetty-ee9-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/main/webapp/logonError.html diff --git a/documentation/jetty-documentation/src/main/asciidoc/programming-guide/maven/jetty-maven-plugin.adoc b/documentation/jetty-documentation/src/main/asciidoc/programming-guide/maven/jetty-maven-plugin.adoc index c19fea9d059..855d9473657 100644 --- a/documentation/jetty-documentation/src/main/asciidoc/programming-guide/maven/jetty-maven-plugin.adoc +++ b/documentation/jetty-documentation/src/main/asciidoc/programming-guide/maven/jetty-maven-plugin.adoc @@ -954,7 +954,9 @@ Here's an example of setting up the `HashLoginService` for a webapp: Test Realm - ${project.basedir}/src/etc/realm.properties + + ${basedir}/src/etc/realm.properties + diff --git a/jetty-ee10/jetty-ee10-demos/jetty-ee10-demo-jetty-webapp/pom.xml b/jetty-ee10/jetty-ee10-demos/jetty-ee10-demo-jetty-webapp/pom.xml index 6a55a422d32..f91702d2e91 100644 --- a/jetty-ee10/jetty-ee10-demos/jetty-ee10-demo-jetty-webapp/pom.xml +++ b/jetty-ee10/jetty-ee10-demos/jetty-ee10-demo-jetty-webapp/pom.xml @@ -105,7 +105,9 @@ Test Realm - src/test/resources/test-realm.properties + + src/test/resources/test-realm.properties + diff --git a/jetty-ee10/jetty-ee10-demos/jetty-ee10-demo-spec/jetty-ee10-demo-spec-webapp/pom.xml b/jetty-ee10/jetty-ee10-demos/jetty-ee10-demo-spec/jetty-ee10-demo-spec-webapp/pom.xml index 3f0a9f44605..36f354e1468 100644 --- a/jetty-ee10/jetty-ee10-demos/jetty-ee10-demo-spec/jetty-ee10-demo-spec-webapp/pom.xml +++ b/jetty-ee10/jetty-ee10-demos/jetty-ee10-demo-spec/jetty-ee10-demo-spec-webapp/pom.xml @@ -85,7 +85,9 @@ Test Realm - src/etc/realm.properties + + src/etc/realm.properties + diff --git a/jetty-ee10/jetty-ee10-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/pom.xml b/jetty-ee10/jetty-ee10-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/pom.xml index 521f49c0d94..328c5ca6cff 100644 --- a/jetty-ee10/jetty-ee10-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/pom.xml +++ b/jetty-ee10/jetty-ee10-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/pom.xml @@ -112,8 +112,9 @@ + Test Realm - ${basedir}/src/config/login.xml + ${basedir}/src/config/realm.properties diff --git a/jetty-ee10/jetty-ee10-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/config/login.xml b/jetty-ee10/jetty-ee10-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/config/realm.properties similarity index 100% rename from jetty-ee10/jetty-ee10-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/config/login.xml rename to jetty-ee10/jetty-ee10-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/config/realm.properties diff --git a/jetty-ee10/jetty-ee10-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/main/webapp/WEB-INF/web.xml b/jetty-ee10/jetty-ee10-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/main/webapp/WEB-INF/web.xml index 2a5ac4b71bf..dd5eabf4a70 100644 --- a/jetty-ee10/jetty-ee10-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/main/webapp/WEB-INF/web.xml +++ b/jetty-ee10/jetty-ee10-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/main/webapp/WEB-INF/web.xml @@ -4,4 +4,24 @@ xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" version="3.1"> Jetty Simple Webapp run-mojo-it + + + + Any Authenticated User + /auth/* + + + * + + + + + FORM + Test Realm + + /logon.html?param=test + /logonError.html?param=test + + + diff --git a/jetty-ee10/jetty-ee10-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/main/webapp/auth/index.html b/jetty-ee10/jetty-ee10-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/main/webapp/auth/index.html new file mode 100644 index 00000000000..c8f12155737 --- /dev/null +++ b/jetty-ee10/jetty-ee10-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/main/webapp/auth/index.html @@ -0,0 +1,3 @@ + +

Authenticated

+ diff --git a/jetty-ee10/jetty-ee10-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/main/webapp/logon.html b/jetty-ee10/jetty-ee10-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/main/webapp/logon.html new file mode 100644 index 00000000000..6bededa576d --- /dev/null +++ b/jetty-ee10/jetty-ee10-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/main/webapp/logon.html @@ -0,0 +1,20 @@ + +

FORM Authentication demo

+
+ + + + + + + + + + + + +
Username:
Password:
+ +
+
+ \ No newline at end of file diff --git a/jetty-ee10/jetty-ee10-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/main/webapp/logonError.html b/jetty-ee10/jetty-ee10-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/main/webapp/logonError.html new file mode 100644 index 00000000000..66a83869061 --- /dev/null +++ b/jetty-ee10/jetty-ee10-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/main/webapp/logonError.html @@ -0,0 +1,4 @@ + +

Authentication ERROR

+Username, password or role incorrect. + diff --git a/jetty-ee8/jetty-ee8-demos/jetty-ee8-demo-jetty-webapp/pom.xml b/jetty-ee8/jetty-ee8-demos/jetty-ee8-demo-jetty-webapp/pom.xml index eefdb612b9b..8754eafe188 100644 --- a/jetty-ee8/jetty-ee8-demos/jetty-ee8-demo-jetty-webapp/pom.xml +++ b/jetty-ee8/jetty-ee8-demos/jetty-ee8-demo-jetty-webapp/pom.xml @@ -101,7 +101,9 @@ Test Realm - ${project.build.testOutputDirectory}/test-realm.properties + + ${project.build.testOutputDirectory}/test-realm.properties + diff --git a/jetty-ee8/jetty-ee8-demos/jetty-ee8-demo-spec/jetty-ee8-demo-spec-webapp/pom.xml b/jetty-ee8/jetty-ee8-demos/jetty-ee8-demo-spec/jetty-ee8-demo-spec-webapp/pom.xml index 10049122d9e..401f58c26f6 100644 --- a/jetty-ee8/jetty-ee8-demos/jetty-ee8-demo-spec/jetty-ee8-demo-spec-webapp/pom.xml +++ b/jetty-ee8/jetty-ee8-demos/jetty-ee8-demo-spec/jetty-ee8-demo-spec-webapp/pom.xml @@ -61,7 +61,9 @@ Test Realm - ${project.build.directory}/realm.properties + + ${project.build.directory}/realm.properties + diff --git a/jetty-ee8/jetty-ee8-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/pom.xml b/jetty-ee8/jetty-ee8-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/pom.xml index 94439d89a51..3e81fd0f5c7 100644 --- a/jetty-ee8/jetty-ee8-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/pom.xml +++ b/jetty-ee8/jetty-ee8-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/pom.xml @@ -140,8 +140,9 @@ + Test Realm - ${basedir}/src/config/login.xml + ${basedir}/src/config/realm.properties diff --git a/jetty-ee8/jetty-ee8-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/config/login.xml b/jetty-ee8/jetty-ee8-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/config/realm.properties similarity index 100% rename from jetty-ee8/jetty-ee8-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/config/login.xml rename to jetty-ee8/jetty-ee8-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/config/realm.properties diff --git a/jetty-ee8/jetty-ee8-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/main/webapp/WEB-INF/web.xml b/jetty-ee8/jetty-ee8-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/main/webapp/WEB-INF/web.xml index 2a5ac4b71bf..fb11917c5aa 100644 --- a/jetty-ee8/jetty-ee8-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/main/webapp/WEB-INF/web.xml +++ b/jetty-ee8/jetty-ee8-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/main/webapp/WEB-INF/web.xml @@ -4,4 +4,24 @@ xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" version="3.1"> Jetty Simple Webapp run-mojo-it + + + + Any Authenticated User + /auth/* + + + * + + + + + FORM + Test Realm + + /logon.html?param=test + /logonError.html?param=test + + + diff --git a/jetty-ee8/jetty-ee8-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/main/webapp/auth/index.html b/jetty-ee8/jetty-ee8-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/main/webapp/auth/index.html new file mode 100644 index 00000000000..c8f12155737 --- /dev/null +++ b/jetty-ee8/jetty-ee8-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/main/webapp/auth/index.html @@ -0,0 +1,3 @@ + +

Authenticated

+ diff --git a/jetty-ee8/jetty-ee8-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/main/webapp/logon.html b/jetty-ee8/jetty-ee8-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/main/webapp/logon.html new file mode 100644 index 00000000000..6bededa576d --- /dev/null +++ b/jetty-ee8/jetty-ee8-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/main/webapp/logon.html @@ -0,0 +1,20 @@ + +

FORM Authentication demo

+
+ + + + + + + + + + + + +
Username:
Password:
+ +
+
+ \ No newline at end of file diff --git a/jetty-ee8/jetty-ee8-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/main/webapp/logonError.html b/jetty-ee8/jetty-ee8-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/main/webapp/logonError.html new file mode 100644 index 00000000000..66a83869061 --- /dev/null +++ b/jetty-ee8/jetty-ee8-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/main/webapp/logonError.html @@ -0,0 +1,4 @@ + +

Authentication ERROR

+Username, password or role incorrect. + diff --git a/jetty-ee9/jetty-ee9-demos/jetty-ee9-demo-jetty-webapp/pom.xml b/jetty-ee9/jetty-ee9-demos/jetty-ee9-demo-jetty-webapp/pom.xml index 85621433573..8ba0fc74c4f 100644 --- a/jetty-ee9/jetty-ee9-demos/jetty-ee9-demo-jetty-webapp/pom.xml +++ b/jetty-ee9/jetty-ee9-demos/jetty-ee9-demo-jetty-webapp/pom.xml @@ -111,7 +111,9 @@ Test Realm - src/test/resources/test-realm.properties + + src/test/resources/test-realm.properties + diff --git a/jetty-ee9/jetty-ee9-demos/jetty-ee9-demo-spec/jetty-ee9-demo-spec-webapp/pom.xml b/jetty-ee9/jetty-ee9-demos/jetty-ee9-demo-spec/jetty-ee9-demo-spec-webapp/pom.xml index e8cecdf4907..8d64f43bd3e 100644 --- a/jetty-ee9/jetty-ee9-demos/jetty-ee9-demo-spec/jetty-ee9-demo-spec-webapp/pom.xml +++ b/jetty-ee9/jetty-ee9-demos/jetty-ee9-demo-spec/jetty-ee9-demo-spec-webapp/pom.xml @@ -61,7 +61,9 @@ Test Realm - src/etc/realm.properties + + src/etc/realm.properties + diff --git a/jetty-ee9/jetty-ee9-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/pom.xml b/jetty-ee9/jetty-ee9-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/pom.xml index e5779619b9d..38f84bae349 100644 --- a/jetty-ee9/jetty-ee9-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/pom.xml +++ b/jetty-ee9/jetty-ee9-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/pom.xml @@ -112,8 +112,9 @@ + Test Realm - ${basedir}/src/config/login.xml + ${basedir}/src/config/realm.properties diff --git a/jetty-ee9/jetty-ee9-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/config/login.xml b/jetty-ee9/jetty-ee9-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/config/realm.properties similarity index 100% rename from jetty-ee9/jetty-ee9-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/config/login.xml rename to jetty-ee9/jetty-ee9-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/config/realm.properties diff --git a/jetty-ee9/jetty-ee9-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/main/webapp/WEB-INF/web.xml b/jetty-ee9/jetty-ee9-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/main/webapp/WEB-INF/web.xml index 2a5ac4b71bf..ad17a05cf81 100644 --- a/jetty-ee9/jetty-ee9-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/main/webapp/WEB-INF/web.xml +++ b/jetty-ee9/jetty-ee9-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/main/webapp/WEB-INF/web.xml @@ -4,4 +4,24 @@ xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" version="3.1"> Jetty Simple Webapp run-mojo-it + + + + Any Authenticated User + /auth/* + + + * + + + + + FORM + Test Realm + + /logon.html?param=test + /logonError.html?param=test + + + diff --git a/jetty-ee9/jetty-ee9-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/main/webapp/auth/index.html b/jetty-ee9/jetty-ee9-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/main/webapp/auth/index.html new file mode 100644 index 00000000000..c8f12155737 --- /dev/null +++ b/jetty-ee9/jetty-ee9-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/main/webapp/auth/index.html @@ -0,0 +1,3 @@ + +

Authenticated

+ diff --git a/jetty-ee9/jetty-ee9-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/main/webapp/logon.html b/jetty-ee9/jetty-ee9-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/main/webapp/logon.html new file mode 100644 index 00000000000..6bededa576d --- /dev/null +++ b/jetty-ee9/jetty-ee9-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/main/webapp/logon.html @@ -0,0 +1,20 @@ + +

FORM Authentication demo

+
+ + + + + + + + + + + + +
Username:
Password:
+ +
+
+ \ No newline at end of file diff --git a/jetty-ee9/jetty-ee9-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/main/webapp/logonError.html b/jetty-ee9/jetty-ee9-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/main/webapp/logonError.html new file mode 100644 index 00000000000..66a83869061 --- /dev/null +++ b/jetty-ee9/jetty-ee9-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/main/webapp/logonError.html @@ -0,0 +1,4 @@ + +

Authentication ERROR

+Username, password or role incorrect. +