Merge branch 'jetty-9.2.x'

Conflicts:
	VERSION.txt
This commit is contained in:
Joakim Erdfelt 2014-10-29 15:52:05 -07:00
commit 8899f6d360
10 changed files with 130 additions and 103 deletions

View File

@ -31,6 +31,7 @@ jetty-9.2.4-SNAPSHOT
+ 444896 Overriding of web-default servlet mapping in web.xml not working with
quickstart
+ 445157 First redeployed servlet leaks WebAppContext
+ 445239 Rename weld.mod to cdi.mod to be consistent with past module namings
+ 445258 STOP.WAIT is not really respected
+ 445374 Reevaluate org.eclipse.jetty.websocket.jsr356 enablement concepts
+ 445495 Improve Exception message when no jndi resource to bind for a name in
@ -67,6 +68,8 @@ jetty-9.2.4-SNAPSHOT
+ 447979 Refactor to make MetaData responsible for progressively ordering
web-inf jars
+ 448156 Fixed INACTIVE race in IteratingCallback
+ 449001 Remove start.d directory from JETTY_HOME
+ 449038 WebSocketUpgradeFilter must support async.
jetty-9.3.0.M0 - 24 September 2014
+ 437395 Start / Properties in template sections should be default applied for

View File

@ -801,12 +801,12 @@
<artifactId>jetty-overlay-deployer</artifactId>
<version>${project.version}</version>
</dependency>
-->
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-cdi</artifactId>
<version>${project.version}</version>
</dependency>
-->
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-jaas</artifactId>

View File

@ -14,39 +14,55 @@ distributing Jetty.
RUNNING JETTY
=============
The run directory is either the top-level of a binary release
or jetty-distribution/target/assembly-prep directory when built from
or jetty-distribution/target/distribution directory when built from
source.
To run with the default options:
java -jar start.jar
$ cd demo-base
$ java -jar ../start.jar
To see the available options and the default arguments
provided by the start.ini file:
java -jar start.jar --help
$ java -jar /path/to/start.jar --help
Many Jetty features can be enabled by using the --module command
For example:
java -jar start.jar --module=https,deploy
$ cd mybase
$ java -jar /path/to/start.jar --module=https,deploy
Will enable HTTPS and its dependencies in the files start.ini
To list the know modules:
Will enable the https and deploy modules (and their transitive
dependencies) temporarily for this specific run of Jetty.
java -jar start.jar --list-modules
To see what modules are available
$ java -jar /path/to/start.jar --list-modules
JETTY BASE
==========
If the property jetty.base is defined on the command line, then the jetty start.jar
mechanism will look for start.ini, start.d, webapps and etc files relative to the
jetty.base and jetty.home directories
The jetty.base property is a property that can be defined on the
command line (defaults to what your java 'user.dir' property points to)
Jetty's start.jar mechanism will configure your jetty instance from
the configuration present in this jetty.base directory.
java -jar start.jar jetty.base=/opt/myjettybase/
Example setup:
# Create the base directory
$ mkdir mybase
$ cd mybase
# Initialize the base directory's start.ini and needed directories
$ java -jar /path/to/jetty-dist/start.jar --add-to-start=http,deploy
# Run this base directory configuration
$ java -jar /path/to/jetty-dist/start.jar

View File

@ -1,24 +0,0 @@
Jetty start.d ini directory
===========================
This start.d directory contains *.ini files that are appended to the effective command line
used to start jetty by the command:
java -jar start.jar
Each line in these files is prepended to the real command line as arguments, and may be either:
+ A property like: name=value
+ A module to enable like: --module=jmx
+ An XML configuration file like: etc/jetty-feature.xml
+ A start.jar option like: --exec
If --exec or --dry-run are used, then these files may also contain lines with:
+ A JVM option like: -Xmx2000m
+ A System Property like: -Dcom.sun.management.jmxremote
A template ini file may be created for known modules by using the --ini option.
For example to create an ini templates for https use the command
java -jar start.jar --ini=https

View File

@ -1,23 +1,22 @@
#===========================================================
# NOTE: Jetty is starting using LEGACY behavior
# Jetty Startup
#
# Starting Jetty from this {jetty.home} is LEGACY behavior.
# Starting Jetty from this {jetty.home} is not recommended.
#
# A proper {jetty.base} should be configured with no changes
# being made to this {jetty.home}.
# A proper {jetty.base} directory should be configured, instead
# of making changes to this {jetty.home} directory.
#
# See documentation about {jetty.base} at
# http://www.eclipse.org/jetty/documentation/current/startup.html
#
# A demo-base directory has been provided as an example of
# this setup.
# this sort of setup.
#
# $ cd demo-base
# $ java -jar ../start.jar
#
# This {jetty.home}/start.ini has been provided to duplicate
# historical default jetty-distribution settings.
#
#===========================================================
# To disable the warning message, uncomment the following line
# -Dorg.eclipse.jetty.start.home.warning=false
# To disable the warning message, comment the following line
--module=home-base-warning

