-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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 - Unify Deployer ContextProvider #12583
Open
joakime
wants to merge
26
commits into
jetty-12.1.x
Choose a base branch
from
fix/12.1.x/unify-deploy
base: jetty-12.1.x
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 18 commits
Commits
Show all changes
26 commits
Select commit
Hold shift click to select a range
8878567
Initial pass at implementation of EnvironmentContextProvider
joakime 3a46e37
Fixing javadoc errors
joakime c5c07c2
Moving things around
joakime e0bdeb3
Moving changes back into ContextProvider
joakime 7588d5f
Introducing ContextProvider.configureEnvironment(String name)
joakime 42015b3
Fixing <env>[-zzz].properties sorting
joakime f9c90ce
Allow an Environment to be removed (needed for testing with Environment)
joakime 83fc5f1
Fixing test cases
joakime a0c9058
Merge remote-tracking branch 'origin/jetty-12.1.x' into fix/12.1.x/un…
joakime 249679f
Fix javadoc
joakime bef04d9
Fix method names
joakime add337a
Fixing Environment contextClass loading
joakime 2e9660d
Fixing test cases
joakime 9bfab80
Fixing quickstart XML references to provider
joakime 2c651ea
Merge remote-tracking branch 'origin/jetty-12.1.x' into fix/12.1.x/un…
joakime 0e534f7
Fixing quickstart XML
joakime 43eb679
Fixing deploy containerScanJarPattern for ee9/ee8
joakime c5a00b8
Merge remote-tracking branch 'origin/jetty-12.1.x' into fix/12.1.x/un…
joakime 229e358
Merge remote-tracking branch 'origin/jetty-12.1.x' into fix/12.1.x/un…
joakime a363189
Changes from reviews. Preparing for BulkListener impl.
joakime 5f6d504
Using BulkListener with sorted paths for alphabetical deployment.
joakime 77c34c2
Changes from review
joakime 5306c3d
More changes from review
joakime 96d5bec
Simplify else
joakime ee18845
Reworking deploy.createContextHandler to be easier to follow
joakime e498f2c
Fixing WebAppContext default-context-path mistake
joakime File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
38 changes: 7 additions & 31 deletions
38
jetty-core/jetty-deploy/src/main/config/etc/jetty-core-deploy.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 1,13 @@ | ||
<?xml version="1.0"?><!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "https://jetty.org/configure_10_0.dtd"> | ||
|
||
<!-- =============================================================== --> | ||
<!-- Attach the "core" environment app deployment provider --> | ||
<!-- Configure the "core" environment deployment defaults --> | ||
<!-- =============================================================== --> | ||
<Configure id="Server" class="org.eclipse.jetty.server.Server"> | ||
<Call id="DeploymentManager" name="getBean"> | ||
<Arg><Call class="java.lang.Class" name="forName"><Arg>org.eclipse.jetty.deploy.DeploymentManager</Arg></Call></Arg> | ||
<Configure id="contextProvider" class="org.eclipse.jetty.deploy.providers.ContextProvider"> | ||
<Call name="configureEnvironment"> | ||
<Arg>core</Arg> | ||
<Set name="contextHandlerClass"> | ||
<Property name="contextHandlerClass" default="org.eclipse.jetty.server.handler.ResourceHandler$ResourceContext" /> | ||
</Set> | ||
</Call> | ||
<Ref refid="Environment"> | ||
<Call name="setAttribute"> | ||
<Arg>contextHandlerClass</Arg> | ||
<Arg><Property name="contextHandlerClass"/></Arg> | ||
</Call> | ||
</Ref> | ||
<Ref refid="DeploymentManager"> | ||
<Call name="addAppProvider"> | ||
<Arg> | ||
<New id="WebAppProvider-core" class="org.eclipse.jetty.deploy.providers.ContextProvider"> | ||
<Set name="EnvironmentName">core</Set> | ||
<Set name="monitoredDirName"> | ||
<Call name="resolvePath" class="org.eclipse.jetty.xml.XmlConfiguration"> | ||
<Arg> | ||
<Property name="jetty.base" /> | ||
</Arg> | ||
<Arg> | ||
<Property name="jetty.deploy.monitoredDir" default="webapps" /> | ||
</Arg> | ||
</Call> | ||
</Set> | ||
<Set name="deferInitialScan" property="jetty.deploy.deferInitialScan"/> | ||
<Set name="scanInterval" property="jetty.deploy.scanInterval"/> | ||
</New> | ||
</Arg> | ||
</Call> | ||
</Ref> | ||
</Configure> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
jetty-core/jetty-deploy/src/main/config/etc/jetty-deployment-manager.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1,29 @@ | ||
<?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. Apps are provided by instances of the --> | ||
<!-- AppProvider interface. --> | ||
<!-- =============================================================== --> | ||
<Configure id="Server" class="org.eclipse.jetty.server.Server"> | ||
<Call name="addBean"> | ||
<Arg> | ||
<New id="DeploymentManager" class="org.eclipse.jetty.deploy.DeploymentManager"> | ||
joakime marked this conversation as resolved.
Show resolved
Hide resolved
|
||
<Set name="contexts"> | ||
<Ref refid="Contexts" /> | ||
</Set> | ||
|
||
<!-- Add a customize step to the deployment lifecycle --> | ||
<!-- uncomment and replace DebugBinding with your extended AppLifeCycle.Binding class | ||
<Call name="insertLifeCycleNode"> | ||
<Arg>deployed</Arg> | ||
<Arg>starting</Arg> | ||
<Arg>customise</Arg> | ||
</Call> | ||
--> | ||
</New> | ||
</Arg> | ||
</Call> | ||
</Configure> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
jetty-core/jetty-deploy/src/main/config/modules/deployment-manager.mod
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1,12 @@ | ||
[description] | ||
joakime marked this conversation as resolved.
Show resolved
Hide resolved
|
||
This module enables the DeploymentManager | ||
|
||
[depend] | ||
server | ||
|
||
[lib] | ||
lib/jetty-deploy-${jetty.version}.jar | ||
|
||
[xml] | ||
etc/jetty-deployment-manager.xml | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should it be an error to configure more than one
ContextProvider
that is scanning the same directory?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wouldn't consider that an error.
Sure, it is a weird configuration.
Plus, I don't want to implement directory scanning lock files to prevent that kind of configuration.