Commit Graph

23 Commits

Author SHA1 Message Date
Greg Wilkins 4b67abcf38
Jetty 12 immutable ee10 configurations (#9724)
* Immutable EE10 Configurations
2023-05-13 08:17:42 +02:00
Greg Wilkins 7275bf15a9
Jetty 12.0.x core security (#9405)
core security module

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
Signed-off-by: gregw <gregw@webtide.com>
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Co-authored-by: Lachlan Roberts <lachlan@webtide.com>
Co-authored-by: Jan Bartel <janb@webtide.com>
Co-authored-by: Simone Bordet <simone.bordet@gmail.com>
2023-05-02 15:35:49 +02:00
Olivier Lamy 46018e6057
Jetty-12.0.x tests in parallel (down build time on CI from 1h25 to 55min) some modules are still not parallel due to some static usage (#9635)
* parallel tests runs

---------

Signed-off-by: Olivier Lamy <olamy@apache.org>
2023-04-21 10:42:12 +10:00
gregw a15af55a56 Merge remote-tracking branch 'origin/jetty-11.0.x' into jetty-12.0.x
Signed-off-by: gregw <gregw@webtide.com>
2023-02-15 15:31:33 +11:00
Simone Bordet cd732a175c
Review and normalized all Maven module <name> for consistency.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-01-27 19:09:30 +01:00
Greg Wilkins ac6abb307d
ResourceHandler set base resource as string (#8735)
* ResourceHandler set base resource as string

* ResourceCollection should not have a path

fixed tests
2022-10-21 09:32:54 +11:00
Joakim Erdfelt 259deea2f7
Jetty 12 - Resource `resolve()` and `newResource()` return null on resources that do not exist (#8702)
* Resource `resolve()` and `newResource()` return null on resources that do not exist
* Introduce `Resources` utility methods and use them
* Updating javadoc
2022-10-19 15:50:37 -05:00
Joakim Erdfelt a8e81ebb39
Using WorkDir properly 2022-10-13 09:57:12 -05:00
Joakim Erdfelt 597a6af31d
Jetty 12 : `Descriptor` cleanup (#8611)
+ Sanity check Resource being provided
+ Descriptor toString changed to include full URI to descriptor
  so that it can be used consistently in Logging and Exception messages.
+ New Descriptor.toURI() for use in Servlet Source and other logging messages
+ Servlet Source value is now the URI of the Descriptor
+ More cleanup around `Source` location/name
   .getResource() must be a Resource
   as it's used in the AnnotationIntrospector
   all others use new .getName()
   Not all location/name usages can be loaded as
   a Resource.
2022-09-28 09:09:16 -05:00
Joakim Erdfelt 3eca6901cc
Jetty 12 : ResourceFactory.of(WebAppContext) to WebAppContext.getResourceFactory() (#8610)
* ResourceFactory.of(WebAppContext) to WebAppContext.getResourceFactory()
2022-09-23 05:38:21 -05:00
Simone Bordet 8953873e67
Merged branch 'jetty-11.0.x' into 'jetty-12.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-09-06 12:31:54 +02:00
Olivier Lamy 44a37746e6
Jetty 12 : reactivate `jetty-ee9-demo-embedded` and `jetty-ee9-demo-proxy-webapp` and add more (#8419)
* ee8 demos to use ee9 demos resources
* add jetty-ee8-demo-jaas-webapp
* add jetty-ee8-demo-jndi-webapp jetty-ee8-demo-mock-resources
* uhm jetty-ee8-demo-jetty-webapp have some issues
* fix jetty-ee8-demo-jetty-webapp
* fix some jetty-ee9-demo-embedded and add back jetty-ee8-demo-proxy-webapp
* demo-embedded need to have jetty-ee9-demo-jsp-webapp built first
* fixing more demos modules. Activate dist test for demo modules and all env


Signed-off-by: Olivier Lamy <oliver.lamy@gmail.com>
2022-08-12 17:52:53 +10:00
Ludovic Orban f943d095f4 rework ResourceFactory and Resource according to redux3 prototype
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2022-08-03 11:32:21 +02:00
Jan Bartel ef1cd2b35d Remove deprecated classes from annotation initialization. 2022-08-02 12:00:59 +10:00
Joakim Erdfelt c6c0eb0313
Jetty-12 : Immutable ResourceCollection and Context based mount management (#8337)
* Immutable ResourceCollection with mount management.

* Internal List<Resource> is now immutable so that .getResources() cannot be modified.
* Improved Resource.toJarFileUri implementation that keeps the deep archive references
* Introducing Resource.mountCollection() methods
  + ResourceCollection is now a private class
  + Resource.mountCollection() returns a Mount
  + Places that use this technique are now putting the Mount in the context's beans for the context to close those mounts.
* Cleanup names/comments in FileSystemResourceTest
* Adding missing test of attempting to create a Resource from a URI `jar:file:foo.jar!/` while not mounted.
* Reworked ResourceCollection behaviors based on feedback.
  + Eliminated all Resource.mountCollection() methods except the Collection<URI> one.
* Eliminated Resource.mountIfNeeded(Resource)
* Eliminated Resource.fromList implementations
* Introduced @gregw Resource.of() implementations
* Introduced Resource.split() to honor old split logic from Jetty 9/10/11, with glob support, but now it only converts to List<URI>
* Remove IOException from Mount.root() method
* ResourceCollection now flattens and uniques any nested ResourceCollection entries it encounters
* Expanded ResourceCollectionTest to cover more code paths
* Add ResourceTest for new split() method
* Fixing testcase to use a directory that exists on setExtraClasspath
* Increase reliability of WebAppContextTests
* Updates for working with webapp.extraClasspath
* Introduced Resource.unwrapContainer to help in servlet cases where the raw JAR path should be represented in a ServletContext attribute.
* Made FileSystemPool.containerUri just use new Resource.unwrapContainer
* webapp MetaData updated to use URIs references to Libs (not File objects)
* jetty-ee#-maven-plugin use URIs for its classpath tracking to aid in mounting issues later
* webapp extraClasspath supports raw JAR references as well as glob now, supported by Resource.split(String)
2022-07-28 08:59:17 -05:00
Jan Bartel fccf8a9f51 Enable tests 2022-07-13 13:41:17 +10:00
Jan Bartel 1e30b3ace5 Add ee10 env scope for JNDI 2022-07-13 12:55:19 +10:00
Ludovic Orban 23a0203547 rework Resource API (#8106)
* remove Resource.getFile() and replace its usages with Resource.getPath()
* remove all public PathResource ctors + add non-leaky FS mounting mechanism + interpret string as Path when not a schemed URI
* rename Resource.getResource to Resource.resolve, specifying that the subpath is URI-path-interpreted
* remove useless API methods + deprecate all path-related API
* make subpaths beginning with / resolved as relative to the given uri
* introduce filesystem pooling and generalize resource resolving code
* remove URLResource
* remove unneeded factory method
* both file: and jrt: should not be pooled
* move deprecated impls from PathResource down to Resource + fix some tests
* handle Resource's pointing to non-existent jar files
* Force Resource URIs to end with "/" when the resource is a directory
* Produce warning if attempting to release a mounted filesystem uri that doesn't exist in the pool.

Co-authored-by: Greg Wilkins <gregw@webtide.com>
Co-authored-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
Co-authored-by: Ludovic Orban <lorban@bitronix.be>
2022-07-12 10:10:30 +10:00
Jan Bartel 04e0ee7fe7 Undisable jetty-plus tests; remove unused jetty-plus.xml 2022-06-23 10:09:34 +10:00
Jan Bartel 9893c81abf
Jetty 12.0.x update jakarta api versions (#8192)
* update to latest jakarta official releases
2022-06-22 10:32:54 +10:00
Jan Bartel 43c662a3ac Fix more ee10 modules. 2022-05-30 18:50:23 +10:00
Greg Wilkins 428a9d568f Reverted to use Resource as BaseResource 2022-05-03 19:28:53 +02:00
Greg Wilkins 0a32147e89 Jetty-12 Restructure
Copied ee10 from hackathon branch

Co-authored-by: Greg Wilkins <gregw@webtide.com>
Co-authored-by: Jan Bartel <janb@webtide.com>
Co-authored-by: Joakim Erdfelt <joakim@webtide.com>
Co-authored-by: Lachlan Roberts <lachlan@webtide.com>
Co-authored-by: Ludovic Orban <lorban@webtide.com>
Co-authored-by: Olivier Lamy <olamy@webtide.com>
Co-authored-by: Simone Bordet <sbordet@webtide.com>
2022-05-03 15:52:44 +02:00