Issue #2203 Provide module for using GlobalWebAppConfig with Deployer (#2215)

* Issue #2203 Provide module for using GlobalWebAppConfig with Deployer
This commit is contained in:
Jan Bartel 2018-03-01 14:45:07 +11:00 committed by GitHub
parent 8cf357a17d
commit 1173be318c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 48 additions and 0 deletions

View File

@ -0,0 +1,21 @@
<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_0.dtd">
<Configure id="Server" class="org.eclipse.jetty.server.Server">
<Ref refid="DeploymentManager">
<Call name="addLifeCycleBinding">
<Arg>
<New class="org.eclipse.jetty.deploy.bindings.GlobalWebappConfigBinding">
<Set name="jettyXml">
<Property>
<Name>jetty.deploy.webappCommonConfig</Name>
<Default>
<Property name="jetty.base"/>/etc/webapp-common.xml
</Default>
</Property>
</Set>
</New>
</Arg>
</Call>
</Ref>
</Configure>

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_3.dtd">
<Configure class="org.eclipse.jetty.webapp.WebAppContext">
<!-- ===================================== -->
<!-- Add common setup for all webapps here -->
<!-- ===================================== -->
</Configure>

View File

@ -0,0 +1,17 @@
[description]
Enables Deployer to apply common configuration to all webapp deployments
[depend]
deploy
[xml]
etc/global-webapp-common.xml
[files]
basehome:modules/global-webapp-common.d/global-webapp-common.xml|etc/global-webapp-common.xml
basehome:modules/global-webapp-common.d/webapp-common.xml|etc/webapp-common.xml
[ini-template]
# Location of webapp xml config file to apply after context xml
# jetty.deploy.webappCommonConfig=${jetty.base}/etc/webapp-common.xml