Skip to content

Instantly share code, notes, and snippets.

@oc
Created February 17, 2010 09:18
Show Gist options
  • Save oc/306454 to your computer and use it in GitHub Desktop.
Save oc/306454 to your computer and use it in GitHub Desktop.
package no.rynning;
import org.mortbay.jetty.Connector;
import org.mortbay.jetty.Server;
import org.mortbay.jetty.nio.SelectChannelConnector;
import org.mortbay.jetty.webapp.WebAppContext;
/**
* OC's jettylauncher. DON'T MODIFY OR MOVE PLEASE!
*/
public class JettyLauncher {
private JettyLauncher() {} // Utility method
public static void main(String[] args) {
Server server = new Server();
Connector conn = new SelectChannelConnector();
conn.setPort(8080);
server.setConnectors(new Connector[] { conn });
server.setAttribute("useFileMappedBuffer", false);
WebAppContext ctx = new WebAppContext();
ctx.setContextPath("/");
ctx.setWar("src/main/webapp");
server.setHandler(ctx);
try {
server.start();
server.join();
} catch (Exception ignored) {}
}
}
..
<build>
..
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
<encoding>UTF-8</encoding>
<excludes>
<exclude>**/rynning/**</exclude>
</excludes>
</configuration>
</plugin>
..
</build>
evt noe ala.
<dependency>
<groupId>no.rynning</groupId>
<artifactId>utils</artifactId>
<version>whatever</version>
<scope>provided</scope>
</dependency>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment