Skip to content

Commit

Permalink
Addresses some of the build errors, but the ITs are still failing
Browse files Browse the repository at this point in the history
  • Loading branch information
Edwin Shin committed Jun 21, 2013
1 parent 609fda0 commit 84204ae
Show file tree
Hide file tree
Showing 5 changed files with 83 additions and 52 deletions.
95 changes: 66 additions & 29 deletions pom.xml
Expand Up @@ -7,32 +7,64 @@
<version>4.0-SNAPSHOT</version>
</parent>
<artifactId>fcrepo-auth-oauth</artifactId>
<name>Apache Oltu OAuth2 module for Fedora Commons 4</name>
<name>${project.artifactId}</name>
<description>Fedora OAuth 2.0 module</description>
<packaging>bundle</packaging>

<properties>
<oltu.version>0.31-SNAPSHOT</oltu.version>
</properties>

<dependencies>
<dependency>
<artifactId>fcrepo-http-api</artifactId>
<groupId>org.fcrepo</groupId>
<version>${project.version}</version>
<exclusions>
<!-- Dependency convergence: fcrepo-http-api (via jersey-json:1.17.1)
depends on jettison:1.1, but org.apache.oltu.oauth2.authzserver
depends on jettison:1.2 -->
<exclusion>
<groupId>org.codehaus.jettison</groupId>
<artifactId>jettison</artifactId>
</exclusion>
<!-- Dependency convergence: fcrepo-http-api (via fcrepo-jcr)
depends on commons-codec:1.6, but org.apache.oltu.oauth2.authzserver
depends on commons-codec:1.8 -->
<exclusion>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.oltu.oauth2</groupId>
<artifactId>org.apache.oltu.oauth2.authzserver</artifactId>
<version>0.31-SNAPSHOT</version>
<version>${oltu.version}</version>
</dependency>
<dependency>
<groupId>org.apache.oltu.oauth2</groupId>
<artifactId>oltu-oauth2-resourceserver-filter</artifactId>
<version>0.31-SNAPSHOT</version>
<version>${oltu.version}</version>
</dependency>


<!-- test gear -->
<dependency>
<groupId>org.fcrepo</groupId>
<artifactId>fcrepo-kernel</artifactId>
<version>${project.version}</version>
<classifier>tests</classifier>
<scope>test</scope>
<exclusions>
<!-- Dependency convergence: fcrepo-kernel
depends on commons-codec:1.6, but org.apache.oltu.oauth2.authzserver
depends on commons-codec:1.8 -->
<exclusion>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.fcrepo</groupId>
Expand All @@ -45,19 +77,16 @@
<groupId>org.glassfish.grizzly</groupId>
<artifactId>grizzly-http-server</artifactId>
<scope>test</scope>
<version>2.2.21</version>
</dependency>
<dependency>
<groupId>org.glassfish.grizzly</groupId>
<artifactId>grizzly-http-servlet</artifactId>
<scope>test</scope>
<version>2.2.21</version>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-grizzly2</artifactId>
<scope>test</scope>
<version>1.17.1</version>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
Expand All @@ -68,12 +97,6 @@
<groupId>com.sun.jersey.contribs</groupId>
<artifactId>jersey-spring</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>junit</groupId>
Expand All @@ -86,40 +109,54 @@
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<exclusions>
<!-- Dependency convergence: httpclient:4.2.5
depends on commons-codec:1.6, but org.apache.oltu.oauth2.authzserver
depends on commons-codec:1.8 -->
<exclusion>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>com.sun.jersey.jersey-test-framework</groupId>
<artifactId>jersey-test-framework-grizzly2</artifactId>
<version>1.17.1</version>
<scope>test</scope>
<groupId>com.sun.jersey.jersey-test-framework</groupId>
<artifactId>jersey-test-framework-grizzly2</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-servlet</artifactId>
<version>1.14</version>
<scope>test</scope>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-servlet</artifactId>
<version>${jersey.version}</version>
<scope>test</scope>
</dependency>
<!-- Playing with ordered loading for tests -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.0.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
<version>1.2-b04</version>
<version>1.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-grizzly2-servlet</artifactId>
<version>2.0</version>
<scope>test</scope>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-grizzly2-servlet</artifactId>
<version>2.0</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>Apache Snapshots</id>
Expand Down
Expand Up @@ -36,14 +36,8 @@ public void testBinding() throws JAXBException {
"contextConfigLocation", "classpath:spring-test/rest.xml; "
+ "classpath:spring-test/repo.xml; "
+ "classpath:spring-test/security.xml")));
assertTrue(o.contextParams().contains(new ContextParam(
"org.modeshape.jcr.RepositoryName", "repo")));
assertTrue(o.contextParams().contains(new ContextParam(
"org.modeshape.jcr.URL", "/test_repository.json")));
assertTrue(o.listeners().contains(new Listener(null,
"org.springframework.web.context.ContextLoaderListener")));
assertTrue(o.listeners().contains(new Listener(null,
"org.modeshape.web.jcr.ModeShapeJcrDeployer")));
final ServletMapping sm =
o.servletMappings("jersey-servlet").iterator().next();
assertNotNull(sm);
Expand Down
1 change: 1 addition & 0 deletions src/test/resources/spring-test/master.xml
Expand Up @@ -9,5 +9,6 @@
<import resource="classpath:/spring-test/repo.xml"/>
<import resource="classpath:/spring-test/rest.xml"/>
<import resource="classpath:/spring-test/security.xml"/>
<import resource="classpath:/spring-test/transactions.xml"/>

</beans>
16 changes: 16 additions & 0 deletions src/test/resources/spring-test/transactions.xml
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
xmlns:task="http://www.springframework.org/schema/task"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-3.0.xsd">

<context:annotation-config />
<context:component-scan base-package="org.fcrepo.services" />

<task:scheduler id="taskScheduler" />
<task:executor id="taskExecutor" pool-size="1" />
<task:annotation-driven executor="taskExecutor" scheduler="taskScheduler" />

</beans>
17 changes: 0 additions & 17 deletions src/test/resources/web.xml
Expand Up @@ -11,28 +11,11 @@
<param-name>contextConfigLocation</param-name>
<param-value>classpath:spring-test/rest.xml; classpath:spring-test/repo.xml; classpath:spring-test/security.xml</param-value>
</context-param>


<!-- engaging the ModeShape REST API -->

<context-param>
<param-name>org.modeshape.jcr.RepositoryName</param-name>
<param-value>repo</param-value>
</context-param>
<context-param>
<param-name>org.modeshape.jcr.URL</param-name>
<param-value>/test_repository.json</param-value>
</context-param>

<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>

<!-- Required parameter for ModeShape REST - should not be modified -->
<listener>
<listener-class>org.modeshape.web.jcr.ModeShapeJcrDeployer</listener-class>
</listener>

<servlet>
<servlet-name>jersey-servlet</servlet-name>
<servlet-class>com.sun.jersey.spi.spring.container.servlet.SpringServlet</servlet-class>
Expand Down

0 comments on commit 84204ae

Please sign in to comment.