{
repo.root.mkdirs();
}
repo.server = new Server( 0 );
ContextHandlerCollection contexts = new ContextHandlerCollection();
repo.server.setHandler( contexts );
ServletContextHandler context = new ServletContextHandler();
context.setContextPath( repo.context );
context.setResourceBase( repo.root.getAbsolutePath() );
context.setAttribute( "dirAllowed", true );
context.setAttribute( "maxCacheSize", 0 );
ServletHolder sh = new ServletHolder( DefaultServlet.class );
context.addServlet( sh, "/" );
contexts.addHandler( context );
repo.server.start();
int port = repo.server.getConnectors()[0].getLocalPort();
repo.url = "http://localhost:" + port + repo.context;