Issue #3719 clean up modules (#3720)

* Issue #3719 clean up modules

Signed-off-by: Greg Wilkins <gregw@webtide.com>
This commit is contained in:
Greg Wilkins 2019-06-03 11:11:18 +02:00 committed by GitHub
parent 3208af6c1c
commit 301934cc68
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 161 additions and 48 deletions

View File

@ -350,7 +350,8 @@
<arguments>
<argument>jetty.home=${assembly-directory}</argument>
<argument>jetty.base=${assembly-directory}/demo-base</argument>
<argument>--add-to-startd=server,deploy,websocket,ext,resources,client,annotations,jndi,servlets,jsp,jstl,http,https,test-keystore</argument>
<argument>--create-startd</argument>
<argument>--add-to-start=server,requestlog,deploy,websocket,ext,resources,client,annotations,jndi,servlets,jsp,jstl,http,https,demo</argument>
</arguments>
</configuration>
<goals>

View File

@ -22,8 +22,8 @@
</Set>
<Get id="Rewrite" name="ruleContainer"/>
<!-- see rewrite-compactpath.xml for example how to add a rule -->
<!-- see rewrite-rules.xml in $JETTY_BASE for how to add a rule(s) -->
</New>
</Arg>

View File

@ -13,8 +13,12 @@ server
[lib]
lib/jetty-rewrite-${jetty.version}.jar
[files]
basehome:modules/rewrite/rewrite-rules.xml|etc/rewrite-rules.xml
[xml]
etc/jetty-rewrite.xml
etc/rewrite-rules.xml
[ini-template]
## Whether to rewrite the request URI

View File

