From e7274e3bb128531f15dfd177b1ebef77bc548370 Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Wed, 1 Jun 2022 13:38:42 +1000 Subject: [PATCH] Add ee8 modules with sources generated from ee9 sources (#8066) * auto translate some modules from EE9 to EE8 Signed-off-by: Olivier Lamy --- Jenkinsfile | 13 + .../main/config/modules/ee10-annotations.mod | 1 - jetty-ee10/jetty-ee10-jaas/pom.xml | 24 +- jetty-ee8/jetty-ee8-annotations/pom.xml | 124 +++++ .../src/main/config/modules/annotations.mod | 15 + .../test/jar/test-sci-for-container-path.jar | Bin 0 -> 3129 bytes .../src/test/jar/test-sci-for-webinf.jar | Bin 0 -> 2883 bytes .../src/test/jar/test-sci-with-ordering.jar | Bin 0 -> 3266 bytes .../src/test/jar/test-sci.jar | Bin 0 -> 7570 bytes jetty-ee8/jetty-ee8-jaas/pom.xml | 150 ++++++ .../src/main/config/etc/jetty-jaas.xml | 21 + .../src/main/config/modules/jaas.mod | 18 + jetty-ee8/jetty-ee8-nested/pom.xml | 91 ++++ .../src/main/assembly/site-component.xml | 15 + jetty-ee8/jetty-ee8-plus/pom.xml | 69 +++ .../src/main/config/etc/jetty-plus.xml | 29 ++ .../src/main/config/modules/plus.mod | 12 + jetty-ee8/jetty-ee8-security/pom.xml | 61 +++ .../src/main/config/modules/ee8-security.mod | 13 + jetty-ee8/jetty-ee8-servlet/pom.xml | 81 ++++ .../src/main/config/modules/ee8-servlet.mod | 17 + jetty-ee8/jetty-ee8-servlets/pom.xml | 87 ++++ .../src/main/config/modules/servlets.mod | 13 + jetty-ee8/jetty-ee8-webapp/pom.xml | 142 ++++++ .../src/main/config/etc/jetty-ee8-deploy.xml | 63 +++ .../src/main/config/etc/jetty-ee8-webapp.xml | 23 + .../src/main/config/etc/webdefault-ee8.xml | 443 ++++++++++++++++++ .../src/main/config/modules/ee8-deploy.mod | 33 ++ .../src/main/config/modules/ee8-webapp.mod | 39 ++ jetty-ee8/pom.xml | 175 +++++++ jetty-ee9/jetty-ee9-annotations/pom.xml | 9 + .../src/main/config/modules/annotations.mod | 2 +- .../TestAnnotationConfiguration.java | 8 +- .../TestAnnotationIntrospector.java | 8 +- .../ee9/annotations/TestAnnotationParser.java | 17 +- jetty-ee9/jetty-ee9-jaas/pom.xml | 22 +- .../src/main/config/modules/jaas.mod | 2 +- .../src/main/config/modules/plus.mod | 2 +- .../ee9/security/AliasedConstraintTest.java | 2 +- .../security/ClientCertAuthenticatorTest.java | 6 +- .../ee9/security/HashLoginServiceTest.java | 3 +- .../ee9/security/PropertyUserStoreTest.java | 4 +- .../src/main/config/modules/ee9-servlet.mod | 1 + .../jetty/ee9/servlet/FilterHolder.java | 2 +- .../ee9/servlet/CacheControlHeaderTest.java | 2 +- .../jetty/ee9/servlet/DefaultServletTest.java | 2 +- .../jetty/ee9/servlet/DispatcherTest.java | 2 +- .../ee9/servlet/SSLAsyncIOServletTest.java | 2 +- .../servlet/ServletContextResourcesTest.java | 2 +- .../src/main/config/modules/servlets.mod | 2 +- .../ee9/servlets/GzipDefaultServletTest.java | 4 +- .../servlets/GzipHandlerNoReCompressTest.java | 5 +- jetty-ee9/jetty-ee9-webapp/pom.xml | 13 + .../jetty/ee9/webapp/ClassMatcherTest.java | 8 +- .../jetty/ee9/webapp/ForcedServletTest.java | 11 +- .../ee9/webapp/MetaInfConfigurationTest.java | 6 +- .../StandardDescriptorProcessorTest.java | 2 +- .../eclipse/jetty/ee9/webapp/TempDirTest.java | 13 +- .../jetty/ee9/webapp/TestMetaData.java | 2 +- .../ee9/webapp/WebAppClassLoaderTest.java | 4 +- .../jetty/ee9/webapp/WebAppContextTest.java | 30 +- .../src/test/webapp-alt-jsp/WEB-INF/web.xml | 2 +- pom.xml | 11 + 63 files changed, 1865 insertions(+), 118 deletions(-) create mode 100644 jetty-ee8/jetty-ee8-annotations/pom.xml create mode 100644 jetty-ee8/jetty-ee8-annotations/src/main/config/modules/annotations.mod create mode 100644 jetty-ee8/jetty-ee8-annotations/src/test/jar/test-sci-for-container-path.jar create mode 100644 jetty-ee8/jetty-ee8-annotations/src/test/jar/test-sci-for-webinf.jar create mode 100644 jetty-ee8/jetty-ee8-annotations/src/test/jar/test-sci-with-ordering.jar create mode 100644 jetty-ee8/jetty-ee8-annotations/src/test/jar/test-sci.jar create mode 100644 jetty-ee8/jetty-ee8-jaas/pom.xml create mode 100644 jetty-ee8/jetty-ee8-jaas/src/main/config/etc/jetty-jaas.xml create mode 100644 jetty-ee8/jetty-ee8-jaas/src/main/config/modules/jaas.mod create mode 100644 jetty-ee8/jetty-ee8-nested/pom.xml create mode 100644 jetty-ee8/jetty-ee8-nested/src/main/assembly/site-component.xml create mode 100644 jetty-ee8/jetty-ee8-plus/pom.xml create mode 100644 jetty-ee8/jetty-ee8-plus/src/main/config/etc/jetty-plus.xml create mode 100644 jetty-ee8/jetty-ee8-plus/src/main/config/modules/plus.mod create mode 100644 jetty-ee8/jetty-ee8-security/pom.xml create mode 100644 jetty-ee8/jetty-ee8-security/src/main/config/modules/ee8-security.mod create mode 100644 jetty-ee8/jetty-ee8-servlet/pom.xml create mode 100644 jetty-ee8/jetty-ee8-servlet/src/main/config/modules/ee8-servlet.mod create mode 100644 jetty-ee8/jetty-ee8-servlets/pom.xml create mode 100644 jetty-ee8/jetty-ee8-servlets/src/main/config/modules/servlets.mod create mode 100644 jetty-ee8/jetty-ee8-webapp/pom.xml create mode 100644 jetty-ee8/jetty-ee8-webapp/src/main/config/etc/jetty-ee8-deploy.xml create mode 100644 jetty-ee8/jetty-ee8-webapp/src/main/config/etc/jetty-ee8-webapp.xml create mode 100644 jetty-ee8/jetty-ee8-webapp/src/main/config/etc/webdefault-ee8.xml create mode 100644 jetty-ee8/jetty-ee8-webapp/src/main/config/modules/ee8-deploy.mod create mode 100644 jetty-ee8/jetty-ee8-webapp/src/main/config/modules/ee8-webapp.mod create mode 100644 jetty-ee8/pom.xml diff --git a/Jenkinsfile b/Jenkinsfile index 34229e2bea0e..f955ab5909d7 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -69,6 +69,19 @@ pipeline { } } } + stage("Module : /jetty-ee8/") { + steps { + container('jetty-build') { + timeout(time: 120, unit: 'MINUTES') { + dir("${env.WORKSPACE}/buildy") { + //cleanup all projects + mavenBuild("jdk17", "clean -T4", "maven3") + mavenBuild("jdk17", "clean install -f jetty-ee8", "maven3") + } + } + } + } + } stage("Module : /jetty-ee10/") { steps { container('jetty-build') { diff --git a/jetty-ee10/jetty-ee10-annotations/src/main/config/modules/ee10-annotations.mod b/jetty-ee10/jetty-ee10-annotations/src/main/config/modules/ee10-annotations.mod index ca8274bd10e6..076c431b366a 100644 --- a/jetty-ee10/jetty-ee10-annotations/src/main/config/modules/ee10-annotations.mod +++ b/jetty-ee10/jetty-ee10-annotations/src/main/config/modules/ee10-annotations.mod @@ -10,7 +10,6 @@ ee10 ee10-plus [lib] -lib/jetty-ee10-annotations-${jetty.version}.jar lib/ee10-annotations/*.jar [jpms] diff --git a/jetty-ee10/jetty-ee10-jaas/pom.xml b/jetty-ee10/jetty-ee10-jaas/pom.xml index e3e1e60280d1..d9fb5935ce15 100644 --- a/jetty-ee10/jetty-ee10-jaas/pom.xml +++ b/jetty-ee10/jetty-ee10-jaas/pom.xml @@ -31,6 +31,7 @@ false false + --add-opens java.base/sun.security.x509=ALL-UNNAMED --add-opens java.base/sun.security.util=ALL-UNNAMED @@ -141,29 +142,6 @@ ${junit.version} test - - - - jdk16 - - [16,) - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - --add-opens java.base/sun.security.x509=ALL-UNNAMED --add-opens java.base/sun.security.util=ALL-UNNAMED - - - - - - - - diff --git a/jetty-ee8/jetty-ee8-annotations/pom.xml b/jetty-ee8/jetty-ee8-annotations/pom.xml new file mode 100644 index 000000000000..9defa5644bdf --- /dev/null +++ b/jetty-ee8/jetty-ee8-annotations/pom.xml @@ -0,0 +1,124 @@ + + + org.eclipse.jetty.ee8 + jetty-ee8 + 12.0.0-SNAPSHOT + + + 4.0.0 + jetty-ee8-annotations + EE8 :: Jetty :: Servlet Annotations + Annotation support for deploying servlets in jetty. + + jetty-ee9-annotations + ${project.groupId}.annotations + org.eclipse.annotations.* + + + + + + src/test/jar + jar + + + + + maven-surefire-plugin + + + @{argLine} ${jetty.surefire.argLine} --add-reads org.eclipse.jetty.ee8.annotations=org.eclipse.jetty.logging --add-opens org.eclipse.jetty.ee8.annotations/org.eclipse.jetty.ee8.annotations.resources=org.eclipse.jetty.ee8.plus + + + + + + org.apache.maven.plugins + maven-resources-plugin + + + copy-ee8-test-resources + generate-test-resources + + copy-resources + + + ${project.build.testOutputDirectory} + + + ${maven.multiModuleProjectDirectory}/jetty-ee9/${ee9.module}/src/test/resources + + + + + + + + org.apache.felix + maven-bundle-plugin + true + + + ${osgi.slf4j.import.packages},org.objectweb.asm;version="[$(version;==;${asm.version}),$(version;+;${asm.version}))",* + osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)", osgi.serviceloader; filter:="(osgi.serviceloader=jakarta.servlet.ServletContainerInitializer)";resolution:=optional;cardinality:=multiple, osgi.extender; filter:="(osgi.extender=osgi.serviceloader.processor)";resolution:=optional + + + osgi.serviceloader; osgi.serviceloader=org.eclipse.jetty.ee8.webapp.Configuration + + + + + + + + + + org.eclipse.jetty.ee8 + jetty-ee8-plus + + + org.eclipse.jetty.ee8 + jetty-ee8-webapp + + + jakarta.annotation + jakarta.annotation-api + + + org.ow2.asm + asm + + + org.ow2.asm + asm-commons + + + org.slf4j + slf4j-api + + + org.eclipse.jetty.toolchain + jetty-servlet-api + + + jakarta.transaction + jakarta.transaction-api + test + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + org.eclipse.jetty + jetty-jndi + test + + + org.eclipse.jetty + jetty-slf4j-impl + test + + + diff --git a/jetty-ee8/jetty-ee8-annotations/src/main/config/modules/annotations.mod b/jetty-ee8/jetty-ee8-annotations/src/main/config/modules/annotations.mod new file mode 100644 index 000000000000..519131a07d76 --- /dev/null +++ b/jetty-ee8/jetty-ee8-annotations/src/main/config/modules/annotations.mod @@ -0,0 +1,15 @@ +# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html + +[description] +Enables Annotation scanning for deployed web applications. + +[depend] +plus + +[lib] +lib/jetty-ee8-annotations-${jetty.version}.jar +lib/annotations/*.jar + +[jpms] +add-modules:org.objectweb.asm + diff --git a/jetty-ee8/jetty-ee8-annotations/src/test/jar/test-sci-for-container-path.jar b/jetty-ee8/jetty-ee8-annotations/src/test/jar/test-sci-for-container-path.jar new file mode 100644 index 0000000000000000000000000000000000000000..d6fa63a78d67a2e0f627ac751f5d37a201ebd30d GIT binary patch literal 3129 zcmWIWW@h1H0D)VTwZ32ml;8x?zOEsTx}JV+`T~t1dKY=Ub+yi&Ilno`;EM5sr$stm=T7K&>pF3;KUoqsMNIpE zO2y7O-9f_MLBS<+wbqKra0^W~4ic>qJ{|N~r01*8S0A9fmvOPzflZN}m7W51UF*WV z%r0;_-@W1zrx&Nk0CO6q4_JUsOU}=QJ04R7$d4cuiOIRCc$5ht`>{B+s4O!%wHU6R z0~~Z=I}TWOF)}b%Gczz4AR8MDRG(S|B6Ctpob&Ta5;OBsi#+o(OEMF4GOJRH^pbND zi;H`MPWv5l5V2M6XWAG4!!0&rg2d}XvMsz9kF;d)wEYcGw^*_z#me+W{6?d~hwMKB zk6E)iKI(RTUwm$6@$&C)|2`ExAX#SIk$CygwANg1Yo3#nzAVu*KJv-Ew5{Ukeqo-^ zp)WgEZ@4S)YMOb>DxJ{U_T8oHmYifix?|sT#>0hIKi)PgzjbIG=U0U(8`oVBy?=R5 z#}(CB#hu#oTeOUp)UIE)^HO5_LzDR2kL-EvQM*{K9o2Yy%W?j}e}`0d?aELwI{rf1 zePWG!xnxoOVaZL8lWofE+$|;2b-o5qulC*j=#zqm=&7Sdf+^>A_r1t?S>4zw!y7!= zxBqp3;BnVFrAhzY&s_NvVEM>NDz*LpzL%Yfa~zpG+YUY1-;|iRmK zXeQ(R3*yFG<3xHIHVYQ4zc0h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sci-with-ordering.jar b/jetty-ee8/jetty-ee8-annotations/src/test/jar/test-sci-with-ordering.jar new file mode 100644 index 0000000000000000000000000000000000000000..18e0a15593bce5e8be9d6d6811d8e9bf5f00a34e GIT binary patch literal 3266 zcmbVO2|Sc}A0PKIuEu29Xj8q8#tg=*b)<5I8RHmNj%*VTMy_TiLp!E)s3_(7EK97S zH@U49LZM#ASSeH}S`juQOv*~x=UL3mi@bgM&F6XMc|OngcmIEf171j25(becDT(mU z!_rLx{3lpCo1$&(_GvpT!Ng%6AWTO3tP~mi%mgnaKa5~%XS2`J$r(e~$04+_Z1HH! zLuovEM|<0YUx_+hdM}14TDbOREj-#xTx=-EHCX|5cY8!tMjTNdPjsSP*-?m8h9i>n zh#ML5EFuSaVa9gG7W|IWqvGzCxu1`;kz>Xdx#4zpNSZ(Ivhc=uV_?gst@c0|G|eY8 zm}~rM1mq)xAo&CX>%b8FuuzIGKp}_t^WmYGfDkT0cy8#Z041F415mkm@qa>{$83*J z5`e+1gkZ4mK|I$Cu6$F_C?}9P2%wpVhR{gl5P)J6LZ*>PLF8iq1>+M$qEb_cJ-Eib zNR!UT*Ii%NX}g$a&(v$oJtkhhx&>*uH7e`6xr$8^HqCmbn1NtS3e9Uw+5PG2byK$L zb%x%E-9#s+aoY)@0wCdD;u!#rQgBsz1dQPikgOGAkH$Fb2S~}UXy7I$qv6?T%|%D>xu8kHDLFWF4cd!x4pXBHyQh+dEDwDvS1r_11~qj_Xq@8>>vM*XeoKFW{?dmg$(e4J)+!KicF#`jJV2w)=Ny zyg3^KuIgTBiuzVDiPqg^TsuZcx{_^R$yA`0rbfnoGZ-)>vV0&HYo+90ndNLSzwf|Y zEAgKTI&cW>M*Sf|Nz?r%4B3~! z7G^T@P>$B9VYS!u{d9Z#AS-Hn=+LR~3eqO;vWx;sVa0*Q-Tgnr`d6f+DULcQn}o*% zwW-HROTYH1>4K@(sLHyrQuK79qNT}J_sSUhEpC@gAM}$HXC01=7)R`2Ni*su`kn1X z;lbt>`Jb>Si_8itR2LwR&`S4%hgk3)M@SfuPzxej-=Z3-G#klEO(580ZzO2FyBDfp34%jkj$lbhET^Ht5zi{1dA1^hu|< zRtgcH!QtQ#dK_ZhE)Eutm8W9!iE)+d^bc8nQ-Vq1KnS;nSGN+y)nKrsG5@Et=&i#= z1E@4K)rX9xlW76y<+gwhBvH6#h{MDRq6k2?;jIktc-epr&*4uR#MP~hR)GM3X3!b+emTwAi5t11m>XRw-nxk~)S|In`$*ZQ4 z>x*CZ5IPM7#&^%9+AmxenFthrQ_dOlxHxYWpZHtCw!tQ)D_(COal^RLQZnhGW5;l ztGrO3YE=dfV=~;W4F_MIb?Y@Srw-_c?WLQI82jHo)x~p!Pt;{ym887 zTYDFQz!2p`tAls$6z1DZcoJ4uF|;x)5~R2Rd|X^0zSPvAC61-C|2!MCA}kW52o6^7 z>IHz`(6v?!9=|cj&vljCG}YnQt6?UJ5i2 zcv66Mq^vt0mKCf$AeL3+L|1&Bf~9f6i{;`0TiKL&dTxrXiX}H3>o@}G;k76Syoe|y PQU?5C!BcQd9D4g36Wc=s literal 0 HcmV?d00001 diff --git a/jetty-ee8/jetty-ee8-annotations/src/test/jar/test-sci.jar b/jetty-ee8/jetty-ee8-annotations/src/test/jar/test-sci.jar new file mode 100644 index 0000000000000000000000000000000000000000..bb9b90654bbc2aeb9f2e711a158a958597e6a50c GIT binary patch literal 7570 zcmb_h1yq#Vw;$<7x)EvV7?4h>p-X8QN@-+()fPkccNT+YO z{#Cs9>bvXz-eG;~n{TZhXK(i2=ePIKP)0_<0$^ZZ02B@LKyi#$W-5^Y05enofEWM( zsLJU`b1JFHbE`_LDap%e>u{;c2k96)PVx|YE6hvkiK!Hgz!=Xm^4tNz6}Jb|hg|SI zVG$5ahk(=xyr8pV<4zz-(PW@M;mP3)a(eGbSOB{xX=qJB4g_7 z8#2N-r>3YZQ5V>sgYLnn9iMG3IskoO(E+gFd$=6(*)0%F@@O~peD_*3YgMu^vGH5i zId99QIyD(`69;>n+V+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WFQ+G525SFiEWLmWZUK*x;k!eTlmPC2S&1EJ+`P)N6kx2Bts#v~T9E@J$Df6y315HCFKDFBs9>rm!WpMQ6V?P&#=}t^Do^N`JO|T9&K> zL$&xm>N%b-Tk-W;Xllx~|J1TdGHPe~bgeRG|3k2JbVtAe%_||rCh8RF>v`H>TFene z6r-yAO6qFxto?A#*vsPwg8{7ma@23O-%~tJ z`G!+Ud`Di2$%u?95Kdv93hhY_YMFR$hQ!$qjPVVkyRMLHY)~xch)YWrlHxr;q zfp}%J;g(LAeXB;UI;r#<4D?oig4WK)8lyYTN)v^hqhIpXWw19qzvK>0FuGTvzD+u^ zvbxuFWHo-bx%mw6iI$y~(*5InH!#h^=~G`jHW{}u2NC5po%}w*^s4h?n8udXi&!4A zd>z^p{1dHfp+0R-Z^PQ@g-H!2YCvQCED1zbZb5ju4i;dMVlRQTqs+b3t*m+A5thQ`1g;GCe z}Re0_YgDjcu1c>%1qVX@eG{xkv?yphAn zlB)b+yJx2Bega;YVbP2XvIuM*|CZCy%~A4)-c_^;5)8a*jkPG=mYuB}Q}R!Yq~q+% zIak2sXKYg|09ReB3H_kZUxfWcF`s!6#zFEl(5@~p=@*SgRaxCX$r4J+h zi&=9soDSQ^B-@OnRXBEqH_ey+#Nn62KtuTo5-~FIFYg5q>G$W#^1FC_$K{u93BF1| zwDrFjv3}*h3fPc7K%9-=CH#)$d^!uk~MyaDOl#{GIt% zozw4jbTQKXAyf?E%I{!Q8@n}=KtJ{{#ET_$LhfLxm2(C0qXMK)UcG0uf(U`%jSJhuRdx?dGrI t>7Rq>a(VpOOM8fX|COvu{W#;_&P)wuR78Uf01zPltPnS@q~sT0{{!085`F*x literal 0 HcmV?d00001 diff --git a/jetty-ee8/jetty-ee8-jaas/pom.xml b/jetty-ee8/jetty-ee8-jaas/pom.xml new file mode 100644 index 000000000000..4a637a083f69 --- /dev/null +++ b/jetty-ee8/jetty-ee8-jaas/pom.xml @@ -0,0 +1,150 @@ + + + org.eclipse.jetty.ee8 + jetty-ee8 + 12.0.0-SNAPSHOT + + + 4.0.0 + jetty-ee8-jaas + EE8 :: Jetty :: JAAS + Jetty JAAS support + + + jetty-ee9-jaas + ${project.groupId}.jaas + 2.0.0.AM26 + 2.1.0 + org.eclipse.jetty.jaas.* + + + + + + + org.apache.maven.plugins + maven-source-plugin + + + org.apache.maven.plugins + maven-surefire-plugin + + false + false + --add-opens java.base/sun.security.x509=ALL-UNNAMED --add-opens java.base/sun.security.util=ALL-UNNAMED + + + + + + + + org.eclipse.jetty.ee8 + jetty-ee8-security + + + org.slf4j + slf4j-api + + + org.eclipse.jetty + jetty-slf4j-impl + test + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + org.apache.directory.server + apacheds-test-framework + ${apacheds.version} + test + + + junit + junit + + + + org.apache.directory.shared + shared-ldap-schema + + + org.apache.directory.api + api-ldap-schema-data + + + + + org.apache.directory.server + apacheds-server-integ + ${apacheds.version} + test + + + + org.apache.directory.shared + shared-ldap-schema + + + org.apache.directory.api + api-ldap-schema-data + + + + + org.apache.directory.server + apacheds-core-integ + ${apacheds.version} + test + + + + org.apache.directory.shared + shared-ldap-schema + + + org.apache.directory.api + api-ldap-schema-data + + + + + org.apache.directory.api + api-ldap-schema-data + ${apache.directory.api.version} + test + + + org.apache.directory.api + api-ldap-model + ${apache.directory.api.version} + + + org.apache.directory.api + api-util + ${apache.directory.api.version} + + + org.apache.directory.api + api-asn1-api + ${apache.directory.api.version} + + + + org.junit.vintage + junit-vintage-engine + ${junit.version} + test + + + + + + diff --git a/jetty-ee8/jetty-ee8-jaas/src/main/config/etc/jetty-jaas.xml b/jetty-ee8/jetty-ee8-jaas/src/main/config/etc/jetty-jaas.xml new file mode 100644 index 000000000000..881b23292a05 --- /dev/null +++ b/jetty-ee8/jetty-ee8-jaas/src/main/config/etc/jetty-jaas.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + java.security.auth.login.config + + + + + + + + + diff --git a/jetty-ee8/jetty-ee8-jaas/src/main/config/modules/jaas.mod b/jetty-ee8/jetty-ee8-jaas/src/main/config/modules/jaas.mod new file mode 100644 index 000000000000..bc90bb02cc94 --- /dev/null +++ b/jetty-ee8/jetty-ee8-jaas/src/main/config/modules/jaas.mod @@ -0,0 +1,18 @@ +# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html + +[description] +Enables JAAS for deployed web applications. + +[depend] +server + +[lib] +lib/jetty-ee8-jaas-${jetty.version}.jar + +[xml] +etc/jetty-jaas.xml + +[ini-template] +## The file location (relative to $jetty.base) for the +## JAAS "java.security.auth.login.config" system property +# jetty.jaas.login.conf=etc/login.conf diff --git a/jetty-ee8/jetty-ee8-nested/pom.xml b/jetty-ee8/jetty-ee8-nested/pom.xml new file mode 100644 index 000000000000..43e213ff98ff --- /dev/null +++ b/jetty-ee8/jetty-ee8-nested/pom.xml @@ -0,0 +1,91 @@ + + + org.eclipse.jetty.ee8 + jetty-ee8 + 12.0.0-SNAPSHOT + + + 4.0.0 + jetty-ee8-nested + EE8 :: Jetty :: Nested + The jetty core handler adapted to legacy ee8 handler. + + + jetty-ee9-nested + ${project.groupId}.server + org.eclipse.jetty.server.* + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + + @{argLine} ${jetty.surefire.argLine} --add-reads org.eclipse.jetty.ee8.nested=org.eclipse.jetty.logging --add-opens org.eclipse.jetty.server/org.eclipse.jetty.server=ALL-UNNAMED + + + + + + + + + org.eclipse.jetty.toolchain + jetty-servlet-api + + + org.eclipse.jetty + jetty-http + + + org.eclipse.jetty + jetty-io + + + org.eclipse.jetty + jetty-server + + + org.eclipse.jetty + jetty-jmx + true + + + org.slf4j + slf4j-api + + + org.eclipse.jetty + jetty-xml + test + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + org.eclipse.jetty + jetty-http-tools + test + + + org.eclipse.jetty + jetty-util-ajax + test + + + org.eclipse.jetty + jetty-slf4j-impl + test + + + org.eclipse.jetty + jetty-session + compile + + + + diff --git a/jetty-ee8/jetty-ee8-nested/src/main/assembly/site-component.xml b/jetty-ee8/jetty-ee8-nested/src/main/assembly/site-component.xml new file mode 100644 index 000000000000..575269c1a1e8 --- /dev/null +++ b/jetty-ee8/jetty-ee8-nested/src/main/assembly/site-component.xml @@ -0,0 +1,15 @@ + + site-component + + jar + + + + ${basedir} + jetty + + src/main/resources/org/eclipse/** + + + + diff --git a/jetty-ee8/jetty-ee8-plus/pom.xml b/jetty-ee8/jetty-ee8-plus/pom.xml new file mode 100644 index 000000000000..daa74c8bc492 --- /dev/null +++ b/jetty-ee8/jetty-ee8-plus/pom.xml @@ -0,0 +1,69 @@ + + + org.eclipse.jetty.ee8 + jetty-ee8 + 12.0.0-SNAPSHOT + + + 4.0.0 + jetty-ee8-plus + EE8 :: Jetty :: Plus + Jetty JavaEE style services + + + jetty-ee9-plus + ${project.groupId}.plus + org.eclipse.jetty.plus.* + + + + + + org.apache.felix + maven-bundle-plugin + true + + + ${osgi.slf4j.import.packages},jakarta.transaction.*;version="2.0.0",* + + osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)" + + + osgi.serviceloader; osgi.serviceloader=org.eclipse.jetty.ee8.webapp.Configuration + + + + + + + + + + jakarta.transaction + jakarta.transaction-api + + + org.eclipse.jetty + jetty-jndi + + + org.eclipse.jetty.ee8 + jetty-ee8-webapp + + + org.slf4j + slf4j-api + + + org.eclipse.jetty + jetty-slf4j-impl + test + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + + diff --git a/jetty-ee8/jetty-ee8-plus/src/main/config/etc/jetty-plus.xml b/jetty-ee8/jetty-ee8-plus/src/main/config/etc/jetty-plus.xml new file mode 100644 index 000000000000..ae50d8cd359c --- /dev/null +++ b/jetty-ee8/jetty-ee8-plus/src/main/config/etc/jetty-plus.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + org.eclipse.jetty.ee8.plus.webapp.EnvConfiguration + org.eclipse.jetty.ee8.plus.webapp.PlusConfiguration + + + + + + + + + + + diff --git a/jetty-ee8/jetty-ee8-plus/src/main/config/modules/plus.mod b/jetty-ee8/jetty-ee8-plus/src/main/config/modules/plus.mod new file mode 100644 index 000000000000..fe622e67ffd2 --- /dev/null +++ b/jetty-ee8/jetty-ee8-plus/src/main/config/modules/plus.mod @@ -0,0 +1,12 @@ +[description] +Enables Servlet 3.1 resource injection. + +[depend] +server +security +jndi +webapp + +[lib] +lib/jetty-ee8-plus-${jetty.version}.jar +lib/jakarta.transaction-api-*.jar diff --git a/jetty-ee8/jetty-ee8-security/pom.xml b/jetty-ee8/jetty-ee8-security/pom.xml new file mode 100644 index 000000000000..ef1f0ed7aacd --- /dev/null +++ b/jetty-ee8/jetty-ee8-security/pom.xml @@ -0,0 +1,61 @@ + + + org.eclipse.jetty.ee8 + jetty-ee8 + 12.0.0-SNAPSHOT + + + 4.0.0 + jetty-ee8-security + EE8 :: Jetty :: Security + Jetty security infrastructure + + + jetty-ee9-security + ${project.groupId}.security + org.eclipse.jetty.security.* + + + + + + org.apache.felix + maven-bundle-plugin + true + + + osgi.serviceloader; filter:="(osgi.serviceloader=org.eclipse.jetty.security.Authenticator$Factory)";resolution:=optional;cardinality:=multiple, osgi.extender; filter:="(osgi.extender=osgi.serviceloader.processor)";resolution:=optional + + + + + + + + + org.eclipse.jetty.ee8 + jetty-ee8-nested + + + org.slf4j + slf4j-api + + + + org.eclipse.jetty + jetty-slf4j-impl + test + + + org.eclipse.jetty + jetty-http-tools + test + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + + diff --git a/jetty-ee8/jetty-ee8-security/src/main/config/modules/ee8-security.mod b/jetty-ee8/jetty-ee8-security/src/main/config/modules/ee8-security.mod new file mode 100644 index 000000000000..eb8b958ded72 --- /dev/null +++ b/jetty-ee8/jetty-ee8-security/src/main/config/modules/ee8-security.mod @@ -0,0 +1,13 @@ +# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html + +[description] +Adds servlet standard security handling to the classpath. + +[environment] +ee8 + +[depend] +server + +[lib] +lib/jetty-ee8-security-${jetty.version}.jar diff --git a/jetty-ee8/jetty-ee8-servlet/pom.xml b/jetty-ee8/jetty-ee8-servlet/pom.xml new file mode 100644 index 000000000000..7099dafd9e8a --- /dev/null +++ b/jetty-ee8/jetty-ee8-servlet/pom.xml @@ -0,0 +1,81 @@ + + + + org.eclipse.jetty.ee8 + jetty-ee8 + 12.0.0-SNAPSHOT + + + 4.0.0 + jetty-ee8-servlet + EE8 :: Jetty :: Servlet Handling + Jetty Servlet Container + + + jetty-ee9-servlet + ${project.groupId}.servlet + org.eclipse.jetty.* + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + + @{argLine} ${jetty.surefire.argLine} + --add-modules org.eclipse.jetty.util.ajax + --add-reads org.eclipse.jetty.ee8.servlet=org.eclipse.jetty.logging + + + + + + + + + org.eclipse.jetty.ee8 + jetty-ee8-nested + + + org.eclipse.jetty.ee8 + jetty-ee8-security + + + org.slf4j + slf4j-api + + + org.eclipse.jetty + jetty-util-ajax + true + + + org.eclipse.jetty + jetty-jmx + true + + + + org.eclipse.jetty + jetty-slf4j-impl + test + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + org.eclipse.jetty + jetty-http-tools + test + + + org.eclipse.jetty + jetty-client + test + + + diff --git a/jetty-ee8/jetty-ee8-servlet/src/main/config/modules/ee8-servlet.mod b/jetty-ee8/jetty-ee8-servlet/src/main/config/modules/ee8-servlet.mod new file mode 100644 index 000000000000..ee47a3e2b6b4 --- /dev/null +++ b/jetty-ee8/jetty-ee8-servlet/src/main/config/modules/ee8-servlet.mod @@ -0,0 +1,17 @@ +# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html + +[description] +Enables standard Servlet handling. + +[environment] +ee8 + +[depend] +server +sessions + +# FIXME should servlet api version be interpolated +[lib] +lib/jetty-jakarta-servlet-api-4.0.4.jar +lib/jetty-ee8-nested-${jetty.version}.jar +lib/jetty-ee8-servlet-${jetty.version}.jar diff --git a/jetty-ee8/jetty-ee8-servlets/pom.xml b/jetty-ee8/jetty-ee8-servlets/pom.xml new file mode 100644 index 000000000000..ff785f54a84c --- /dev/null +++ b/jetty-ee8/jetty-ee8-servlets/pom.xml @@ -0,0 +1,87 @@ + + + + org.eclipse.jetty.ee8 + jetty-ee8 + 12.0.0-SNAPSHOT + + + 4.0.0 + jetty-ee8-servlets + EE8 :: Jetty :: Utility Servlets and Filters + Jetty Utility Servlets + + + jetty-ee9-servlets + ${project.groupId}.servlets + org.eclipse.jetty.ee8.servlets.* + + + + + + maven-surefire-plugin + + + @{argLine} ${jetty.surefire.argLine} --add-modules jetty.servlet.api --add-modules org.eclipse.jetty.util --add-modules org.eclipse.jetty.io --add-modules org.eclipse.jetty.http --add-modules org.eclipse.jetty.server --add-modules org.eclipse.jetty.session --add-modules org.eclipse.jetty.ee8.nested --add-reads org.eclipse.jetty.ee8.servlets=java.management --add-reads org.eclipse.jetty.ee8.servlets=org.eclipse.jetty.jmx --add-reads org.eclipse.jetty.ee8.servlets=org.eclipse.jetty.logging + + + + + + + + + org.eclipse.jetty + jetty-http + + + org.eclipse.jetty.ee8 + jetty-ee8-nested + provided + + + org.eclipse.jetty.ee8 + jetty-ee8-webapp + provided + + + org.eclipse.jetty + jetty-util + + + org.eclipse.jetty.toolchain + jetty-servlet-api + provided + + + org.eclipse.jetty + jetty-io + + + org.slf4j + slf4j-api + + + org.eclipse.jetty + jetty-slf4j-impl + test + + + org.eclipse.jetty + jetty-jmx + test + + + org.eclipse.jetty + jetty-http-tools + test + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + + diff --git a/jetty-ee8/jetty-ee8-servlets/src/main/config/modules/servlets.mod b/jetty-ee8/jetty-ee8-servlets/src/main/config/modules/servlets.mod new file mode 100644 index 000000000000..83c25a10195d --- /dev/null +++ b/jetty-ee8/jetty-ee8-servlets/src/main/config/modules/servlets.mod @@ -0,0 +1,13 @@ +# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html + +[description] +Adds Jetty utility servlets and filters available to a webapp. +Puts org.eclipse.jetty.ee8.servlets on the server classpath (CGI, CrossOriginFilter, DosFilter, +MultiPartFilter, PushCacheFilter, QoSFilter, etc.) for use by all webapplications. + +[depend] +servlet + +[lib] +lib/jetty-ee8-servlets-${jetty.version}.jar + diff --git a/jetty-ee8/jetty-ee8-webapp/pom.xml b/jetty-ee8/jetty-ee8-webapp/pom.xml new file mode 100644 index 000000000000..5b1e898c869b --- /dev/null +++ b/jetty-ee8/jetty-ee8-webapp/pom.xml @@ -0,0 +1,142 @@ + + + org.eclipse.jetty.ee8 + jetty-ee8 + 12.0.0-SNAPSHOT + + + 4.0.0 + jetty-ee8-webapp + EE8 :: Jetty :: Webapp Application Support + Jetty web application support + + + jetty-ee9-webapp + ${project.groupId}.webapp + org.eclipse.jetty.ee8.webapp.* + + + + + + + org.apache.maven.plugins + maven-resources-plugin + + + copy-ee8-resources + generate-resources + + copy-resources + + + ${project.build.outputDirectory} + + + ${maven.multiModuleProjectDirectory}/jetty-ee9/jetty-ee9-webapp/src/main/resources + + + src/main/config/etc + org/eclipse/jetty/ee8/webapp + false + + webdefault-ee8.xml + + + + + + + copy-ee8-test-resources + generate-test-resources + + copy-resources + + + ${project.build.testOutputDirectory} + + + ${maven.multiModuleProjectDirectory}/jetty-ee9/jetty-ee9-webapp/src/test/resources + + + ${maven.multiModuleProjectDirectory}/jetty-ee9/jetty-ee9-webapp/src/test/webapp + webapp + + + ${maven.multiModuleProjectDirectory}/jetty-ee9/jetty-ee9-webapp/src/test/webapp-alt-jsp + webapp-alt-jsp + + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + + @{argLine} ${jetty.surefire.argLine} + + false + + ${basedir}/src/test/resources/module/foo-bar-janb.jar + + + org.eclipse.jetty.ee8.webapp.WebAppClassLoaderUrlStreamTest + + + + + org.apache.felix + maven-bundle-plugin + true + + + + osgi.extender; filter:="(osgi.extender=osgi.serviceloader.processor)", osgi.serviceloader; filter:="(osgi.serviceloader=org.eclipse.jetty.ee8.webapp.Configuration)";cardinality:=multiple, osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)" + + + osgi.serviceloader; osgi.serviceloader=org.eclipse.jetty.ee8.webapp.Configuration + + + + + + + + + + org.eclipse.jetty.ee8 + jetty-ee8-servlet + + + org.eclipse.jetty + jetty-xml + + + org.slf4j + slf4j-api + + + org.eclipse.jetty + jetty-slf4j-impl + test + + + org.eclipse.jetty + jetty-http-tools + test + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + org.eclipse.jetty + jetty-client + test + + + diff --git a/jetty-ee8/jetty-ee8-webapp/src/main/config/etc/jetty-ee8-deploy.xml b/jetty-ee8/jetty-ee8-webapp/src/main/config/etc/jetty-ee8-deploy.xml new file mode 100644 index 000000000000..17302e00b0e4 --- /dev/null +++ b/jetty-ee8/jetty-ee8-webapp/src/main/config/etc/jetty-ee8-deploy.xml @@ -0,0 +1,63 @@ + + + + + + + + + + + + org.eclipse.jetty.deploy.DeploymentManager + + + + contextHandlerClass + + + + + + + + ee8 + + + + + + + + + + + + + jetty.deploy.defaultsDescriptorPath + + /etc/webdefault-ee8.xml + + + + + + + + + + + + + + + + + + + + diff --git a/jetty-ee8/jetty-ee8-webapp/src/main/config/etc/jetty-ee8-webapp.xml b/jetty-ee8/jetty-ee8-webapp/src/main/config/etc/jetty-ee8-webapp.xml new file mode 100644 index 000000000000..2bfa7239f9b2 --- /dev/null +++ b/jetty-ee8/jetty-ee8-webapp/src/main/config/etc/jetty-ee8-webapp.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jetty-ee8/jetty-ee8-webapp/src/main/config/etc/webdefault-ee8.xml b/jetty-ee8/jetty-ee8-webapp/src/main/config/etc/webdefault-ee8.xml new file mode 100644 index 000000000000..694dca9635fc --- /dev/null +++ b/jetty-ee8/jetty-ee8-webapp/src/main/config/etc/webdefault-ee8.xml @@ -0,0 +1,443 @@ + + + + + + + + + + + + + + + + + + + + + + + Default web.xml file. + This file is applied to a Web application before its own WEB_INF/web.xml file + + + + + + + + org.eclipse.jetty.ee8.servlet.listener.ELContextCleaner + + + + + + + + org.eclipse.jetty.ee8.servlet.listener.IntrospectorCleaner + + + + + + + + + + + + + + + + + default + org.eclipse.jetty.ee8.servlet.DefaultServlet + + acceptRanges + true + + + dirAllowed + true + + + welcomeServlets + false + + + redirectWelcome + false + + + maxCacheSize + 256000000 + + + maxCachedFileSize + 200000000 + + + maxCachedFiles + 2048 + + + etags + false + + + useFileMappedBuffer + true + + 0 + + + + default + / + + + + + + + + + + + + + + + jsp + org.eclipse.jetty.jsp.JettyJspServlet + + xpoweredBy + false + + + compilerTargetVM + 1.8 + + + compilerSourceVM + 1.8 + + 0 + + + + jsp + *.jsp + *.jspf + *.jspx + *.xsp + *.JSP + *.JSPF + *.JSPX + *.XSP + + + + + + + + 30 + + + + + + + + + + + + + + + index.html + index.htm + index.jsp + + + + + + + + ar + ISO-8859-6 + + + be + ISO-8859-5 + + + bg + ISO-8859-5 + + + ca + ISO-8859-1 + + + cs + ISO-8859-2 + + + da + ISO-8859-1 + + + de + ISO-8859-1 + + + el + ISO-8859-7 + + + en + ISO-8859-1 + + + es + ISO-8859-1 + + + et + ISO-8859-1 + + + fi + ISO-8859-1 + + + fr + ISO-8859-1 + + + hr + ISO-8859-2 + + + hu + ISO-8859-2 + + + is + ISO-8859-1 + + + it + ISO-8859-1 + + + iw + ISO-8859-8 + + + ja + Shift_JIS + + + ko + EUC-KR + + + lt + ISO-8859-2 + + + lv + ISO-8859-2 + + + mk + ISO-8859-5 + + + nl + ISO-8859-1 + + + no + ISO-8859-1 + + + pl + ISO-8859-2 + + + pt + ISO-8859-1 + + + ro + ISO-8859-2 + + + ru + ISO-8859-5 + + + sh + ISO-8859-5 + + + sk + ISO-8859-2 + + + sl + ISO-8859-2 + + + sq + ISO-8859-2 + + + sr + ISO-8859-5 + + + sv + ISO-8859-1 + + + tr + ISO-8859-9 + + + uk + ISO-8859-5 + + + zh + GB2312 + + + zh_TW + Big5 + + + + + + + + + Disable TRACE + / + TRACE + + + + + + Enable everything but TRACE + / + TRACE + + + + + diff --git a/jetty-ee8/jetty-ee8-webapp/src/main/config/modules/ee8-deploy.mod b/jetty-ee8/jetty-ee8-webapp/src/main/config/modules/ee8-deploy.mod new file mode 100644 index 000000000000..35387c15f137 --- /dev/null +++ b/jetty-ee8/jetty-ee8-webapp/src/main/config/modules/ee8-deploy.mod @@ -0,0 +1,33 @@ +[description] +Enables web application deployment from the $JETTY_BASE/webapps/ directory. + +[environment] +ee8 + +[depend] +deploy +ee8-webapp + +[lib] + +[files] +webapps-ee8/ + +[xml] +etc/jetty-ee8-deploy.xml + +[ini-template] +# Monitored directory name (relative to $jetty.base) +# jetty.deploy.monitoredDir=webapps-ee8 +# - OR - +# Monitored directory path (fully qualified) +# jetty.deploy.monitoredPath=/var/www/webapps-ee8 + +# Defaults Descriptor for all deployed webapps +# jetty.deploy.defaultsDescriptorPath=${jetty.base}/etc/webdefault-ee8.xml + +# Monitored directory scan period (seconds) +# jetty.deploy.scanInterval=1 + +# Whether to extract *.war files +# jetty.deploy.extractWars=true diff --git a/jetty-ee8/jetty-ee8-webapp/src/main/config/modules/ee8-webapp.mod b/jetty-ee8/jetty-ee8-webapp/src/main/config/modules/ee8-webapp.mod new file mode 100644 index 000000000000..7577807e784f --- /dev/null +++ b/jetty-ee8/jetty-ee8-webapp/src/main/config/modules/ee8-webapp.mod @@ -0,0 +1,39 @@ +# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html + +[description] +Adds support for servlet specification web applications to the server classpath. +Without this, only Jetty-specific handlers may be deployed. + +[environment] +ee8 + +[depend] +ee8-servlet +ee8-security + +[xml] +etc/jetty-ee8-webapp.xml + +[lib] +lib/jetty-ee8-webapp-${jetty.version}.jar + + +[ini-template] +## Add to the server wide default jars and packages protected or hidden from webapps. +## System classes are protected and cannot be overridden by a webapp. +## Server classes are hidden and cannot be seen by a webapp +## Lists of patterns are comma separated and may be either: +## + a qualified classname e.g. 'com.acme.Foo' +## + a package name e.g. 'net.example.' +## + a jar file e.g. '${jetty.base.uri}/lib/dependency.jar' +## + a directory of jars,resource or classes e.g. '${jetty.base.uri}/resources' +## + A pattern preceded with a '-' is an exclusion, all other patterns are inclusions +## +## The +=, operator appends to a CSV list with a comma as needed. +## +#jetty.webapp.addSystemClasses+=,org.example. +#jetty.webapp.addServerClasses+=,org.example. +contextHandlerClass = org.eclipse.jetty.ee8.webapp.WebAppContext + +[jpms] +add-modules:java.instrument diff --git a/jetty-ee8/pom.xml b/jetty-ee8/pom.xml new file mode 100644 index 000000000000..f049c0dccfd4 --- /dev/null +++ b/jetty-ee8/pom.xml @@ -0,0 +1,175 @@ + + + + org.eclipse.jetty + jetty-project + 12.0.0-SNAPSHOT + + + 4.0.0 + org.eclipse.jetty.ee8 + jetty-ee8 + EE8 :: Parent + pom + + + 4.0.6 + 4.0.4 + 1.3.3 + 1.3.5 + + true + true + + + + + jetty-ee8-nested + jetty-ee8-security + jetty-ee8-servlet + jetty-ee8-servlets + jetty-ee8-webapp + jetty-ee8-jaas + jetty-ee8-plus + jetty-ee8-annotations + + + + ${project.build.directory}/generated-sources/ee8 + ${project.build.directory}/generated-test-sources/ee8 + + + + org.eclipse.jetty.toolchain + jetty-modify-sources-maven-plugin + 1.0.0-SNAPSHOT + + + + + + org.apache.maven.plugins + maven-resources-plugin + + + copy-ee8-resources + generate-resources + + copy-resources + + + ${project.build.outputDirectory} + + + ${maven.multiModuleProjectDirectory}/jetty-ee9/${ee9.module}/src/main/resources + + + + + + copy-ee8-test-resources + generate-test-resources + + copy-resources + + + ${project.build.testOutputDirectory} + + + ${maven.multiModuleProjectDirectory}/jetty-ee9/${ee9.module}/src/test/resources + + + + + + + + org.eclipse.jetty.toolchain + jetty-modify-sources-maven-plugin + + + generate-ee8-sources + generate-sources + + modify-sources-ee9-to-ee8 + + + ${maven.multiModuleProjectDirectory}/jetty-ee9/${ee9.module}/src/main/java + ${project.build.sourceDirectory} + + + + generate-ee8-test-sources + generate-test-sources + + modify-sources-ee9-to-ee8 + + + true + ${maven.multiModuleProjectDirectory}/jetty-ee9/${ee9.module}/src/test/java + ${project.build.testSourceDirectory} + + + + + + + + + + + + + jakarta.servlet + jakarta.servlet-api + ${jakarta.servlet.api.version} + + + jakarta.transaction + jakarta.transaction-api + ${jakarta.transaction-api.version} + + + jakarta.annotation + jakarta.annotation-api + ${jakarta.annotation.api.version} + + + org.eclipse.jetty.toolchain + jetty-servlet-api + ${jetty.servlet.api.version} + + + org.eclipse.jetty.ee8 + jetty-ee8-nested + ${project.version} + + + org.eclipse.jetty.ee8 + jetty-ee8-security + ${project.version} + + + org.eclipse.jetty.ee8 + jetty-ee8-servlet + ${project.version} + + + org.eclipse.jetty.ee8 + jetty-ee8-webapp + ${project.version} + + + org.eclipse.jetty.ee8 + jetty-ee8-servlets + ${project.version} + + + org.eclipse.jetty.ee8 + jetty-ee8-plus + ${project.version} + + + + + diff --git a/jetty-ee9/jetty-ee9-annotations/pom.xml b/jetty-ee9/jetty-ee9-annotations/pom.xml index 32b489515bd8..e2d3c93b6880 100644 --- a/jetty-ee9/jetty-ee9-annotations/pom.xml +++ b/jetty-ee9/jetty-ee9-annotations/pom.xml @@ -15,6 +15,15 @@ + + + src/test/resources + + + src/test/jar + jar + + maven-surefire-plugin diff --git a/jetty-ee9/jetty-ee9-annotations/src/main/config/modules/annotations.mod b/jetty-ee9/jetty-ee9-annotations/src/main/config/modules/annotations.mod index ec6a976386de..54a5db69611b 100644 --- a/jetty-ee9/jetty-ee9-annotations/src/main/config/modules/annotations.mod +++ b/jetty-ee9/jetty-ee9-annotations/src/main/config/modules/annotations.mod @@ -7,7 +7,7 @@ Enables Annotation scanning for deployed web applications. plus [lib] -lib/jetty-annotations-${jetty.version}.jar +lib/jetty-ee9-annotations-${jetty.version}.jar lib/annotations/*.jar [jpms] diff --git a/jetty-ee9/jetty-ee9-annotations/src/test/java/org/eclipse/jetty/ee9/annotations/TestAnnotationConfiguration.java b/jetty-ee9/jetty-ee9-annotations/src/test/java/org/eclipse/jetty/ee9/annotations/TestAnnotationConfiguration.java index e551272f32c8..f3b5798b2380 100644 --- a/jetty-ee9/jetty-ee9-annotations/src/test/java/org/eclipse/jetty/ee9/annotations/TestAnnotationConfiguration.java +++ b/jetty-ee9/jetty-ee9-annotations/src/test/java/org/eclipse/jetty/ee9/annotations/TestAnnotationConfiguration.java @@ -79,12 +79,12 @@ public void assertAnnotationDiscovery(boolean b) @BeforeEach public void setup() throws Exception { - web25 = MavenTestingUtils.getTestResourceFile("web25.xml"); - web31false = MavenTestingUtils.getTestResourceFile("web31false.xml"); - web31true = MavenTestingUtils.getTestResourceFile("web31true.xml"); + web25 = MavenTestingUtils.getTargetFile("test-classes/web25.xml"); + web31false = MavenTestingUtils.getTargetFile("test-classes/web31false.xml"); + web31true = MavenTestingUtils.getTargetFile("test-classes/web31true.xml"); // prepare an sci that will be on the webapp's classpath - jarDir = new File(MavenTestingUtils.getTestResourcesDir().getParentFile(), "jar"); + jarDir = new File(MavenTestingUtils.getTargetPath("test-classes").toFile(), "jar"); testSciJar = new File(jarDir, "test-sci.jar"); assertTrue(testSciJar.exists()); diff --git a/jetty-ee9/jetty-ee9-annotations/src/test/java/org/eclipse/jetty/ee9/annotations/TestAnnotationIntrospector.java b/jetty-ee9/jetty-ee9-annotations/src/test/java/org/eclipse/jetty/ee9/annotations/TestAnnotationIntrospector.java index 4f9a2b3a1446..13559e2cfdb3 100644 --- a/jetty-ee9/jetty-ee9-annotations/src/test/java/org/eclipse/jetty/ee9/annotations/TestAnnotationIntrospector.java +++ b/jetty-ee9/jetty-ee9-annotations/src/test/java/org/eclipse/jetty/ee9/annotations/TestAnnotationIntrospector.java @@ -62,28 +62,28 @@ public void testIsIntrospectable() throws Exception assertTrue(introspector.isIntrospectable(new ServletE(), holder)); //a DESCRIPTOR sourced servlet can be introspected if web.xml metdata-complete==false - File file = MavenTestingUtils.getTestResourceFile("web31false.xml"); + File file = MavenTestingUtils.getTargetFile("test-classes/web31false.xml"); Resource resource = Resource.newResource(file); wac.getMetaData().setWebDescriptor(new WebDescriptor(resource)); holder = new ServletHolder(new Source(Source.Origin.DESCRIPTOR, resource.toString())); assertTrue(introspector.isIntrospectable(new ServletE(), holder)); //a DESCRIPTOR sourced servlet can be introspected if web-fragment.xml medata-complete==false && web.xml metadata-complete==false - file = MavenTestingUtils.getTestResourceFile("web-fragment4false.xml"); + file = MavenTestingUtils.getTargetFile("test-classes/web-fragment4false.xml"); resource = Resource.newResource(file); wac.getMetaData().addFragmentDescriptor(Resource.newResource(file.getParentFile()), new FragmentDescriptor(resource)); holder = new ServletHolder(new Source(Source.Origin.DESCRIPTOR, resource.toString())); assertTrue(introspector.isIntrospectable(new ServletE(), holder)); //a DESCRIPTOR sourced servlet cannot be introspected if web-fragment.xml medata-complete==true (&& web.xml metadata-complete==false) - file = MavenTestingUtils.getTestResourceFile("web-fragment4true.xml"); + file = MavenTestingUtils.getTargetFile("test-classes/web-fragment4true.xml"); resource = Resource.newResource(file); wac.getMetaData().addFragmentDescriptor(Resource.newResource(file.getParentFile()), new FragmentDescriptor(resource)); holder = new ServletHolder(new Source(Source.Origin.DESCRIPTOR, resource.toString())); assertFalse(introspector.isIntrospectable(new ServletE(), holder)); //a DESCRIPTOR sourced servlet cannot be introspected if web.xml medata-complete==true - file = MavenTestingUtils.getTestResourceFile("web31true.xml"); + file = MavenTestingUtils.getTargetFile("test-classes/web31true.xml"); resource = Resource.newResource(file); wac.getMetaData().setWebDescriptor(new WebDescriptor(resource)); holder = new ServletHolder(new Source(Source.Origin.DESCRIPTOR, resource.toString())); diff --git a/jetty-ee9/jetty-ee9-annotations/src/test/java/org/eclipse/jetty/ee9/annotations/TestAnnotationParser.java b/jetty-ee9/jetty-ee9-annotations/src/test/java/org/eclipse/jetty/ee9/annotations/TestAnnotationParser.java index d7b492ca1bcf..fbbe440670fb 100644 --- a/jetty-ee9/jetty-ee9-annotations/src/test/java/org/eclipse/jetty/ee9/annotations/TestAnnotationParser.java +++ b/jetty-ee9/jetty-ee9-annotations/src/test/java/org/eclipse/jetty/ee9/annotations/TestAnnotationParser.java @@ -46,6 +46,7 @@ import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.notNullValue; import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; @@ -183,7 +184,7 @@ public void handle(AnnotationParser.MethodInfo info, String annotation) @Test public void testHiddenFilesInJar() throws Exception { - File badClassesJar = MavenTestingUtils.getTestResourceFile("bad-classes.jar"); + File badClassesJar = MavenTestingUtils.getTargetFile("test-classes/bad-classes.jar"); AnnotationParser parser = new AnnotationParser(); Set emptySet = Collections.emptySet(); parser.parse(emptySet, badClassesJar.toURI()); @@ -193,7 +194,7 @@ public void testHiddenFilesInJar() throws Exception @Test public void testModuleInfoClassInJar() throws Exception { - File badClassesJar = MavenTestingUtils.getTestResourceFile("jdk9/slf4j-api-1.8.0-alpha2.jar"); + File badClassesJar = MavenTestingUtils.getTargetFile("test-classes/jdk9/slf4j-api-1.8.0-alpha2.jar"); AnnotationParser parser = new AnnotationParser(); Set emptySet = Collections.emptySet(); parser.parse(emptySet, badClassesJar.toURI()); @@ -203,7 +204,7 @@ public void testModuleInfoClassInJar() throws Exception @Test public void testJep238MultiReleaseInJar() throws Exception { - File badClassesJar = MavenTestingUtils.getTestResourceFile("jdk9/log4j-api-2.9.0.jar"); + File badClassesJar = MavenTestingUtils.getTargetFile("test-classes/jdk9/log4j-api-2.9.0.jar"); AnnotationParser parser = new AnnotationParser(); Set emptySet = Collections.emptySet(); parser.parse(emptySet, badClassesJar.toURI()); @@ -213,7 +214,7 @@ public void testJep238MultiReleaseInJar() throws Exception @Test public void testJep238MultiReleaseInJarJDK10() throws Exception { - File jdk10Jar = MavenTestingUtils.getTestResourceFile("jdk10/multirelease-10.jar"); + File jdk10Jar = MavenTestingUtils.getTargetFile("test-classes/jdk10/multirelease-10.jar"); AnnotationParser parser = new AnnotationParser(); DuplicateClassScanHandler handler = new DuplicateClassScanHandler(); Set handlers = Collections.singleton(handler); @@ -251,8 +252,8 @@ public void testBasedirExclusion() throws Exception @Test public void testScanDuplicateClassesInJars() throws Exception { - Resource testJar = Resource.newResource(MavenTestingUtils.getTestResourceFile("tinytest.jar")); - Resource testJar2 = Resource.newResource(MavenTestingUtils.getTestResourceFile("tinytest_copy.jar")); + Resource testJar = Resource.newResource(MavenTestingUtils.getTargetFile("test-classes/tinytest.jar")); + Resource testJar2 = Resource.newResource(MavenTestingUtils.getTargetFile("test-classes/tinytest_copy.jar")); AnnotationParser parser = new AnnotationParser(); DuplicateClassScanHandler handler = new DuplicateClassScanHandler(); Set handlers = Collections.singleton(handler); @@ -267,7 +268,7 @@ public void testScanDuplicateClassesInJars() throws Exception @Test public void testScanDuplicateClasses() throws Exception { - Resource testJar = Resource.newResource(MavenTestingUtils.getTestResourceFile("tinytest.jar")); + Resource testJar = Resource.newResource(MavenTestingUtils.getTargetFile("test-classes/tinytest.jar")); File testClasses = new File(MavenTestingUtils.getTargetDir(), "test-classes"); AnnotationParser parser = new AnnotationParser(); DuplicateClassScanHandler handler = new DuplicateClassScanHandler(); @@ -277,7 +278,7 @@ public void testScanDuplicateClasses() throws Exception List locations = handler.getParsedList("org.acme.ClassOne"); assertNotNull(locations); assertEquals(2, locations.size()); - assertTrue(!(locations.get(0).equals(locations.get(1)))); + assertFalse((locations.get(0).equals(locations.get(1)))); } private void copyClass(Class clazz, File basedir) throws IOException diff --git a/jetty-ee9/jetty-ee9-jaas/pom.xml b/jetty-ee9/jetty-ee9-jaas/pom.xml index 3c4870813a40..4c7ba2412cbb 100644 --- a/jetty-ee9/jetty-ee9-jaas/pom.xml +++ b/jetty-ee9/jetty-ee9-jaas/pom.xml @@ -31,6 +31,7 @@ false false + --add-opens java.base/sun.security.x509=ALL-UNNAMED --add-opens java.base/sun.security.util=ALL-UNNAMED @@ -145,26 +146,5 @@ - - - jdk16 - - [16,) - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - --add-opens java.base/sun.security.x509=ALL-UNNAMED --add-opens java.base/sun.security.util=ALL-UNNAMED - - - - - - - diff --git a/jetty-ee9/jetty-ee9-jaas/src/main/config/modules/jaas.mod b/jetty-ee9/jetty-ee9-jaas/src/main/config/modules/jaas.mod index 9816e7b487cd..e87fcdcd9269 100644 --- a/jetty-ee9/jetty-ee9-jaas/src/main/config/modules/jaas.mod +++ b/jetty-ee9/jetty-ee9-jaas/src/main/config/modules/jaas.mod @@ -7,7 +7,7 @@ Enables JAAS for deployed web applications. server [lib] -lib/jetty-jaas-${jetty.version}.jar +lib/jetty-ee9-jaas-${jetty.version}.jar [xml] etc/jetty-jaas.xml diff --git a/jetty-ee9/jetty-ee9-plus/src/main/config/modules/plus.mod b/jetty-ee9/jetty-ee9-plus/src/main/config/modules/plus.mod index e3d01582c51e..32677fe77aaf 100644 --- a/jetty-ee9/jetty-ee9-plus/src/main/config/modules/plus.mod +++ b/jetty-ee9/jetty-ee9-plus/src/main/config/modules/plus.mod @@ -8,5 +8,5 @@ jndi webapp [lib] -lib/jetty-plus-${jetty.version}.jar +lib/jetty-ee9-plus-${jetty.version}.jar lib/jakarta.transaction-api-*.jar diff --git a/jetty-ee9/jetty-ee9-security/src/test/java/org/eclipse/jetty/ee9/security/AliasedConstraintTest.java b/jetty-ee9/jetty-ee9-security/src/test/java/org/eclipse/jetty/ee9/security/AliasedConstraintTest.java index 801624bf010d..fa4825863b1f 100644 --- a/jetty-ee9/jetty-ee9-security/src/test/java/org/eclipse/jetty/ee9/security/AliasedConstraintTest.java +++ b/jetty-ee9/jetty-ee9-security/src/test/java/org/eclipse/jetty/ee9/security/AliasedConstraintTest.java @@ -73,7 +73,7 @@ public static void startServer() throws Exception loginService.putUser("user3", new Password("password"), new String[]{"foo"}); context.setContextPath("/ctx"); - context.setResourceBase(MavenTestingUtils.getTestResourceDir("docroot").getAbsolutePath()); + context.setResourceBase(MavenTestingUtils.getTargetFile("test-classes/docroot").getAbsolutePath()); Handler.Collection handlers = new Handler.Collection(); handlers.addHandler(context); diff --git a/jetty-ee9/jetty-ee9-security/src/test/java/org/eclipse/jetty/ee9/security/ClientCertAuthenticatorTest.java b/jetty-ee9/jetty-ee9-security/src/test/java/org/eclipse/jetty/ee9/security/ClientCertAuthenticatorTest.java index 90a6821f7a66..9a6979de3787 100644 --- a/jetty-ee9/jetty-ee9-security/src/test/java/org/eclipse/jetty/ee9/security/ClientCertAuthenticatorTest.java +++ b/jetty-ee9/jetty-ee9-security/src/test/java/org/eclipse/jetty/ee9/security/ClientCertAuthenticatorTest.java @@ -111,7 +111,7 @@ public void setup() throws Exception HashLoginService loginService = new HashLoginService(); constraintSecurityHandler.setLoginService(loginService); - loginService.setConfig("src/test/resources/realm.properties"); + loginService.setConfig("target/test-classes/realm.properties"); constraintSecurityHandler.setHandler(new FooHandler()); context.setHandler(constraintSecurityHandler); @@ -147,8 +147,8 @@ private SslContextFactory.Server createServerSslContextFactory(String trustStore SslContextFactory.Server cf = new SslContextFactory.Server(); cf.setNeedClientAuth(true); cf.setTrustStorePassword(trustStorePassword); - cf.setTrustStoreResource(Resource.newResource(MavenTestingUtils.getTestResourcePath(trustStorePath))); - cf.setKeyStoreResource(Resource.newResource(MavenTestingUtils.getTestResourcePath("clientcert.jks"))); + cf.setTrustStoreResource(Resource.newResource(MavenTestingUtils.getTargetPath("test-classes/" + trustStorePath))); + cf.setKeyStoreResource(Resource.newResource(MavenTestingUtils.getTargetPath("test-classes/clientcert.jks"))); cf.setKeyStorePassword("changeit"); cf.setSniRequired(false); cf.setWantClientAuth(true); diff --git a/jetty-ee9/jetty-ee9-security/src/test/java/org/eclipse/jetty/ee9/security/HashLoginServiceTest.java b/jetty-ee9/jetty-ee9-security/src/test/java/org/eclipse/jetty/ee9/security/HashLoginServiceTest.java index ce200034d201..831965590b14 100644 --- a/jetty-ee9/jetty-ee9-security/src/test/java/org/eclipse/jetty/ee9/security/HashLoginServiceTest.java +++ b/jetty-ee9/jetty-ee9-security/src/test/java/org/eclipse/jetty/ee9/security/HashLoginServiceTest.java @@ -31,7 +31,8 @@ public class HashLoginServiceTest @Test public void testAutoCreatedUserStore() throws Exception { - HashLoginService loginService = new HashLoginService("foo", MavenTestingUtils.getTestResourceFile("foo.properties").getAbsolutePath()); + HashLoginService loginService = new HashLoginService("foo", + MavenTestingUtils.getTargetFile("test-classes/foo.properties").getAbsolutePath()); assertThat(loginService.getIdentityService(), is(notNullValue())); loginService.start(); assertTrue(loginService.getUserStore().isStarted()); diff --git a/jetty-ee9/jetty-ee9-security/src/test/java/org/eclipse/jetty/ee9/security/PropertyUserStoreTest.java b/jetty-ee9/jetty-ee9-security/src/test/java/org/eclipse/jetty/ee9/security/PropertyUserStoreTest.java index 192de4684523..29bd997d6f6a 100644 --- a/jetty-ee9/jetty-ee9-security/src/test/java/org/eclipse/jetty/ee9/security/PropertyUserStoreTest.java +++ b/jetty-ee9/jetty-ee9-security/src/test/java/org/eclipse/jetty/ee9/security/PropertyUserStoreTest.java @@ -55,7 +55,7 @@ public class PropertyUserStoreTest private final class UserCount implements PropertyUserStore.UserListener { private final AtomicInteger userCount = new AtomicInteger(); - private final List users = new ArrayList(); + private final List users = new ArrayList<>(); private UserCount() { @@ -80,7 +80,7 @@ public void remove(String username) public void awaitCount(int expectedCount) throws InterruptedException { - long timeout = TimeUnit.NANOSECONDS.toMillis(System.nanoTime()) + TimeUnit.SECONDS.toMillis(10); + long timeout = TimeUnit.NANOSECONDS.toMillis(System.nanoTime()) + TimeUnit.SECONDS.toMillis(20); while (userCount.get() != expectedCount && (TimeUnit.NANOSECONDS.toMillis(System.nanoTime()) < timeout)) { diff --git a/jetty-ee9/jetty-ee9-servlet/src/main/config/modules/ee9-servlet.mod b/jetty-ee9/jetty-ee9-servlet/src/main/config/modules/ee9-servlet.mod index 76bc121169b3..a42ac376a92e 100644 --- a/jetty-ee9/jetty-ee9-servlet/src/main/config/modules/ee9-servlet.mod +++ b/jetty-ee9/jetty-ee9-servlet/src/main/config/modules/ee9-servlet.mod @@ -10,6 +10,7 @@ ee9 server sessions +# FIXME should servlet api version be interpolated [lib] lib/jetty-jakarta-servlet-api-5.0.2.jar lib/jetty-ee9-nested-${jetty.version}.jar diff --git a/jetty-ee9/jetty-ee9-servlet/src/main/java/org/eclipse/jetty/ee9/servlet/FilterHolder.java b/jetty-ee9/jetty-ee9-servlet/src/main/java/org/eclipse/jetty/ee9/servlet/FilterHolder.java index c84b7473caab..77b11290422e 100644 --- a/jetty-ee9/jetty-ee9-servlet/src/main/java/org/eclipse/jetty/ee9/servlet/FilterHolder.java +++ b/jetty-ee9/jetty-ee9-servlet/src/main/java/org/eclipse/jetty/ee9/servlet/FilterHolder.java @@ -94,7 +94,7 @@ public void doStart() if (!jakarta.servlet.Filter.class.isAssignableFrom(getHeldClass())) { - String msg = getHeldClass() + " is not a jakarta.servlet.Filter"; + String msg = getHeldClass() + " is not a " + Filter.class.getName(); doStop(); throw new IllegalStateException(msg); } diff --git a/jetty-ee9/jetty-ee9-servlet/src/test/java/org/eclipse/jetty/ee9/servlet/CacheControlHeaderTest.java b/jetty-ee9/jetty-ee9-servlet/src/test/java/org/eclipse/jetty/ee9/servlet/CacheControlHeaderTest.java index 6610c9173ee7..5f0010137868 100644 --- a/jetty-ee9/jetty-ee9-servlet/src/test/java/org/eclipse/jetty/ee9/servlet/CacheControlHeaderTest.java +++ b/jetty-ee9/jetty-ee9-servlet/src/test/java/org/eclipse/jetty/ee9/servlet/CacheControlHeaderTest.java @@ -94,7 +94,7 @@ public void startServer(boolean forceFilter, boolean forceWrapping) throws Excep ServletHolder servletHolder = new ServletHolder(); servletHolder.setServlet(new DefaultServlet()); servletHolder.setInitParameter("cacheControl", "max-age=3600,public"); - Path resBase = MavenTestingUtils.getTestResourcePathDir("contextResources"); + Path resBase = MavenTestingUtils.getTargetPath("test-classes/contextResources"); servletHolder.setInitParameter("resourceBase", resBase.toFile().toURI().toASCIIString()); context.addServlet(servletHolder, "/*"); if (forceFilter) diff --git a/jetty-ee9/jetty-ee9-servlet/src/test/java/org/eclipse/jetty/ee9/servlet/DefaultServletTest.java b/jetty-ee9/jetty-ee9-servlet/src/test/java/org/eclipse/jetty/ee9/servlet/DefaultServletTest.java index e5918a44a4bf..d0b591c3dfc6 100644 --- a/jetty-ee9/jetty-ee9-servlet/src/test/java/org/eclipse/jetty/ee9/servlet/DefaultServletTest.java +++ b/jetty-ee9/jetty-ee9-servlet/src/test/java/org/eclipse/jetty/ee9/servlet/DefaultServletTest.java @@ -112,7 +112,7 @@ public void init() throws Exception connector = new LocalConnector(server); connector.getConnectionFactory(HttpConfiguration.ConnectionFactory.class).getHttpConfiguration().setSendServerVersion(false); - File extraJarResources = MavenTestingUtils.getTestResourceFile(ODD_JAR); + File extraJarResources = MavenTestingUtils.getTargetFile(ODD_JAR); URL[] urls = new URL[]{extraJarResources.toURI().toURL()}; ClassLoader parentClassLoader = Thread.currentThread().getContextClassLoader(); diff --git a/jetty-ee9/jetty-ee9-servlet/src/test/java/org/eclipse/jetty/ee9/servlet/DispatcherTest.java b/jetty-ee9/jetty-ee9-servlet/src/test/java/org/eclipse/jetty/ee9/servlet/DispatcherTest.java index 40399adbf404..17951119abbb 100644 --- a/jetty-ee9/jetty-ee9-servlet/src/test/java/org/eclipse/jetty/ee9/servlet/DispatcherTest.java +++ b/jetty-ee9/jetty-ee9-servlet/src/test/java/org/eclipse/jetty/ee9/servlet/DispatcherTest.java @@ -94,7 +94,7 @@ public void init() throws Exception _contextHandler.setContextPath("/context"); _contextCollection.addHandler(_contextHandler); _resourceHandler = new ResourceHandler(); - _resourceHandler.setResourceBase(MavenTestingUtils.getTestResourceDir("dispatchResourceTest").getAbsolutePath()); + _resourceHandler.setResourceBase(MavenTestingUtils.getTargetFile("test-classes/dispatchResourceTest").getAbsolutePath()); _resourceHandler.setPathInfoOnly(true); ContextHandler resourceContextHandler = new ContextHandler("/resource"); resourceContextHandler.setHandler(_resourceHandler); diff --git a/jetty-ee9/jetty-ee9-servlet/src/test/java/org/eclipse/jetty/ee9/servlet/SSLAsyncIOServletTest.java b/jetty-ee9/jetty-ee9-servlet/src/test/java/org/eclipse/jetty/ee9/servlet/SSLAsyncIOServletTest.java index b903ec11bd49..f6b61ebd6c60 100644 --- a/jetty-ee9/jetty-ee9-servlet/src/test/java/org/eclipse/jetty/ee9/servlet/SSLAsyncIOServletTest.java +++ b/jetty-ee9/jetty-ee9-servlet/src/test/java/org/eclipse/jetty/ee9/servlet/SSLAsyncIOServletTest.java @@ -213,7 +213,7 @@ public String getServletPath() public void start(HttpServlet servlet) throws Exception { - Path keystorePath = MavenTestingUtils.getTestResourcePath("keystore.p12"); + Path keystorePath = MavenTestingUtils.getTargetPath("test-classes/keystore.p12"); sslContextFactory = new SslContextFactory.Server(); sslContextFactory.setKeyStorePath(keystorePath.toString()); diff --git a/jetty-ee9/jetty-ee9-servlet/src/test/java/org/eclipse/jetty/ee9/servlet/ServletContextResourcesTest.java b/jetty-ee9/jetty-ee9-servlet/src/test/java/org/eclipse/jetty/ee9/servlet/ServletContextResourcesTest.java index e513213d5be2..29a565310d32 100644 --- a/jetty-ee9/jetty-ee9-servlet/src/test/java/org/eclipse/jetty/ee9/servlet/ServletContextResourcesTest.java +++ b/jetty-ee9/jetty-ee9-servlet/src/test/java/org/eclipse/jetty/ee9/servlet/ServletContextResourcesTest.java @@ -77,7 +77,7 @@ public void init() throws Exception connector = new LocalConnector(server); connector.getConnectionFactory(HttpConfiguration.ConnectionFactory.class).getHttpConfiguration().setSendServerVersion(false); - Path resBase = MavenTestingUtils.getTestResourcePathDir("contextResources"); + Path resBase = MavenTestingUtils.getTargetPath("test-classes/contextResources"); context = new ServletContextHandler(); context.setContextPath("/context"); diff --git a/jetty-ee9/jetty-ee9-servlets/src/main/config/modules/servlets.mod b/jetty-ee9/jetty-ee9-servlets/src/main/config/modules/servlets.mod index 36b85d686f38..aec6bfee55a5 100644 --- a/jetty-ee9/jetty-ee9-servlets/src/main/config/modules/servlets.mod +++ b/jetty-ee9/jetty-ee9-servlets/src/main/config/modules/servlets.mod @@ -9,5 +9,5 @@ MultiPartFilter, PushCacheFilter, QoSFilter, etc.) for use by all webapplication servlet [lib] -lib/jetty-servlets-${jetty.version}.jar +lib/jetty-ee9-servlets-${jetty.version}.jar diff --git a/jetty-ee9/jetty-ee9-servlets/src/test/java/org/eclipse/jetty/ee9/servlets/GzipDefaultServletTest.java b/jetty-ee9/jetty-ee9-servlets/src/test/java/org/eclipse/jetty/ee9/servlets/GzipDefaultServletTest.java index f3e61da999d5..ddfd0f364897 100644 --- a/jetty-ee9/jetty-ee9-servlets/src/test/java/org/eclipse/jetty/ee9/servlets/GzipDefaultServletTest.java +++ b/jetty-ee9/jetty-ee9-servlets/src/test/java/org/eclipse/jetty/ee9/servlets/GzipDefaultServletTest.java @@ -354,7 +354,7 @@ public void testGzippedIfSVG() throws Exception server.setHandler(gzipHandler); // Prepare Server File - Path testResource = MavenTestingUtils.getTestResourcePath("test.svg"); + Path testResource = MavenTestingUtils.getTargetPath("test-classes/test.svg"); Path file = contextDir.resolve("test.svg"); IO.copy(testResource.toFile(), file.toFile()); String expectedSha1Sum = Sha1Sum.calculate(testResource); @@ -898,7 +898,7 @@ public void testIsNotGzipCompressedSVGZ() throws Exception gzipHandler.setHandler(servletContextHandler); server.setHandler(gzipHandler); // Prepare Server File - Path testResource = MavenTestingUtils.getTestResourcePath("test.svgz"); + Path testResource = MavenTestingUtils.getTargetPath("test-classes/test.svgz"); Path file = contextDir.resolve("test.svgz"); IO.copy(testResource.toFile(), file.toFile()); int fileSize = (int)Files.size(file); diff --git a/jetty-ee9/jetty-ee9-servlets/src/test/java/org/eclipse/jetty/ee9/servlets/GzipHandlerNoReCompressTest.java b/jetty-ee9/jetty-ee9-servlets/src/test/java/org/eclipse/jetty/ee9/servlets/GzipHandlerNoReCompressTest.java index 02ec5f501638..b2de6b7e0dde 100644 --- a/jetty-ee9/jetty-ee9-servlets/src/test/java/org/eclipse/jetty/ee9/servlets/GzipHandlerNoReCompressTest.java +++ b/jetty-ee9/jetty-ee9-servlets/src/test/java/org/eclipse/jetty/ee9/servlets/GzipHandlerNoReCompressTest.java @@ -103,10 +103,11 @@ public void testNotGzipAlreadyCompressed(String fileName, String expectedContent server.setHandler(gzipHandler); // Prepare Server File - Path testResource = MavenTestingUtils.getTestResourcePath(fileName); + Path testResource = MavenTestingUtils.getTargetPath("test-classes/" + fileName); Path file = contextDir.resolve(fileName); IO.copy(testResource.toFile(), file.toFile()); - String expectedSha1Sum = Sha1Sum.loadSha1(MavenTestingUtils.getTestResourceFile(fileName + ".sha1")).toUpperCase(Locale.ENGLISH); + String expectedSha1Sum = Sha1Sum.loadSha1(MavenTestingUtils.getTargetFile("test-classes/" + fileName + ".sha1")) + .toUpperCase(Locale.ENGLISH); int fileSize = (int)Files.size(file); server.start(); diff --git a/jetty-ee9/jetty-ee9-webapp/pom.xml b/jetty-ee9/jetty-ee9-webapp/pom.xml index 8b2686a12c7e..1bb69751e12c 100644 --- a/jetty-ee9/jetty-ee9-webapp/pom.xml +++ b/jetty-ee9/jetty-ee9-webapp/pom.xml @@ -29,6 +29,19 @@ + + + src/test/resources + + + src/test/webapp + webapp + + + src/test/webapp-alt-jsp + webapp-alt-jsp + + diff --git a/jetty-ee9/jetty-ee9-webapp/src/test/java/org/eclipse/jetty/ee9/webapp/ClassMatcherTest.java b/jetty-ee9/jetty-ee9-webapp/src/test/java/org/eclipse/jetty/ee9/webapp/ClassMatcherTest.java index 6f4cd1bbbe75..5c5aa532d571 100644 --- a/jetty-ee9/jetty-ee9-webapp/src/test/java/org/eclipse/jetty/ee9/webapp/ClassMatcherTest.java +++ b/jetty-ee9/jetty-ee9-webapp/src/test/java/org/eclipse/jetty/ee9/webapp/ClassMatcherTest.java @@ -35,13 +35,7 @@ public class ClassMatcherTest { private final ClassMatcher _pattern = new ClassMatcher(); - protected static Supplier NULL_SUPPLIER = new Supplier() - { - public URI get() - { - return null; - } - }; + protected static Supplier NULL_SUPPLIER = () -> null; @BeforeEach public void before() diff --git a/jetty-ee9/jetty-ee9-webapp/src/test/java/org/eclipse/jetty/ee9/webapp/ForcedServletTest.java b/jetty-ee9/jetty-ee9-webapp/src/test/java/org/eclipse/jetty/ee9/webapp/ForcedServletTest.java index d39f2cc4713b..fb3f5873dc3c 100644 --- a/jetty-ee9/jetty-ee9-webapp/src/test/java/org/eclipse/jetty/ee9/webapp/ForcedServletTest.java +++ b/jetty-ee9/jetty-ee9-webapp/src/test/java/org/eclipse/jetty/ee9/webapp/ForcedServletTest.java @@ -14,8 +14,12 @@ package org.eclipse.jetty.ee9.webapp; import java.io.IOException; +import java.nio.charset.StandardCharsets; import java.nio.file.Files; +import java.nio.file.OpenOption; import java.nio.file.Path; +import java.nio.file.Paths; +import java.nio.file.StandardOpenOption; import java.util.Arrays; import java.util.Iterator; import java.util.stream.Stream; @@ -62,9 +66,14 @@ public void setup() throws Exception // Lets setup the Webapp base resource properly Path basePath = MavenTestingUtils.getTargetTestingPath(ForcedServletTest.class.getName()).resolve("webapp"); FS.ensureEmpty(basePath); - Path srcWebApp = MavenTestingUtils.getProjectDirPath("src/test/webapp-alt-jsp"); + Path srcWebApp = MavenTestingUtils.getTargetPath("test-classes/webapp-alt-jsp"); copyDir(srcWebApp, basePath); copyClass(FakePrecompiledJSP.class, basePath.resolve("WEB-INF/classes")); + Path webXml = basePath.resolve("WEB-INF/web.xml"); + String webXmContent = Files.readString(webXml); + webXmContent = webXmContent.replace("${fakePrecompiledJspClassName}", FakePrecompiledJSP.class.getName()); + Files.writeString(webXml, webXmContent, StandardCharsets.UTF_8, StandardOpenOption.TRUNCATE_EXISTING); + // Use the new base context.setWarResource(new PathResource(basePath)); diff --git a/jetty-ee9/jetty-ee9-webapp/src/test/java/org/eclipse/jetty/ee9/webapp/MetaInfConfigurationTest.java b/jetty-ee9/jetty-ee9-webapp/src/test/java/org/eclipse/jetty/ee9/webapp/MetaInfConfigurationTest.java index e09e0ef1b244..a67102f5036f 100644 --- a/jetty-ee9/jetty-ee9-webapp/src/test/java/org/eclipse/jetty/ee9/webapp/MetaInfConfigurationTest.java +++ b/jetty-ee9/jetty-ee9-webapp/src/test/java/org/eclipse/jetty/ee9/webapp/MetaInfConfigurationTest.java @@ -76,9 +76,9 @@ public void scanJars(WebAppContext context, Collection jars, boolean u @Test public void testScanTypes() throws Exception { - File web25 = MavenTestingUtils.getTestResourceFile("web25.xml"); - File web31 = MavenTestingUtils.getTestResourceFile("web31.xml"); - File web31false = MavenTestingUtils.getTestResourceFile("web31false.xml"); + File web25 = MavenTestingUtils.getTargetFile("test-classes/web25.xml"); + File web31 = MavenTestingUtils.getTargetFile("test-classes/web31.xml"); + File web31false = MavenTestingUtils.getTargetFile("test-classes/web31false.xml"); //test a 2.5 webapp will not look for fragments as manually configured MetaInfConfiguration meta25 = new TestableMetaInfConfiguration(MetaInfConfiguration.__allScanTypes, diff --git a/jetty-ee9/jetty-ee9-webapp/src/test/java/org/eclipse/jetty/ee9/webapp/StandardDescriptorProcessorTest.java b/jetty-ee9/jetty-ee9-webapp/src/test/java/org/eclipse/jetty/ee9/webapp/StandardDescriptorProcessorTest.java index 76e526bf4698..892d0703a9a5 100644 --- a/jetty-ee9/jetty-ee9-webapp/src/test/java/org/eclipse/jetty/ee9/webapp/StandardDescriptorProcessorTest.java +++ b/jetty-ee9/jetty-ee9-webapp/src/test/java/org/eclipse/jetty/ee9/webapp/StandardDescriptorProcessorTest.java @@ -29,7 +29,7 @@ public class StandardDescriptorProcessorTest @Test public void testVisitSessionConfig() throws Exception { - File webXml = MavenTestingUtils.getTestResourceFile("web-session-config.xml"); + File webXml = MavenTestingUtils.getTargetFile("test-classes/web-session-config.xml"); Server server = new Server(); WebAppContext wac = new WebAppContext(); wac.setServer(server); diff --git a/jetty-ee9/jetty-ee9-webapp/src/test/java/org/eclipse/jetty/ee9/webapp/TempDirTest.java b/jetty-ee9/jetty-ee9-webapp/src/test/java/org/eclipse/jetty/ee9/webapp/TempDirTest.java index e67be8ebed79..87b4217e2966 100644 --- a/jetty-ee9/jetty-ee9-webapp/src/test/java/org/eclipse/jetty/ee9/webapp/TempDirTest.java +++ b/jetty-ee9/jetty-ee9-webapp/src/test/java/org/eclipse/jetty/ee9/webapp/TempDirTest.java @@ -16,6 +16,7 @@ import java.io.File; import java.nio.file.Files; import java.nio.file.Path; +import java.nio.file.Paths; import jakarta.servlet.ServletContext; import org.eclipse.jetty.server.Server; @@ -59,7 +60,7 @@ public void setupServer() ServerConnector connector = new ServerConnector(server); server.addConnector(connector); - File testWebAppDir = MavenTestingUtils.getProjectDir("src/test/webapp"); + File testWebAppDir = MavenTestingUtils.getTargetPath("test-classes/webapp").toFile(); webapp = new WebAppContext(); webapp.setContextPath("/"); webapp.setWar(testWebAppDir.getAbsolutePath()); @@ -108,7 +109,7 @@ public void attributeWithEmptyStringValue() public void attributeWithValidDirectory(String type) throws Exception { WebAppContext webAppContext = new WebAppContext(); - Path tmpDir = Files.createTempDirectory("jetty_test"); + Path tmpDir = Files.createTempDirectory(Paths.get(System.getProperty("java.io.tmpdir")), "jetty_test"); switch (type) { case "File": @@ -138,7 +139,8 @@ public void attributeWithValidDirectory(String type) throws Exception public void attributeWithNonExistentDirectory(String type) throws Exception { WebAppContext webAppContext = new WebAppContext(); - Path tmpDir = Files.createTempDirectory("jetty_test").resolve("foo_test_tmp"); + Path tmpDir = Files.createTempDirectory(Paths.get(System.getProperty("java.io.tmpdir")), "jetty_test") + .resolve("foo_test_tmp"); Files.deleteIfExists(tmpDir); assertFalse(Files.exists(tmpDir)); switch (type) @@ -199,7 +201,7 @@ public void baseTempDirAttributeWithEmptyStringValue() public void baseTempDirAttributeWithValidDirectory(String type) throws Exception { WebAppContext webAppContext = new WebAppContext(); - Path tmpDir = Files.createTempDirectory("jetty_test"); + Path tmpDir = Files.createTempDirectory(Paths.get(System.getProperty("java.io.tmpdir")), "jetty_test"); switch (type) { case "File": @@ -231,7 +233,8 @@ public void baseTempDirAttributeWithValidDirectory(String type) throws Exception public void baseTempDirAttributeWithNonExistentDirectory(String type) throws Exception { WebAppContext webAppContext = new WebAppContext(); - Path tmpDir = Files.createTempDirectory("jetty_test").resolve("foo_test_tmp"); + Path tmpDir = Files.createTempDirectory(Paths.get(System.getProperty("java.io.tmpdir")), "jetty_test") + .resolve("foo_test_tmp"); Files.deleteIfExists(tmpDir); assertFalse(Files.exists(tmpDir)); switch (type) diff --git a/jetty-ee9/jetty-ee9-webapp/src/test/java/org/eclipse/jetty/ee9/webapp/TestMetaData.java b/jetty-ee9/jetty-ee9-webapp/src/test/java/org/eclipse/jetty/ee9/webapp/TestMetaData.java index 7a48623061a2..230c1fa79074 100644 --- a/jetty-ee9/jetty-ee9-webapp/src/test/java/org/eclipse/jetty/ee9/webapp/TestMetaData.java +++ b/jetty-ee9/jetty-ee9-webapp/src/test/java/org/eclipse/jetty/ee9/webapp/TestMetaData.java @@ -53,7 +53,7 @@ public class TestMetaData @BeforeEach public void setUp() throws Exception { - File jarDir = new File(MavenTestingUtils.getTestResourcesDir(), "fragments"); + File jarDir = new File(MavenTestingUtils.getTargetFile("test-classes"), "fragments"); assertTrue(jarDir.exists()); fragFile = new File(jarDir, "zeta.jar"); assertTrue(fragFile.exists()); diff --git a/jetty-ee9/jetty-ee9-webapp/src/test/java/org/eclipse/jetty/ee9/webapp/WebAppClassLoaderTest.java b/jetty-ee9/jetty-ee9-webapp/src/test/java/org/eclipse/jetty/ee9/webapp/WebAppClassLoaderTest.java index 5eb0684d870f..3d1f8a62b0f5 100644 --- a/jetty-ee9/jetty-ee9-webapp/src/test/java/org/eclipse/jetty/ee9/webapp/WebAppClassLoaderTest.java +++ b/jetty-ee9/jetty-ee9-webapp/src/test/java/org/eclipse/jetty/ee9/webapp/WebAppClassLoaderTest.java @@ -53,13 +53,13 @@ public class WebAppClassLoaderTest @BeforeEach public void init() throws Exception { - this.testWebappDir = MavenTestingUtils.getProjectDirPath("src/test/webapp"); + this.testWebappDir = MavenTestingUtils.getTargetPath("test-classes/webapp"); Resource webapp = new PathResource(testWebappDir); _context = new WebAppContext(); _context.setBaseResource(webapp); _context.setContextPath("/test"); - _context.setExtraClasspath("src/test/resources/ext/*"); + _context.setExtraClasspath("target/test-classes/ext/*"); _loader = new WebAppClassLoader(_context); _loader.addJars(webapp.addPath("WEB-INF/lib")); diff --git a/jetty-ee9/jetty-ee9-webapp/src/test/java/org/eclipse/jetty/ee9/webapp/WebAppContextTest.java b/jetty-ee9/jetty-ee9-webapp/src/test/java/org/eclipse/jetty/ee9/webapp/WebAppContextTest.java index 75d8ab62d6e6..18071ff3f536 100644 --- a/jetty-ee9/jetty-ee9-webapp/src/test/java/org/eclipse/jetty/ee9/webapp/WebAppContextTest.java +++ b/jetty-ee9/jetty-ee9-webapp/src/test/java/org/eclipse/jetty/ee9/webapp/WebAppContextTest.java @@ -95,10 +95,10 @@ private Server newServer() public void testDefaultContextPath() throws Exception { Server server = newServer(); - File webXml = MavenTestingUtils.getTestResourceFile("web-with-default-context-path.xml"); - File webXmlEmptyPath = MavenTestingUtils.getTestResourceFile("web-with-empty-default-context-path.xml"); - File webDefaultXml = MavenTestingUtils.getTestResourceFile("web-default-with-default-context-path.xml"); - File overrideWebXml = MavenTestingUtils.getTestResourceFile("override-web-with-default-context-path.xml"); + File webXml = MavenTestingUtils.getTargetFile("test-classes/web-with-default-context-path.xml"); + File webXmlEmptyPath = MavenTestingUtils.getTargetFile("test-classes/web-with-empty-default-context-path.xml"); + File webDefaultXml = MavenTestingUtils.getTargetFile("test-classes/web-default-with-default-context-path.xml"); + File overrideWebXml = MavenTestingUtils.getTargetFile("test-classes/override-web-with-default-context-path.xml"); assertNotNull(webXml); assertNotNull(webDefaultXml); assertNotNull(overrideWebXml); @@ -301,7 +301,7 @@ public void testProtectedTarget() throws Exception handlers.addHandler(contexts); WebAppContext context = new WebAppContext(); - Path testWebapp = MavenTestingUtils.getProjectDirPath("src/test/webapp"); + Path testWebapp = MavenTestingUtils.getTargetPath("test-classes/webapp"); context.setBaseResource(new PathResource(testWebapp)); context.setContextPath("/"); @@ -365,7 +365,7 @@ public void testProtectedTargetFailure(String path) throws Exception handlers.addHandler(contexts); WebAppContext context = new WebAppContext(); - Path testWebapp = MavenTestingUtils.getProjectDirPath("src/test/webapp"); + Path testWebapp = MavenTestingUtils.getTargetPath("test-classes/webapp"); context.setBaseResource(new PathResource(testWebapp)); context.setContextPath("/"); contexts.addHandler(context); @@ -388,7 +388,7 @@ public void testNullPath() throws Exception handlers.addHandler(contexts); WebAppContext context = new WebAppContext(); - Path testWebapp = MavenTestingUtils.getProjectDirPath("src/test/webapp"); + Path testWebapp = MavenTestingUtils.getTargetPath("test-classes/webapp"); context.setBaseResource(new PathResource(testWebapp)); context.setContextPath("/"); @@ -418,7 +418,7 @@ public void testNullSessionAndSecurityHandler() throws Exception WebAppContext context = new WebAppContext(null, null, null, null, null, new ErrorPageErrorHandler(), ServletContextHandler.NO_SESSIONS | ServletContextHandler.NO_SECURITY); context.setContextPath("/"); - Path testWebapp = MavenTestingUtils.getProjectDirPath("src/test/webapp"); + Path testWebapp = MavenTestingUtils.getTargetPath("test-classes/webapp"); context.setBaseResource(new PathResource(testWebapp)); contexts.addHandler(context); @@ -455,7 +455,7 @@ public void testBaseResourceAbsolutePath() throws Exception WebAppContext context = new WebAppContext(); context.setContextPath("/"); - Path warPath = MavenTestingUtils.getTestResourcePathFile("wars/dump.war"); + Path warPath = MavenTestingUtils.getTargetPath("test-classes/wars/dump.war"); warPath = warPath.toAbsolutePath(); assertTrue(warPath.isAbsolute(), "Path should be absolute: " + warPath); // Use String reference to war @@ -474,7 +474,7 @@ public static Stream extraClasspathGlob() { List references = new ArrayList<>(); - Path extLibs = MavenTestingUtils.getTestResourcePathDir("ext"); + Path extLibs = MavenTestingUtils.getTargetPath("test-classes/ext"); extLibs = extLibs.toAbsolutePath(); // Absolute reference with trailing slash and glob @@ -500,7 +500,7 @@ public void testExtraClasspathGlob(String description, String extraClasspathGlob WebAppContext context = new WebAppContext(); context.setContextPath("/"); - Path warPath = MavenTestingUtils.getTestResourcePathFile("wars/dump.war"); + Path warPath = MavenTestingUtils.getTargetPath("test-classes/wars/dump.war"); context.setBaseResource(new PathResource(warPath)); context.setExtraClasspath(extraClasspathGlobReference); @@ -514,7 +514,7 @@ public void testExtraClasspathGlob(String description, String extraClasspathGlob ClassLoader contextClassLoader = context.getClassLoader(); assertThat(contextClassLoader, instanceOf(WebAppClassLoader.class)); WebAppClassLoader webAppClassLoader = (WebAppClassLoader)contextClassLoader; - Path extLibsDir = MavenTestingUtils.getTestResourcePathDir("ext"); + Path extLibsDir = MavenTestingUtils.getTargetPath("test-classes/ext"); extLibsDir = extLibsDir.toAbsolutePath(); List expectedPaths; try (Stream s = Files.list(extLibsDir)) @@ -548,7 +548,7 @@ public static Stream extraClasspathDir() { List references = new ArrayList<>(); - Path extLibs = MavenTestingUtils.getTestResourcePathDir("ext"); + Path extLibs = MavenTestingUtils.getTargetPath("test-classes/ext"); extLibs = extLibs.toAbsolutePath(); // Absolute reference with trailing slash @@ -580,7 +580,7 @@ public void testExtraClasspathDir(String extraClassPathReference) throws Excepti WebAppContext context = new WebAppContext(); context.setContextPath("/"); - Path warPath = MavenTestingUtils.getTestResourcePathFile("wars/dump.war"); + Path warPath = MavenTestingUtils.getTargetPath("test-classes/wars/dump.war"); context.setBaseResource(new PathResource(warPath)); context.setExtraClasspath(extraClassPathReference); @@ -597,7 +597,7 @@ public void testExtraClasspathDir(String extraClassPathReference) throws Excepti WebAppClassLoader webAppClassLoader = (WebAppClassLoader)contextClassLoader; URL[] urls = webAppClassLoader.getURLs(); assertThat("URLs", urls.length, is(1)); - Path extLibs = MavenTestingUtils.getTestResourcePathDir("ext"); + Path extLibs = MavenTestingUtils.getTargetPath("test-classes/ext"); extLibs = extLibs.toAbsolutePath(); assertThat("URL[0]", urls[0].toURI(), is(extLibs.toUri())); } diff --git a/jetty-ee9/jetty-ee9-webapp/src/test/webapp-alt-jsp/WEB-INF/web.xml b/jetty-ee9/jetty-ee9-webapp/src/test/webapp-alt-jsp/WEB-INF/web.xml index c86c5dd7a344..0e02711024bb 100644 --- a/jetty-ee9/jetty-ee9-webapp/src/test/webapp-alt-jsp/WEB-INF/web.xml +++ b/jetty-ee9/jetty-ee9-webapp/src/test/webapp-alt-jsp/WEB-INF/web.xml @@ -17,7 +17,7 @@ precompiledName - org.eclipse.jetty.ee9.webapp.ForcedServletTest$FakePrecompiledJSP + ${fakePrecompiledJspClassName} precompiledName diff --git a/pom.xml b/pom.xml index cb7f86455eca..139115290fe2 100644 --- a/pom.xml +++ b/pom.xml @@ -179,6 +179,16 @@ true + + jetty.snapshots + https://oss.sonatype.org/content/repositories/jetty-snapshots + + false + + + true + + @@ -186,6 +196,7 @@ jetty-core jetty-integrations + jetty-ee8 jetty-ee9 jetty-ee10 jetty-home