View File

@ -0,0 +1,8 @@
<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_0.dtd">
<!-- ============================================================= -->
<!-- Display a Warning Message if {jetty.home} == {jetty.base} -->
<!-- ============================================================= -->
<Configure id="homeBaseWarning" class="org.eclipse.jetty.server.HomeBaseWarning">
</Configure>

View File

@ -0,0 +1,7 @@
#
# Home and Base Warning
#
[xml]
etc/home-base-warning.xml

View File

@ -0,0 +1,75 @@
//
// ========================================================================
// Copyright (c) 1995-2014 Mort Bay Consulting Pty. Ltd.
// ------------------------------------------------------------------------
// All rights reserved. This program and the accompanying materials
// are made available under the terms of the Eclipse Public License v1.0
// and Apache License v2.0 which accompanies this distribution.
//
// The Eclipse Public License is available at
// http://www.eclipse.org/legal/epl-v10.html
//
// The Apache License v2.0 is available at
// http://www.opensource.org/licenses/apache2.0.php
//
// You may elect to redistribute this code under either of these licenses.
// ========================================================================
//
package org.eclipse.jetty.server;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import org.eclipse.jetty.util.StringUtil;
import org.eclipse.jetty.util.log.Log;
import org.eclipse.jetty.util.log.Logger;
/**
* Display an optional Warning Message if the {jetty.home} and {jetty.base} are the same directory.
* <p>
* This is to warn about not recommended approach to setting up the Jetty Distribution.
*/
public class HomeBaseWarning
{
private static final Logger LOG = Log.getLogger(HomeBaseWarning.class);
public HomeBaseWarning()
{
boolean showWarn = false;
String home = System.getProperty("jetty.home");
String base = System.getProperty("jetty.base");
if (StringUtil.isBlank(base))
{
// no base defined? then we are likely running
// via direct command line.
return;
}
Path homePath = new File(home).toPath();
Path basePath = new File(base).toPath();
try
{
showWarn = Files.isSameFile(homePath,basePath);
}
catch (IOException e)
{
LOG.ignore(e);
// Can't definitively determine this state
return;
}
if (showWarn)
{
StringBuilder warn = new StringBuilder();
warn.append("This instance of Jetty is not running from a separate {jetty.base} directory");
warn.append(", this is not recommended. See documentation at http://www.eclipse.org/jetty/documentation/current/startup.html");
LOG.warn("{}",warn.toString());
}
}
}

View File

@ -1,51 +0,0 @@
//
// ========================================================================
// Copyright (c) 1995-2014 Mort Bay Consulting Pty. Ltd.
// ------------------------------------------------------------------------
// All rights reserved. This program and the accompanying materials
// are made available under the terms of the Eclipse Public License v1.0
// and Apache License v2.0 which accompanies this distribution.
//
// The Eclipse Public License is available at
// http://www.eclipse.org/legal/epl-v10.html
//
// The Apache License v2.0 is available at
// http://www.opensource.org/licenses/apache2.0.php
//
// You may elect to redistribute this code under either of these licenses.
// ========================================================================
//
package org.eclipse.jetty.start;
import java.util.concurrent.TimeUnit;
import org.eclipse.jetty.start.Props.Prop;
public class BaseHomeWarning
{
public static void show(Props props)
{
Prop showWarn = props.getProp("org.eclipse.jetty.start.home.warning",true);
if (showWarn == null || Boolean.parseBoolean(showWarn.value))
{
if (!Main.printTextResource("org/eclipse/jetty/start/base-home-warning.txt"))
{
StartLog.warn("It is not recommended to run Jetty from within {jetty.home}");
StartLog.warn("Use a proper {jetty.base} setup");
StartLog.warn("See: http://www.eclipse.org/jetty/documentation/current/startup.html");
}
try
{
System.err.print("Your startup will proceed shortly ...");
TimeUnit.SECONDS.sleep(2);
System.err.println();
}
catch (InterruptedException e)
{
e.printStackTrace();
}
}
}
}

View File

@ -780,12 +780,6 @@ public class Main
return;
}
// Warning Message
if (!baseHome.isBaseDifferent() && args.isNormalMainClass())
{
BaseHomeWarning.show(args.getProperties());
}
// execute Jetty in another JVM
if (args.isExec())
{