Reduced build logging for Travis.

This commit is contained in:
Simone Bordet 2013-05-04 00:26:29 +02:00
parent fad042015e
commit fe1b71f4a0
5 changed files with 58 additions and 51 deletions

View File

@ -1,3 +1,4 @@
language: java
jdk:
- openjdk7
- oraclejdk7

View File

@ -95,7 +95,7 @@
<version>${exam.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.ops4j.pax.runner</groupId>
<artifactId>pax-runner-no-jcl</artifactId>
@ -143,7 +143,7 @@
<!-- For sane logging -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.6.1</version>
<scope>test</scope>
</dependency>
@ -258,7 +258,7 @@
<version>${project.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.spdy</groupId>
<artifactId>spdy-core</artifactId>
@ -296,7 +296,7 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-plus</artifactId>

View File

@ -0,0 +1,13 @@
# LOG4J levels: OFF, FATAL, ERROR, WARN, INFO, DEBUG, ALL
#
log4j.rootLogger=ALL,CONSOLE
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
#log4j.appender.CONSOLE.threshold=INFO
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
#log4j.appender.CONSOLE.layout.ConversionPattern=%d %t [%5p][%c{1}] %m%n
log4j.appender.CONSOLE.layout.ConversionPattern=%d [%5p][%c] %m%n
# Level tuning
log4j.logger.org.eclipse.jetty=INFO
log4j.logger.org.ops4j=WARN

View File

@ -19,11 +19,9 @@
package org.eclipse.jetty.server;
import java.io.IOException;
import java.net.Inet4Address;
import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
@ -34,22 +32,18 @@ import java.util.TimerTask;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.xml.validation.Schema;
import org.eclipse.jetty.http.HttpField;
import org.eclipse.jetty.http.HttpFields;
import org.eclipse.jetty.http.HttpGenerator;
import org.eclipse.jetty.http.HttpHeader;
import org.eclipse.jetty.http.HttpMethod;
import org.eclipse.jetty.http.HttpScheme;
import org.eclipse.jetty.http.HttpStatus;
import org.eclipse.jetty.http.HttpURI;
import org.eclipse.jetty.http.HttpVersion;
import org.eclipse.jetty.server.handler.ContextHandler;
import org.eclipse.jetty.server.handler.HandlerWrapper;
import org.eclipse.jetty.util.Attributes;
@ -282,9 +276,9 @@ public class Server extends HandlerWrapper implements Attributes
{
if (getStopAtShutdown())
{
ShutdownThread.register(this);
ShutdownThread.register(this);
}
ShutdownMonitor.getInstance().start(); // initialize
LOG.info("jetty-"+getVersion());
@ -318,7 +312,7 @@ public class Server extends HandlerWrapper implements Attributes
if (isDumpAfterStart())
dumpStdErr();
// use DateCache timer for Date field reformat
final HttpFields.DateGenerator date = new HttpFields.DateGenerator();
long now=System.currentTimeMillis();
@ -335,8 +329,8 @@ public class Server extends HandlerWrapper implements Attributes
this.cancel();
}
},tick,1000);
mex.ifExceptionThrow();
}
@ -374,7 +368,7 @@ public class Server extends HandlerWrapper implements Attributes
if (stopTimeout>0)
{
long stop_by=System.currentTimeMillis()+stopTimeout;
LOG.info("Graceful shutdown {} by ",this,new Date(stop_by));
LOG.debug("Graceful shutdown {} by ",this,new Date(stop_by));
// Wait for shutdowns
for (Future<Void> future: futures)
@ -606,10 +600,10 @@ public class Server extends HandlerWrapper implements Attributes
break;
}
}
if (connector==null)
return null;
ContextHandler context = getChildHandlerByClass(ContextHandler.class);
try
@ -621,7 +615,7 @@ public class Server extends HandlerWrapper implements Attributes
host=context.getVirtualHosts()[0];
if (host==null)
host=InetAddress.getLocalHost().getHostAddress();
String path=context==null?null:context.getContextPath();
if (path==null)
path="/";
@ -633,7 +627,7 @@ public class Server extends HandlerWrapper implements Attributes
return null;
}
}
/* ------------------------------------------------------------ */
@Override
public String toString()
@ -646,7 +640,7 @@ public class Server extends HandlerWrapper implements Attributes
{
dumpBeans(out,indent,Collections.singleton(new ClassLoaderDump(this.getClass().getClassLoader())));
}
/* ------------------------------------------------------------ */
public static void main(String...args) throws Exception
{

View File

@ -40,7 +40,6 @@ import java.util.Map;
import java.util.Set;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.Future;
import javax.servlet.DispatcherType;
import javax.servlet.Filter;
import javax.servlet.FilterRegistration;
@ -104,11 +103,11 @@ public class ContextHandler extends ScopedHandler implements Attributes, Gracefu
{
public static int SERVLET_MAJOR_VERSION=3;
public static int SERVLET_MINOR_VERSION=0;
final private static String __unimplmented="Unimplemented - use org.eclipse.jetty.servlet.ServletContextHandler";
private static final Logger LOG = Log.getLogger(ContextHandler.class);
private static final ThreadLocal<Context> __context = new ThreadLocal<Context>();
@ -141,8 +140,8 @@ public class ContextHandler extends ScopedHandler implements Attributes, Gracefu
return c.getContextHandler();
return null;
}
protected Context _scontext;
private final AttributesMap _attributes;
private final Map<String, String> _initParams;
@ -566,7 +565,7 @@ public class ContextHandler extends ScopedHandler implements Attributes, Gracefu
public void addEventListener(EventListener listener)
{
_eventListeners.add(listener);
if (listener instanceof ServletContextListener)
_contextListeners.add((ServletContextListener)listener);
@ -579,7 +578,7 @@ public class ContextHandler extends ScopedHandler implements Attributes, Gracefu
if (listener instanceof ServletRequestAttributeListener)
_requestAttributeListeners.add((ServletRequestAttributeListener)listener);
}
/* ------------------------------------------------------------ */
/**
* Remove a context event listeners.
@ -592,7 +591,7 @@ public class ContextHandler extends ScopedHandler implements Attributes, Gracefu
public void removeEventListener(EventListener listener)
{
_eventListeners.remove(listener);
if (listener instanceof ServletContextListener)
_contextListeners.remove(listener);
@ -616,13 +615,13 @@ public class ContextHandler extends ScopedHandler implements Attributes, Gracefu
{
_programmaticListeners.add(listener);
}
/* ------------------------------------------------------------ */
protected boolean isProgrammaticListener(EventListener listener)
{
return _programmaticListeners.contains(listener);
}
/* ------------------------------------------------------------ */
/**
* @return true if this context is accepting new requests
@ -725,7 +724,7 @@ public class ContextHandler extends ScopedHandler implements Attributes, Gracefu
startContext();
_availability = Availability.AVAILABLE;
LOG.info("started {}",this);
LOG.info("Started {}", this);
}
finally
{
@ -771,7 +770,7 @@ public class ContextHandler extends ScopedHandler implements Attributes, Gracefu
ServletContextEvent event = new ServletContextEvent(_scontext);
for (ServletContextListener listener:_contextListeners)
callContextInitialized(listener, event);
}
}
}
/* ------------------------------------------------------------ */
@ -818,7 +817,7 @@ public class ContextHandler extends ScopedHandler implements Attributes, Gracefu
if (!_contextListeners.isEmpty())
{
ServletContextEvent event = new ServletContextEvent(_scontext);
for (int i = _contextListeners.size(); i-->0;)
for (int i = _contextListeners.size(); i-->0;)
callContextDestroyed(_contextListeners.get(i),event);
}
@ -831,14 +830,14 @@ public class ContextHandler extends ScopedHandler implements Attributes, Gracefu
String name = e.nextElement();
checkManagedAttribute(name,null);
}
for (EventListener l : _programmaticListeners)
removeEventListener(l);
_programmaticListeners.clear();
}
finally
{
LOG.info("stopped {}",this);
LOG.info("Stopped {}", this);
__context.set(old_context);
// reset the classloader
if (_classLoader != null && current_thread!=null)
@ -894,10 +893,10 @@ public class ContextHandler extends ScopedHandler implements Attributes, Gracefu
default:
match = contextVhost.equalsIgnoreCase(vhost);
}
if (match)
break loop;
}
if (!match)
return false;
@ -1657,7 +1656,7 @@ public class ContextHandler extends ScopedHandler implements Attributes, Gracefu
return host;
}
/* ------------------------------------------------------------ */
/**
* Add an AliasCheck instance to possibly permit aliased resources
@ -1667,7 +1666,7 @@ public class ContextHandler extends ScopedHandler implements Attributes, Gracefu
{
_aliasChecks.add(check);
}
/* ------------------------------------------------------------ */
/**
* @return Mutable list of Alias checks
@ -1798,7 +1797,7 @@ public class ContextHandler extends ScopedHandler implements Attributes, Gracefu
return null;
return _mimeTypes.getMimeByExtension(file);
}
/* ------------------------------------------------------------ */
/*
* @see javax.servlet.ServletContext#getRequestDispatcher(java.lang.String)
@ -2182,13 +2181,13 @@ public class ContextHandler extends ScopedHandler implements Attributes, Gracefu
return _enabled;
}
}
public static class NoContext extends AttributesMap implements ServletContext
{
private int _effectiveMajorVersion = SERVLET_MAJOR_VERSION;
private int _effectiveMinorVersion = SERVLET_MINOR_VERSION;
/* ------------------------------------------------------------ */
public NoContext()
{
@ -2522,8 +2521,8 @@ public class ContextHandler extends ScopedHandler implements Attributes, Gracefu
LOG.warn(__unimplmented);
}
}
/* ------------------------------------------------------------ */
/** Interface to check aliases
*/
@ -2537,7 +2536,7 @@ public class ContextHandler extends ScopedHandler implements Attributes, Gracefu
*/
boolean check(String path, Resource resource);
}
/* ------------------------------------------------------------ */
/** Approve all aliases.
@ -2550,7 +2549,7 @@ public class ContextHandler extends ScopedHandler implements Attributes, Gracefu
return true;
}
}
/* ------------------------------------------------------------ */
/** Approve Aliases with same suffix.
* Eg. a symbolic link from /foobar.html to /somewhere/wibble.html would be
@ -2568,8 +2567,8 @@ public class ContextHandler extends ScopedHandler implements Attributes, Gracefu
return resource.getAlias().toString().endsWith(suffix);
}
}
/* ------------------------------------------------------------ */
/** Approve Aliases with a path prefix.
* Eg. a symbolic link from /dirA/foobar.html to /dirB/foobar.html would be
@ -2589,7 +2588,7 @@ public class ContextHandler extends ScopedHandler implements Attributes, Gracefu
}
/* ------------------------------------------------------------ */
/** Approve Aliases of a non existent directory.
* If a directory "/foobar/" does not exist, then the resource is
* If a directory "/foobar/" does not exist, then the resource is
* aliased to "/foobar". Accept such aliases.
*/
public static class ApproveNonExistentDirectoryAliases implements AliasCheck