Skip to content

Commit

Permalink
More modularization. #5
Browse files Browse the repository at this point in the history
  • Loading branch information
enridaga committed Jun 24, 2015
1 parent 7d50c05 commit b91df68
Show file tree
Hide file tree
Showing 43 changed files with 50 additions and 31 deletions.
6 changes: 0 additions & 6 deletions basil/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,6 @@
<artifactId>jetty-webapp</artifactId>
</dependency>

<!-- Standalone -->
<dependency>
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>
</dependency>

<!-- Swagger -->
<dependency>
<groupId>com.wordnik</groupId>
Expand Down
23 changes: 17 additions & 6 deletions basil/src/main/java/uk/ac/open/kmi/basil/ApiDocsResource.java
Original file line number Diff line number Diff line change
@@ -1,16 +1,27 @@
package uk.ac.open.kmi.basil;

import com.google.gson.JsonObject;
import com.wordnik.swagger.annotations.*;
import java.io.IOException;

import javax.ws.rs.GET;
import javax.ws.rs.HeaderParam;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.WebApplicationException;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.Response.ResponseBuilder;

import uk.ac.open.kmi.basil.doc.Doc;
import uk.ac.open.kmi.basil.sparql.Specification;
import uk.ac.open.kmi.basil.swagger.SwaggerJsonBuilder;
import uk.ac.open.kmi.basil.swagger.SwaggerUIBuilder;

import javax.ws.rs.*;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.Response.ResponseBuilder;
import java.io.IOException;
import com.google.gson.JsonObject;
import com.wordnik.swagger.annotations.Api;
import com.wordnik.swagger.annotations.ApiOperation;
import com.wordnik.swagger.annotations.ApiParam;
import com.wordnik.swagger.annotations.ApiResponse;
import com.wordnik.swagger.annotations.ApiResponses;


@Path("{id}/api-docs")
Expand Down
1 change: 0 additions & 1 deletion basil/src/main/webapp/static/index.html

This file was deleted.

15 changes: 0 additions & 15 deletions basil/src/test/resources/log4j2-jetty.xml

This file was deleted.

23 changes: 23 additions & 0 deletions server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@
</dependency>


<!-- Standalone -->
<dependency>
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>
</dependency>



</dependencies>

<build>
Expand Down Expand Up @@ -64,6 +72,21 @@
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>9.3.0.M1</version>
<configuration>
<scanIntervalSeconds>5</scanIntervalSeconds>
<systemProperties>
<systemProperty>
<name>log4j.configurationFile</name>
<value>${project.basedir}/src/test/resources/log4j2-jetty.xml</value>
</systemProperty>
</systemProperties>
</configuration>
</plugin>
</plugins>
<resources>
<resource>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
<servlet-name>BASIL</servlet-name>
<url-pattern>/basil/*</url-pattern>
</servlet-mapping>

<servlet>
<servlet-name>Jersey2Config</servlet-name>
<servlet-class>com.wordnik.swagger.jersey.config.JerseyJaxrsConfig</servlet-class>
Expand All @@ -90,9 +90,16 @@
<load-on-startup>2</load-on-startup>
</servlet>


<servlet-mapping>
<servlet-name>default</servlet-name>
<url-pattern>/basil/docs/*</url-pattern>
<url-pattern>/ui/*</url-pattern>
</servlet-mapping>


<welcome-file-list>
<welcome-file>static/ui/index.html</welcome-file>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>

0 comments on commit b91df68

Please sign in to comment.