Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #10437 - Refactor Local Deployment Scanning #12583

Open
wants to merge 119 commits into
base: jetty-12.1.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
119 commits
Select commit Hold shift + click to select a range
8878567
Initial pass at implementation of EnvironmentContextProvider
joakime Nov 22, 2024
3a46e37
Fixing javadoc errors
joakime Nov 22, 2024
c5c07c2
Moving things around
joakime Nov 25, 2024
e0bdeb3
Moving changes back into ContextProvider
joakime Nov 25, 2024
7588d5f
Introducing ContextProvider.configureEnvironment(String name)
joakime Nov 25, 2024
42015b3
Fixing <env>[-zzz].properties sorting
joakime Nov 26, 2024
f9c90ce
Allow an Environment to be removed (needed for testing with Environment)
joakime Nov 26, 2024
83fc5f1
Fixing test cases
joakime Nov 26, 2024
a0c9058
Merge remote-tracking branch 'origin/jetty-12.1.x' into fix/12.1.x/un…
joakime Nov 27, 2024
249679f
Fix javadoc
joakime Nov 27, 2024
bef04d9
Fix method names
joakime Nov 27, 2024
add337a
Fixing Environment contextClass loading
joakime Nov 27, 2024
2e9660d
Fixing test cases
joakime Nov 27, 2024
9bfab80
Fixing quickstart XML references to provider
joakime Nov 27, 2024
2c651ea
Merge remote-tracking branch 'origin/jetty-12.1.x' into fix/12.1.x/un…
joakime Dec 2, 2024
0e534f7
Fixing quickstart XML
joakime Dec 2, 2024
43eb679
Fixing deploy containerScanJarPattern for ee9/ee8
joakime Dec 2, 2024
c5a00b8
Merge remote-tracking branch 'origin/jetty-12.1.x' into fix/12.1.x/un…
joakime Dec 2, 2024
229e358
Merge remote-tracking branch 'origin/jetty-12.1.x' into fix/12.1.x/un…
joakime Dec 18, 2024
a363189
Changes from reviews. Preparing for BulkListener impl.
joakime Dec 18, 2024
5f6d504
Using BulkListener with sorted paths for alphabetical deployment.
joakime Dec 18, 2024
77c34c2
Changes from review
joakime Dec 18, 2024
5306c3d
More changes from review
joakime Dec 18, 2024
96d5bec
Simplify else
joakime Dec 19, 2024
ee18845
Reworking deploy.createContextHandler to be easier to follow
joakime Dec 20, 2024
e498f2c
Fixing WebAppContext default-context-path mistake
joakime Dec 20, 2024
2b0741b
Merge remote-tracking branch 'origin/jetty-12.1.x' into fix/12.1.x/un…
joakime Jan 2, 2025
9d9267d
Merge remote-tracking branch 'origin/jetty-12.1.x' into fix/12.1.x/un…
joakime Jan 14, 2025
cf69f26
Introducing DeploymentUnit to simplify added/changed/removed update b…
joakime Jan 15, 2025
4fd255b
Merge remote-tracking branch 'origin/jetty-12.1.x' into fix/12.1.x/un…
joakime Jan 15, 2025
1ebdd10
Fix deprecation warnings
joakime Jan 16, 2025
d5def4c
Introduce ChangeSetListener in Scanner
joakime Jan 16, 2025
54960bd
Changes from review
joakime Jan 16, 2025
c16fdf7
Changes from review
joakime Jan 16, 2025
bc1b50f
Adding environment configuration hotreload ability
joakime Jan 17, 2025
24eb791
Correct syntax
joakime Jan 17, 2025
4d286d7
Updating Unit.calcState javadoc and unit tests.
joakime Jan 20, 2025
40052bd
Use new Unit.getLivePaths() impl
joakime Jan 20, 2025
6806b58
Isolate and cleanup deploy test that manipulate the Environment singl…
joakime Jan 21, 2025
8f32176
Merge remote-tracking branch 'origin/jetty-12.1.x' into fix/12.1.x/un…
joakime Jan 21, 2025
f92901d
Correct XML from merge
joakime Jan 21, 2025
c7fdc92
Debug for failing `JettyWebSocketTest` on CI
joakime Jan 21, 2025
745f4fe
Issue warning for overlap on reserved env configuration names in the …
joakime Jan 22, 2025
456132f
Rollback DEBUG logging
joakime Jan 22, 2025
dfd741b
Use new war filenames properly
joakime Jan 22, 2025
72c7304
Overhaul based on last PR review
joakime Jan 23, 2025
fbedd51
Fixing compilation on OSGI modules
joakime Jan 23, 2025
4bb0850
Fixing deployer XML id
joakime Jan 23, 2025
1e29659
Fixing null OSGiApp.properties
joakime Jan 23, 2025
2acf58e
More work on test stability
joakime Jan 23, 2025
7b5cd4e
Fix directory deployment issue
joakime Jan 23, 2025
318ab9e
Fixing "core" deployments
joakime Jan 24, 2025
e8b6796
Merge remote-tracking branch 'origin/jetty-12.1.x' into fix/12.1.x/un…
joakime Jan 27, 2025
df5274e
Correct the Deployable.initializeDefaults behavior in DefaultContextH…
joakime Jan 27, 2025
2c65222
Remove dead code
joakime Jan 28, 2025
e045742
Remove references to old Unit class
joakime Jan 28, 2025
ef92632
Delete AppProvider interface, use component beans instead.
joakime Jan 28, 2025
d8a1e24
Reintroduce AppProvider & ContextHandlerFactory
joakime Jan 28, 2025
a36a26e
Removal of App interface, it compiles
joakime Jan 29, 2025
5b3ac27
Replace OSGiApp with OSGiDeployableBundleMetadata
joakime Jan 29, 2025
3b8f36e
Core rearrange
joakime Jan 29, 2025
39639dc
Fixing some naming
joakime Jan 29, 2025
75463bb
Merge remote-tracking branch 'origin/jetty-12.1.x' into fix/12.1.x/un…
joakime Jan 29, 2025
80dce8e
Rollback incorrect change to setJettyStandardIdsAndProperties
joakime Jan 30, 2025
b41cbd7
Fixing XML declarations
joakime Jan 30, 2025
87c3283
Removing DEBUG
joakime Jan 30, 2025
205e372
Correcting addBean / JMX
joakime Jan 30, 2025
e3c9f02
typo
joakime Jan 30, 2025
d14e5b5
More jetty-osgi fixes
joakime Jan 30, 2025
de22789
Fixing more deploy test setup
joakime Jan 30, 2025
25a1e25
Revert ContextHandler.id work
joakime Jan 31, 2025
dd0a613
The mass renaming of deploy begins.
joakime Jan 31, 2025
95a973a
Functioning jetty-deploy (again)
joakime Jan 31, 2025
266ea98
Fixing compilation issues
joakime Jan 31, 2025
810b655
Better excludes of internals
joakime Jan 31, 2025
5d2f2bb
Fixing accidentally exposed internal package
joakime Jan 31, 2025
33259b9
Fix compilation of DeploymentErrorTest
joakime Jan 31, 2025
d80f118
Correct for missing <Arg> in test XML
joakime Jan 31, 2025
aafcb0b
Changes from review
joakime Feb 3, 2025
d1d5d11
Fix spotless
joakime Feb 3, 2025
5ff6708
Correct OSGi attribute behavior
joakime Feb 3, 2025
ef98179
Updating names of variable in test
joakime Feb 3, 2025
20d2e5f
Add [tags] to deployment modules
joakime Feb 3, 2025
56fdc29
Fix sibling check in WebInfConfiguration.unpack
joakime Feb 3, 2025
a07aafc
Module names in --list-modules should be left justified.
joakime Feb 3, 2025
9f34adc
Doing some debugging on RedispatchPlansTests behaviors
joakime Feb 3, 2025
f980a29
Correcting jetty.webapps property creation from PathsContextHandlerFa…
joakime Feb 3, 2025
0daac61
Dump mainPath in PathsApp.toString
joakime Feb 3, 2025
315f074
core deploy should also have [tags]
joakime Feb 3, 2025
a1233bc
Revert "Fix sibling check in WebInfConfiguration.unpack"
joakime Feb 3, 2025
b0edf97
Sort test args coming from disk, for repeatable results.
joakime Feb 3, 2025
0790cc5
Move ATTRIBUTE_PREFIX from Deployable to PathsContextHandlerFactory
joakime Feb 3, 2025
3d0fc38
Cleanup attribute key names & value
joakime Feb 4, 2025
c3fd737
Adding more Listener testing to Scanner
joakime Feb 4, 2025
b38aa97
Scanner Listener failures propagate
joakime Feb 4, 2025
77a5429
Deployment fixes for throw on start behaviors
joakime Feb 4, 2025
5c93062
Revert Scanner Listener rethrowing
joakime Feb 4, 2025
b2ed720
Adding startup failure tests for jetty-deploy
joakime Feb 4, 2025
88b688b
Use renamed classname in testcase
joakime Feb 5, 2025
0587aac
Fixing attribute prefix stripping bug
joakime Feb 5, 2025
0f6665c
Cleanup java source
joakime Feb 5, 2025
3aed649
Cleaning up module metadata
joakime Feb 6, 2025
e41c9ec
Correcting deploy module deprecation description
joakime Feb 6, 2025
76bb61f
Merge remote-tracking branch 'origin/jetty-12.1.x' into fix/12.1.x/un…
joakime Feb 6, 2025
9f8b0f8
Merge remote-tracking branch 'origin/jetty-12.1.x' into fix/12.1.x/un…
joakime Feb 12, 2025
2cdcc05
Updating osgi test for new XML
joakime Feb 12, 2025
23abb35
Fixing osgi testing
joakime Feb 12, 2025
c952380
Merge remote-tracking branch 'origin/jetty-12.1.x' into fix/12.1.x/un…
joakime Feb 13, 2025
773e267
Util.set/getBundle changes
joakime Feb 13, 2025
21adcc8
Adding tests for <default-context-path> behavior when working with ju…
joakime Feb 14, 2025
da72f15
Don't use deprecated `deploy` module in other modules
joakime Feb 14, 2025
447646c
Improved default-context-path testing and implementation
joakime Feb 14, 2025
67ea7c1
Merge remote-tracking branch 'origin/jetty-12.1.x' into fix/12.1.x/un…
joakime Feb 14, 2025
3b6ed73
Use new Scanner.BulkListener
joakime Feb 14, 2025
4cf6b7e
Add missing init from XML based deployment
joakime Feb 14, 2025
c8c6ce0
CoreContextHandler is missing some context-path love
joakime Feb 14, 2025
2dfa6f7
Cleanup default-context-path behavior
joakime Feb 14, 2025
d10897f
Cleaning up old class references that no longer exist in javadoc/tests
joakime Feb 18, 2025
7f0711e
Merge remote-tracking branch 'origin/jetty-12.1.x' into fix/12.1.x/un…
joakime Feb 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions jetty-core/jetty-deploy/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,15 @@
<artifactId>jetty-slf4j-impl</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<!-- Using as ZIP to avoid having classes and dependencies live in test classloader -->
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-test-core-example-webapp</artifactId>
<version>${project.version}</version>
<classifier>core-webapp</classifier>
<type>zip</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.toolchain</groupId>
<artifactId>jetty-test-helper</artifactId>
Expand All @@ -53,6 +62,35 @@

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy-core-webapps</id>
<goals>
<goal>copy-dependencies</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<includeClassifiers>core-webapp</includeClassifiers>
<includeTypes>zip</includeTypes>
<outputDirectory>${project.build.directory}/core-webapps/</outputDirectory>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>true</overWriteSnapshots>
<stripClassifier>true</stripClassifier>
<stripVersion>true</stripVersion>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<excludePackageNames>*.internal,*.internal.*</excludePackageNames>
</configuration>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
Expand Down
37 changes: 0 additions & 37 deletions jetty-core/jetty-deploy/src/main/config/etc/jetty-core-deploy.xml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0"?><!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "https://jetty.org/configure_10_0.dtd">

