diff --git a/jetty-client/src/main/java/org/eclipse/jetty/client/api/Response.java b/jetty-client/src/main/java/org/eclipse/jetty/client/api/Response.java index 72c85bce73e..c43d91365f3 100644 --- a/jetty-client/src/main/java/org/eclipse/jetty/client/api/Response.java +++ b/jetty-client/src/main/java/org/eclipse/jetty/client/api/Response.java @@ -147,6 +147,13 @@ public interface Response public interface AsyncContentListener extends ResponseListener { + /** + * Callback method invoked asynchronously when the response content has been received. + * + * @param response the response containing the response line data and the headers + * @param content the content bytes received + * @param callback the callback to call when the content is consumed. + */ public void onContent(Response response, ByteBuffer content, Callback callback); } diff --git a/jetty-distribution/src/main/resources/etc/hawtio.xml b/jetty-distribution/src/main/resources/etc/hawtio.xml new file mode 100644 index 00000000000..228adc159a3 --- /dev/null +++ b/jetty-distribution/src/main/resources/etc/hawtio.xml @@ -0,0 +1,16 @@ + + + + + + + + /hawtio + /lib/hawtio/hawtio.war + true + false + /etc/webdefault.xml + + + + diff --git a/jetty-distribution/src/main/resources/etc/jamon.xml b/jetty-distribution/src/main/resources/etc/jamon.xml new file mode 100644 index 00000000000..d00d9c7f51e --- /dev/null +++ b/jetty-distribution/src/main/resources/etc/jamon.xml @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + /jamon + /lib/jamon/jamon.war + true + false + /etc/webdefault.xml + + + + + + diff --git a/jetty-distribution/src/main/resources/etc/jminix.xml b/jetty-distribution/src/main/resources/etc/jminix.xml new file mode 100644 index 00000000000..1be47579cb8 --- /dev/null +++ b/jetty-distribution/src/main/resources/etc/jminix.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/jetty-distribution/src/main/resources/etc/jolokia.xml b/jetty-distribution/src/main/resources/etc/jolokia.xml new file mode 100644 index 00000000000..575912f9b78 --- /dev/null +++ b/jetty-distribution/src/main/resources/etc/jolokia.xml @@ -0,0 +1,16 @@ + + + + + + + + /jolokia + /lib/jolokia/jolokia.war + true + false + /etc/webdefault.xml + + + + diff --git a/jetty-distribution/src/main/resources/modules/hawtio.mod b/jetty-distribution/src/main/resources/modules/hawtio.mod new file mode 100644 index 00000000000..7b175f352d9 --- /dev/null +++ b/jetty-distribution/src/main/resources/modules/hawtio.mod @@ -0,0 +1,22 @@ +# +# Hawtio x module +# + +[depend] +stats +deploy +jmx + +[xml] +etc/hawtio.xml + +[files] +etc/hawtio/ +lib/hawtio/ +https://oss.sonatype.org/content/repositories/public/io/hawt/hawtio-default/1.4.16/hawtio-default-1.4.16.war|lib/hawtio/hawtio.war + +[ini-template] + +-Dhawtio.authenticationEnabled=false +-Dhawtio.dirname=/dirname +-Dhawtio.config.dir=${jetty.base}/etc/hawtio diff --git a/jetty-distribution/src/main/resources/modules/jamon.mod b/jetty-distribution/src/main/resources/modules/jamon.mod new file mode 100644 index 00000000000..57af388aacd --- /dev/null +++ b/jetty-distribution/src/main/resources/modules/jamon.mod @@ -0,0 +1,25 @@ +# +# JaMON Jetty module +# + +[depend] +stats +deploy +jmx +jsp + +[xml] +etc/jamon.xml + +[files] +lib/jamon/ +http://central.maven.org/maven2/com/jamonapi/jamon/2.79/jamon-2.79.jar|lib/jamon/jamon-2.79.jar +http://central.maven.org/maven2/com/jamonapi/jamon_war/2.79/jamon_war-2.79.war|lib/jamon/jamon.war + +[lib] +lib/jamon/**.jar + +[ini-template] +jamon.summaryLabels=default, request.getStatus().contextpath.value.ms +#jamon.summaryLabels=demo + diff --git a/jetty-distribution/src/main/resources/modules/jminix.mod b/jetty-distribution/src/main/resources/modules/jminix.mod new file mode 100644 index 00000000000..af334ff2194 --- /dev/null +++ b/jetty-distribution/src/main/resources/modules/jminix.mod @@ -0,0 +1,36 @@ +# +# JaMON Jetty module +# + +[depend] +stats +jmx + +[xml] +etc/jminix.xml + +[files] +lib/jminix/ +http://central.maven.org/maven2/org/jminix/jminix/1.1.0/jminix-1.1.0.jar|lib/jminix/jminix-1.1.0.jar +http://maven.restlet.com/org/restlet/org.restlet/1.1.5/org.restlet-1.1.5.jar|lib/jminix/org.restlet-1.1.5.jar +http://maven.restlet.com/org/restlet/org.restlet.ext.velocity/1.1.5/org.restlet.ext.velocity-1.1.5.jar|lib/jminix/org.restlet.ext.velocity-1.1.5.jar +http://central.maven.org/maven2/org/apache/velocity/velocity/1.5/velocity-1.5.jar|lib/jminix/velocity-1.5.jar +http://central.maven.org/maven2/oro/oro/2.0.8/oro-2.0.8.jar|lib/jminix/oro-2.0.8.jar +http://maven.restlet.com/com/noelios/restlet/com.noelios.restlet/1.1.5/com.noelios.restlet-1.1.5.jar|lib/jminix/com.noelios.restlet-1.1.5.jar +http://maven.restlet.com/com/noelios/restlet/com.noelios.restlet.ext.servlet/1.1.5/com.noelios.restlet.ext.servlet-1.1.5.jar|lib/jminix/com.noelios.restlet.ext.servlet-1.1.5.jar +http://central.maven.org/maven2/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar|lib/jminix/commons-logging-1.1.1.jar +http://repo2.maven.org/maven2/net/sf/json-lib/json-lib/2.2.3/json-lib-2.2.3-jdk15.jar|lib/jminix/json-lib-2.2.3-jdk15.jar +http://central.maven.org/maven2/commons-lang/commons-lang/2.4/commons-lang-2.4.jar|lib/jminix/commons-lang-2.4.jar +http://central.maven.org/maven2/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0.jar|lib/jminix/commons-beanutils-1.7.0.jar +http://central.maven.org/maven2/commons-collections/commons-collections/3.2/commons-collections-3.2.jar|lib/jminix/commons-collections-3.2.jar +http://central.maven.org/maven2/net/sf/ezmorph/ezmorph/1.0.6/ezmorph-1.0.6.jar|lib/jminix/ezmorph-1.0.6.jar +http://central.maven.org/maven2/org/jgroups/jgroups/2.12.1.3.Final/jgroups-2.12.1.3.Final.jar|lib/jminix/jgroups-2.12.1.3.Final.jar +http://central.maven.org/maven2/org/jasypt/jasypt/1.8/jasypt-1.8.jar|lib/jminix/jasypt-1.8.jar + +[lib] +lib/jminix/**.jar + +[ini-template] +# Jminix Configuration +jminix.port=8088 + diff --git a/jetty-distribution/src/main/resources/modules/jolokia.mod b/jetty-distribution/src/main/resources/modules/jolokia.mod new file mode 100644 index 00000000000..d4c6eab659d --- /dev/null +++ b/jetty-distribution/src/main/resources/modules/jolokia.mod @@ -0,0 +1,15 @@ +# +# Jolokia Jetty module +# + +[depend] +stats +deploy +jmx + +[xml] +etc/jolokia.xml + +[files] +http://repo1.maven.org/maven2/org/jolokia/jolokia-war/1.2.2/jolokia-war-1.2.2.war|lib/jolokia/jolokia.war + diff --git a/jetty-distribution/src/main/resources/modules/jsp.mod b/jetty-distribution/src/main/resources/modules/jsp.mod index fa5b9fdfa95..bb31ca75992 100644 --- a/jetty-distribution/src/main/resources/modules/jsp.mod +++ b/jetty-distribution/src/main/resources/modules/jsp.mod @@ -4,6 +4,7 @@ [depend] servlet +annotations jsp-impl/${jsp-impl}-jsp [ini-template] diff --git a/jetty-io/src/main/java/org/eclipse/jetty/io/ssl/SslConnection.java b/jetty-io/src/main/java/org/eclipse/jetty/io/ssl/SslConnection.java index 95b9c8bcd12..7ac32a0ef34 100644 --- a/jetty-io/src/main/java/org/eclipse/jetty/io/ssl/SslConnection.java +++ b/jetty-io/src/main/java/org/eclipse/jetty/io/ssl/SslConnection.java @@ -773,7 +773,7 @@ public class SslConnection extends AbstractConnection { if (DEBUG) LOG.debug("{} renegotiation denied", SslConnection.this); - shutdownOutput(); + getEndPoint().shutdownOutput(); return allConsumed; } diff --git a/jetty-start/src/main/java/org/eclipse/jetty/start/CommandLineBuilder.java b/jetty-start/src/main/java/org/eclipse/jetty/start/CommandLineBuilder.java index 8f4fd8c4c92..eb51b5f941d 100644 --- a/jetty-start/src/main/java/org/eclipse/jetty/start/CommandLineBuilder.java +++ b/jetty-start/src/main/java/org/eclipse/jetty/start/CommandLineBuilder.java @@ -176,18 +176,21 @@ public class CommandLineBuilder @Override public String toString() + { + return toString(" "); + } + + public String toString(String delim) { StringBuilder buf = new StringBuilder(); - boolean delim = false; for (String arg : args) { - if (delim) + if (buf.length()>0) { - buf.append(' '); + buf.append(delim); } buf.append(quote(arg)); - delim = true; } return buf.toString(); diff --git a/jetty-start/src/main/java/org/eclipse/jetty/start/Main.java b/jetty-start/src/main/java/org/eclipse/jetty/start/Main.java index 965333b9d65..d19b85ca1f6 100644 --- a/jetty-start/src/main/java/org/eclipse/jetty/start/Main.java +++ b/jetty-start/src/main/java/org/eclipse/jetty/start/Main.java @@ -654,7 +654,7 @@ public class Main if (args.isDryRun()) { CommandLineBuilder cmd = args.getMainArgs(baseHome,true); - System.out.println(cmd.toString()); + System.out.println(cmd.toString(File.separatorChar=='/'?" \\\n":" ")); } if (args.isStopCommand()) diff --git a/jetty-start/src/main/java/org/eclipse/jetty/start/Modules.java b/jetty-start/src/main/java/org/eclipse/jetty/start/Modules.java index c0570a36041..425962eecfd 100644 --- a/jetty-start/src/main/java/org/eclipse/jetty/start/Modules.java +++ b/jetty-start/src/main/java/org/eclipse/jetty/start/Modules.java @@ -331,6 +331,7 @@ public class Modules implements Iterable parentNames.addAll(module.getParentNames()); for(String name: parentNames) { + StartLog.debug("Enable parent '%s' of module: %s",name,module.getName()); Module parent = modules.get(name); if (parent == null) { @@ -469,6 +470,7 @@ public class Modules implements Iterable // load missing post-expanded dependent modules private void normalizeDependencies() throws FileNotFoundException, IOException { + Set expandedModules = new HashSet<>(); boolean done = false; while (!done) { @@ -479,26 +481,31 @@ public class Modules implements Iterable { for (String parent : m.getParentNames()) { - if (modules.containsKey(parent) || missingModules.contains(parent)) + String expanded = args.getProperties().expand(parent); + if (modules.containsKey(expanded) || missingModules.contains(parent) || expandedModules.contains(parent)) { continue; // found. skip it. } done = false; + StartLog.debug("Missing parent module %s == %s for %s",parent,expanded,m); missingParents.add(parent); } } for (String missingParent : missingParents) { - Path file = baseHome.getPath("modules/" + missingParent + ".mod"); + String expanded = args.getProperties().expand(missingParent); + Path file = baseHome.getPath("modules/" + expanded + ".mod"); if (FS.canReadFile(file)) { Module module = registerModule(file); updateParentReferencesTo(module); + if (!expanded.equals(missingParent)) + expandedModules.add(missingParent); } else { - StartLog.debug("Missing module definition: [ Mod: %s | File: %s ]",missingParent,file); + StartLog.debug("Missing module definition: %s == %s",missingParent,expanded); missingModules.add(missingParent); } } diff --git a/jetty-xml/src/main/java/org/eclipse/jetty/xml/XmlConfiguration.java b/jetty-xml/src/main/java/org/eclipse/jetty/xml/XmlConfiguration.java index 684216ff17d..26e0ebec562 100644 --- a/jetty-xml/src/main/java/org/eclipse/jetty/xml/XmlConfiguration.java +++ b/jetty-xml/src/main/java/org/eclipse/jetty/xml/XmlConfiguration.java @@ -1212,13 +1212,13 @@ public class XmlConfiguration // For all arguments, load properties for (String arg : args) { - if (arg.toLowerCase(Locale.ENGLISH).endsWith(".properties")) - properties.load(Resource.newResource(arg).getInputStream()); - else if (arg.indexOf('=')>=0) + if (arg.indexOf('=')>=0) { int i=arg.indexOf('='); properties.put(arg.substring(0,i),arg.substring(i+1)); } + else if (arg.toLowerCase(Locale.ENGLISH).endsWith(".properties")) + properties.load(Resource.newResource(arg).getInputStream()); } // For all arguments, parse XMLs