@ -0,0 +1,106 @@
<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_3.dtd">
<Configure id="Rewrite" class="org.eclipse.jetty.rewrite.handler.RuleContainer">
<!-- Add rule to protect against IE ssl bug
<Call name="addRule">
<Arg>
<New class="org.eclipse.jetty.rewrite.handler.MsieSslRule"/>
</Arg>
</Call>
-->
<!-- protect favicon handling
<Call name="addRule">
<Arg>
<New class="org.eclipse.jetty.rewrite.handler.HeaderPatternRule">
<Set name="pattern">/favicon.ico</Set>
<Set name="name">Cache-Control</Set>
<Set name="value">Max-Age=3600,public</Set>
<Set name="terminating">true</Set>
</New>
</Arg>
</Call>
-->
<!-- redirect from the welcome page to a specific page
<Call name="addRule">
<Arg>
<New class="org.eclipse.jetty.rewrite.handler.RewritePatternRule">
<Set name="pattern">/test/rewrite/</Set>
<Set name="replacement">/test/rewrite/info.html</Set>
</New>
</Arg>
</Call>
-->
<!-- replace the entire request URI
<Call name="addRule">
<Arg>
<New class="org.eclipse.jetty.rewrite.handler.RewritePatternRule">
<Set name="pattern">/test/some/old/context</Set>
<Set name="replacement">/test/rewritten/newcontext</Set>
</New>
</Arg>
</Call>
-->
<!-- replace the beginning of the request URI
<Call name="addRule">
<Arg>
<New class="org.eclipse.jetty.rewrite.handler.RewritePatternRule">
<Set name="pattern">/test/rewrite/for/*</Set>
<Set name="replacement">/test/rewritten/</Set>
</New>
</Arg>
</Call>
-->
<!-- reverse the order of the path sections
<Call name="addRule">
<Arg>
<New class="org.eclipse.jetty.rewrite.handler.RewriteRegexRule">
<Set name="regex">(.*?)/reverse/([^/]*)/(.*)</Set>
<Set name="replacement">$1/reverse/$3/$2</Set>
</New>
</Arg>
</Call>
-->
<!-- add a cookie to each path visited
<Call name="addRule">
<Arg>
<New class="org.eclipse.jetty.rewrite.handler.CookiePatternRule">
<Set name="pattern">/*</Set>
<Set name="name">visited</Set>
<Set name="value">yes</Set>
</New>
</Arg>
</Call>
-->
<!-- actual redirect, instead of internal rewrite
<Call name="addRule">
<Arg>
<New class="org.eclipse.jetty.rewrite.handler.RedirectPatternRule">
<Set name="pattern">/test/redirect/*</Set>
<Set name="location">/test/redirected</Set>
</New>
</Arg>
</Call>
-->
<!-- add a response rule
<Call name="addRule">
<Arg>
<New class="org.eclipse.jetty.rewrite.handler.ResponsePatternRule">
<Set name="pattern">/400Error</Set>
<Set name="code">400</Set>
<Set name="message">ResponsePatternRule Demo</Set>
</New>
</Arg>
</Call>
-->
</Configure>

View File

@ -30,7 +30,7 @@
<!-- Format String -->
<Arg>
<Property name="jetty.customrequestlog.formatString">
<Property name="jetty.requestlog.formatString" deprecated="jetty.customrequestlog.formatString">
<Default>
<Get class="org.eclipse.jetty.server.CustomRequestLog" name="EXTENDED_NCSA_FORMAT"/>
</Default>

View File

@ -1,43 +1,11 @@
DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
[description]
An implementation of requestlog using CustomRequestLog and AsyncRequestLogWriter
[provides]
requestlog-impl
Deprecated name for requestlog using custom request logger
[tags]
requestlog
logging
[depend]
server
[depends]
requestlog
[xml]
etc/jetty-customrequestlog.xml
[files]
logs/
basehome:modules/requestlog/jetty-customrequestlog.xml|etc/jetty-customrequestlog.xml
[ini-template]
## Format string
# jetty.customrequestlog.formatString=%a - %u %{dd/MMM/yyyy:HH:mm:ss ZZZ|GMT}t "%r" %s %B "%{Referer}i" "%{User-Agent}i" "%C"
## Logging directory (relative to $jetty.base)
# jetty.requestlog.dir=logs
## File path
# jetty.requestlog.filePath=${jetty.requestlog.dir}/yyyy_mm_dd.request.log
## Date format for rollovered files (uses SimpleDateFormat syntax)
# jetty.requestlog.filenameDateFormat=yyyy_MM_dd
## How many days to retain old log files
# jetty.requestlog.retainDays=90
## Whether to append to existing file
# jetty.requestlog.append=false
## Timezone of the log file rollover
# jetty.requestlog.timezone=GMT

View File

@ -1,12 +1,39 @@
DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
[description]
Enables the default custom request log.
Log requests using CustomRequestLog and AsyncRequestLogWriter
[tags]
requestlog
logging
[depends]
customrequestlog
[depend]
server
[xml]
etc/jetty-requestlog.xml
[files]
logs/
[ini-template]
## Format string
# jetty.requestlog.formatString=%a - %u %{dd/MMM/yyyy:HH:mm:ss ZZZ|GMT}t "%r" %s %B "%{Referer}i" "%{User-Agent}i" "%C"
## Logging directory (relative to $jetty.base)
# jetty.requestlog.dir=logs
## File path
# jetty.requestlog.filePath=${jetty.requestlog.dir}/yyyy_mm_dd.request.log
## Date format for rollovered files (uses SimpleDateFormat syntax)
# jetty.requestlog.filenameDateFormat=yyyy_MM_dd
## How many days to retain old log files
# jetty.requestlog.retainDays=90
## Whether to append to existing file
# jetty.requestlog.append=false
## Timezone of the log file rollover
# jetty.requestlog.timezone=GMT

View File

@ -4,20 +4,27 @@
# Additional ini files are in demo-base/start.d
#
# Enable security via jaas, and configure it
--module=jaas
jetty.jaas.login.conf=etc/login.conf
[depends]
rewrite
jaas
test-keystore
[xml]
# Enable rewrite examples
--module=rewrite
etc/demo-rewrite-rules.xml
# Add the test realm
etc/test-realm.xml
[ini-template]
# Enable security via jaas, and configure it
jetty.jaas.login.conf=etc/login.conf
# Websocket chat examples needs websocket enabled
# Don't start for all contexts (set to true in test.xml context)
org.eclipse.jetty.websocket.jsr356=false
--module=websocket
# Create and configure the test realm
etc/test-realm.xml
jetty.demo.realm=etc/realm.properties