<!-- =============================================================== -->
<!-- Create the deployment manager -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- The deployment manager handles the lifecycle of deploying web -->
<!-- applications via instances of ContextHandler. -->
<!-- =============================================================== -->
<Configure id="Server" class="org.eclipse.jetty.server.Server">
<Call name="addBean">
<Arg>
<New id="deploymentManager" class="org.eclipse.jetty.deploy.DeploymentManager">
<Set name="contexts">
<Ref refid="Contexts" />
</Set>

<!-- Add a customize step to the deployment lifecycle -->
<!-- uncomment and replace DebugBinding with your extended ContextHandlerLifeCycle.Binding class
<Call name="insertLifeCycleNode">
<Arg>deployed</Arg>
<Arg>starting</Arg>
<Arg>customise</Arg>
</Call>
-->
</New>
</Arg>
</Call>
</Configure>
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "https://jetty.org/configure_10_0.dtd">

<!-- =============================================================== -->
<!-- Create Default Deployment Provider -->
<!-- -->
<!-- The Default Deployment Provider is responsible for monitoring -->
<!-- provided directories for web applications and hot deploying -->
<!-- through the DeploymentManager. -->
<!-- =============================================================== -->
<Configure id="deploymentScanner" class="org.eclipse.jetty.deploy.DeploymentScanner">
<Arg name="server">
<Ref refid="Server" />
</Arg>
<Arg name="deploymentManager">
<Ref refid="deploymentManager" />
</Arg>
<Call name="addMonitoredDirectory">
<Arg>
<Call name="resolvedPath" class="org.eclipse.jetty.xml.XmlConfiguration">
<Arg>
<Property name="jetty.base" />
</Arg>
<Arg>
<Property name="jetty.deploy.monitoredDir" default="webapps" />
</Arg>
</Call>
</Arg>
</Call>
<Set name="environmentsDirectory">
<Call name="resolvedPath" class="org.eclipse.jetty.xml.XmlConfiguration">
<Arg>
<Property name="jetty.base" />
</Arg>
<Arg>
<Property name="jetty.deploy.environmentsDir" default="environments" />
</Arg>
</Call>
</Set>
<Set name="deferInitialScan" property="jetty.deploy.deferInitialScan" />
<Set name="scanInterval" property="jetty.deploy.scanInterval" />
</Configure>
20 changes: 9 additions & 11 deletions jetty-core/jetty-deploy/src/main/config/modules/deploy.mod
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
[description]
This module enables web application deployment from the `$JETTY_BASE/webapps` directory.
Deprecated `deploy` module (does nothing on its own)

