Skip to content

Commit

Permalink
Adding jersey-server dependency explicitly
Browse files Browse the repository at this point in the history
  • Loading branch information
Ke Wang committed Mar 20, 2015
1 parent 443e4ed commit 74a11ac
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ subprojects {
compile group: 'com.fasterxml.jackson.module', name: 'jackson-module-jaxb-annotations', version:'2.2.3'
compile group: 'org.glassfish.jersey.containers', name: 'jersey-container-servlet', version:'2.5.1'
compile group: 'org.glassfish.jersey.core', name: 'jersey-client', version:'2.5.1'
compile group: 'org.glassfish.jersey.core', name: 'jersey-server', version:'2.5.1'
compile(group: 'org.glassfish.jersey.media', name: 'jersey-media-json-jackson', version:'2.5.1') {
exclude(module: 'jackson-xc')
exclude(module: 'jackson-core-asl')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,7 @@ private void addAccessLog(HttpServer httpServer) {
try {
String accessLogLocation = serverData.getRootContext().getBean(AccessLogLocationBean.class).getAccessLogLocation();

accessLogLocation = accessLogLocation
+ serverData.getModule().getContext().substring(0, serverData.getModule().getContext().indexOf("/")) + "-access.log";
accessLogLocation = accessLogLocation + replaceSlash(serverData.getModule().getContext()) + "-access.log";
final AccessLogBuilder builder = new AccessLogBuilder(accessLogLocation);

builder.rotatedDaily();
Expand Down Expand Up @@ -144,8 +143,14 @@ private NetworkListener createSSLListener(int port) {
}

private void addListeners(WebappContext webappContext) {

new ServletContextListenerConfigurer(serverData, servletContextListenerData).addListeners(webappContext);
}

private String replaceSlash(String context) {
if (context != null && context.contains("/")) {
return context.substring(0, context.indexOf("/"));
}
return context;
}

}

0 comments on commit 74a11ac

Please sign in to comment.