Skip to content
This repository has been archived by the owner on Oct 12, 2021. It is now read-only.

Commit

Permalink
Update Lyo Core to use Jax-rs 2.0, and be independent of Wink (#63)
Browse files Browse the repository at this point in the history
* Update Lyo Core to use Jax-rs 2.0, and be independent of Wink (as well
as any other implementation)

* Quick fix to ServiceProviderFactory to allow null pathParameterValues

This is needed to run the rio-oslc4j sample servers that are useful for testing the Java client

* Added support for media type text/xml

 don't know why this might have been removed, or what might have changed in RTC so that it is returning text/xml instead of application/rdf+xml. But it was necessary to get the OslcClient to be able to read a ServiceProvider provided by RTC.

* Revert "Added support for media type text/xml"

This reverts commit be89ac8.

* Revert "Quick fix to ServiceProviderFactory to allow null pathParameterValues"

This reverts commit ba211e5.

NB! Revert is partial, preserve Jim's change to the POM file and the
removed semicolon from the imports.
  • Loading branch information
jadelkhoury committed Feb 15, 2019
1 parent 729b19d commit 3ca51d9
Show file tree
Hide file tree
Showing 6 changed files with 116 additions and 55 deletions.
62 changes: 31 additions & 31 deletions oslc4j-core-build/pom.xml
Expand Up @@ -15,6 +15,7 @@

<version.lyo>${project.version}</version.lyo>
<version.jena>3.6.0</version.jena>
<version.jersey>2.27</version.jersey>
<version.servlet>3.1.0</version.servlet>
</properties>

Expand Down Expand Up @@ -100,43 +101,12 @@
<artifactId>slf4j-simple</artifactId>
<version>1.7.25</version>
</dependency>
<dependency>
<!--CQ 6733-->
<groupId>org.apache.wink</groupId>
<artifactId>wink</artifactId>
<version>1.2.1-incubating</version>
<type>pom</type>
</dependency>
<dependency>
<!--CQ 6733-->
<groupId>org.apache.wink</groupId>
<artifactId>wink-server</artifactId>
<version>1.2.1-incubating</version>
</dependency>
<dependency>
<!--CQ 6733-->
<groupId>org.apache.wink</groupId>
<artifactId>wink-json4j</artifactId>
<version>1.2.1-incubating</version>
</dependency>
<dependency>
<!--CQ 6733-->
<groupId>org.apache.wink</groupId>
<artifactId>wink-json4j-provider</artifactId>
<version>1.2.1-incubating</version>
</dependency>
<dependency>
<!--CQ 6733-->
<groupId>org.apache.wink</groupId>
<artifactId>wink-client</artifactId>
<version>1.2.1-incubating</version>
<exclusions>
<exclusion>
<artifactId>stax-api</artifactId>
<groupId>javax.xml.stream</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<!--CQ 6582-->
<groupId>stax</groupId>
Expand Down Expand Up @@ -182,6 +152,36 @@
<artifactId>xercesImpl</artifactId>
<version>2.8.0</version>
</dependency>
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>javax.ws.rs-api</artifactId>
<version>2.1</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-servlet</artifactId>
<version>${version.jersey}</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-server</artifactId>
<version>${version.jersey}</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-common</artifactId>
<version>${version.jersey}</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.inject</groupId>
<artifactId>jersey-hk2</artifactId>
<version>${version.jersey}</version>
</dependency>
<dependency>
<!-- TODO remove https://github.com/eclipse/lyo.core/issues/58 -->
<groupId>commons-io</groupId>
Expand Down
44 changes: 30 additions & 14 deletions oslc4j-core/pom.xml
Expand Up @@ -18,24 +18,26 @@
<dependencies>
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
<version>1.1.1</version>
<artifactId>javax.ws.rs-api</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.servlet</artifactId>
<version>3.1-b33</version>
<scope>provided</scope>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.jena</groupId>
<artifactId>apache-jena-libs</artifactId>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.apache.jena</groupId>
<artifactId>apache-jena-libs</artifactId>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
</dependency>

<!-- Test Dependencies -->
<dependency>
Expand All @@ -46,7 +48,6 @@
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>3.8.0</version>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
Expand All @@ -61,8 +62,23 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.wink</groupId>
<artifactId>wink-server</artifactId>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-servlet</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-server</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-common</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.inject</groupId>
<artifactId>jersey-hk2</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
19 changes: 17 additions & 2 deletions oslc4j-jena-provider/pom.xml
Expand Up @@ -60,8 +60,23 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.wink</groupId>
<artifactId>wink-server</artifactId>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-servlet</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-server</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-common</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.inject</groupId>
<artifactId>jersey-hk2</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
Expand Up @@ -22,7 +22,7 @@
import java.util.ArrayList;
import java.util.Collection;
import org.apache.jena.ext.com.google.common.collect.ImmutableList;
import org.apache.wink.common.internal.MultivaluedMapImpl;
import javax.ws.rs.core.MultivaluedHashMap;
import org.eclipse.lyo.oslc4j.core.model.OslcMediaType;
import org.eclipse.lyo.oslc4j.core.model.ServiceProvider;
import org.eclipse.lyo.oslc4j.provider.jena.OslcJsonLdArrayProvider;
Expand Down Expand Up @@ -71,7 +71,7 @@ public void testWrite() throws Exception {

provider.writeTo(sp, ServiceProvider.class, ServiceProvider.class, ServiceProvider.class
.getAnnotations(), OslcMediaType.APPLICATION_JSON_LD_TYPE, new
MultivaluedMapImpl<>(), outputStream);
MultivaluedHashMap<>(), outputStream);

final String jsonLD = outputStream.toString("UTF-8");

Expand All @@ -92,7 +92,7 @@ public void testWriteArray() throws Exception {
ServiceProvider.class,
ServiceProvider.class.getAnnotations(),
OslcMediaType.APPLICATION_JSON_LD_TYPE,
new MultivaluedMapImpl<>(),
new MultivaluedHashMap<>(),
outputStream);

final String jsonLD = outputStream.toString("UTF-8");
Expand All @@ -115,7 +115,7 @@ public void testWriteCollection() throws Exception {
objects.getClass().getGenericSuperclass(),
ServiceProvider.class.getAnnotations(),
OslcMediaType.APPLICATION_JSON_LD_TYPE,
new MultivaluedMapImpl<>(),
new MultivaluedHashMap<>(),
outputStream);

final String jsonLD = outputStream.toString("UTF-8");
Expand Down
19 changes: 17 additions & 2 deletions oslc4j-json4j-provider/pom.xml
Expand Up @@ -37,8 +37,23 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.wink</groupId>
<artifactId>wink-server</artifactId>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-servlet</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-server</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-common</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.inject</groupId>
<artifactId>jersey-hk2</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
19 changes: 17 additions & 2 deletions oslc4j-utils/pom.xml
Expand Up @@ -31,8 +31,23 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.wink</groupId>
<artifactId>wink-server</artifactId>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-servlet</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-server</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-common</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.inject</groupId>
<artifactId>jersey-hk2</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down

0 comments on commit 3ca51d9

Please sign in to comment.