[depend]
server
[deprecated]
Module 'deploy' is deprecated and does nothing on its own.
Use one of the environment specific modules '<env>-deploy' instead.

[lib]
lib/jetty-deploy-${jetty.version}.jar

[files]
webapps/

[xml]
etc/jetty-deploy.xml
[tags]
deployment
deprecated

[depends]
deployment/deployment-scanner
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[description]
This module enables the DeploymentManager

[tags]
deployment

[depend]
server

[lib]
lib/jetty-deploy-${jetty.version}.jar

[xml]
etc/jetty-deployment-manager.xml

Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
[description]
Enables application based on core handlers deployed from the $JETTY_BASE/webapps/ directory.
This module enables web application context scanning of the `$JETTY_BASE/webapps` directory.

[environment]
core
[tags]
deployment

[depend]
deploy
server
deployment/deployment-manager

[lib]
lib/jetty-deploy-${jetty.version}.jar

[files]
webapps/

[xml]
etc/jetty-core-deploy.xml

[ini]
contextHandlerClass?=org.eclipse.jetty.server.handler.ResourceHandler$ResourceContext
etc/jetty-deployment-scanner.xml

[ini-template]
## Monitored directory name (relative to $jetty.base)
Expand All @@ -30,6 +29,3 @@ contextHandlerClass?=org.eclipse.jetty.server.handler.ResourceHandler$ResourceCo

## Monitored directory scan period (seconds)
# jetty.deploy.scanInterval=0

## Default ContextHandler class for core deployments
# contextHandlerClass=org.eclipse.jetty.server.handler.ResourceHandler$ResourceContext
4 changes: 2 additions & 2 deletions jetty-core/jetty-deploy/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
{
requires java.xml;
requires org.eclipse.jetty.xml;
requires transitive org.eclipse.jetty.util;
requires transitive org.eclipse.jetty.server;
requires org.slf4j;

Expand All @@ -23,9 +24,8 @@

exports org.eclipse.jetty.deploy;
exports org.eclipse.jetty.deploy.bindings;
exports org.eclipse.jetty.deploy.graph;
exports org.eclipse.jetty.deploy.providers;

exports org.eclipse.jetty.deploy.jmx to
org.eclipse.jetty.jmx;
exports org.eclipse.jetty.deploy.internal;
}
Loading
Loading