You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stanbol.apache.org by re...@apache.org on 2012/11/29 08:24:53 UTC

svn commit: r1415062 - in /stanbol/trunk: commons/ commons/web/base/ commons/web/base/src/main/java/org/apache/stanbol/commons/web/base/ commons/web/base/src/test/java/org/apache/stanbol/commons/web/base/ commons/web/ldviewable/src/main/java/org/apache...

Author: reto
Date: Thu Nov 29 07:24:47 2012
New Revision: 1415062

URL: http://svn.apache.org/viewvc?rev=1415062&view=rev
Log:
STANBOL-822:
- Extracted jersey specific parts to core.jersey
- Updates jersey to 1.15
- Removed dependendency embedding in ontologies and rule (commit part 1 due to svn troubles)

Added:
    stanbol/trunk/commons/web/base/src/main/java/org/apache/stanbol/commons/web/base/CorsConstants.java
      - copied, changed from r1414125, stanbol/trunk/commons/web/base/src/main/java/org/apache/stanbol/commons/web/base/JerseyEndpoint.java
    stanbol/trunk/commons/web/base/src/main/java/org/apache/stanbol/commons/web/base/DefaultApplication.java
      - copied, changed from r1414723, stanbol/trunk/commons/web/base/src/main/java/org/apache/stanbol/commons/web/base/JerseyEndpointApplication.java
Removed:
    stanbol/trunk/commons/web/base/src/main/java/org/apache/stanbol/commons/web/base/JerseyEndpoint.java
    stanbol/trunk/commons/web/base/src/main/java/org/apache/stanbol/commons/web/base/JerseyEndpointApplication.java
Modified:
    stanbol/trunk/commons/pom.xml
    stanbol/trunk/commons/web/base/pom.xml
    stanbol/trunk/commons/web/base/src/main/java/org/apache/stanbol/commons/web/base/CorsHelper.java
    stanbol/trunk/commons/web/base/src/test/java/org/apache/stanbol/commons/web/base/CorsAccessControlAllowMethodTest.java
    stanbol/trunk/commons/web/base/src/test/java/org/apache/stanbol/commons/web/base/MockServletContext.java
    stanbol/trunk/commons/web/ldviewable/src/main/java/org/apache/stanbol/commons/ldviewable/mbw/ViewableWriter.java
    stanbol/trunk/entityhub/jersey/pom.xml
    stanbol/trunk/entityhub/jersey/src/main/java/org/apache/stanbol/entityhub/jersey/resource/ReferencedSiteRootResource.java
    stanbol/trunk/entityhub/jersey/src/main/java/org/apache/stanbol/entityhub/jersey/utils/JerseyUtils.java
    stanbol/trunk/launchers/bundlelists/stanbolcommons/src/main/bundles/list.xml
    stanbol/trunk/launchers/full-war/src/main/bundles/list.xml
    stanbol/trunk/launchers/full/src/main/bundles/list.xml
    stanbol/trunk/ontologymanager/web/pom.xml
    stanbol/trunk/parent/pom.xml
    stanbol/trunk/rules/web/pom.xml

Modified: stanbol/trunk/commons/pom.xml
URL: http://svn.apache.org/viewvc/stanbol/trunk/commons/pom.xml?rev=1415062&r1=1415061&r2=1415062&view=diff
==============================================================================
--- stanbol/trunk/commons/pom.xml (original)
+++ stanbol/trunk/commons/pom.xml Thu Nov 29 07:24:47 2012
@@ -43,6 +43,7 @@
     <module>jsonld</module>
 
     <module>web/base</module>
+    <module>web/base.jersey</module>
     <module>web/home</module>
 	<module>web/ldviewable</module>
 	

Modified: stanbol/trunk/commons/web/base/pom.xml
URL: http://svn.apache.org/viewvc/stanbol/trunk/commons/web/base/pom.xml?rev=1415062&r1=1415061&r2=1415062&view=diff
==============================================================================
--- stanbol/trunk/commons/web/base/pom.xml (original)
+++ stanbol/trunk/commons/web/base/pom.xml Thu Nov 29 07:24:47 2012
@@ -31,7 +31,7 @@
   <packaging>bundle</packaging>
 
   <name>Apache Stanbol Commons Web Base</name>
-  <description>Stanbol HTTP Jersey application bundle.</description>
+  <description>Stanbol HTTP application bundle.</description>
   <licenses>
     <license>
       <name>Apache Software License, Version 2.0</name>
@@ -73,7 +73,7 @@
               freemarker.template.*;version=${freemarker-version},
               freemarker.core;version=${freemarker-version}
             </_exportcontents>
-            <Embed-Dependency>*;scope=compile|runtime;inline=false;artifactId=jersey-json|jettison|jackson-core-asl
+            <Embed-Dependency>*;scope=compile|runtime;inline=false;artifactId=jettison|jackson-core-asl
             </Embed-Dependency>
             <Embed-Dependency>freemarker</Embed-Dependency>
             <Embed-Transitive>true</Embed-Transitive>
@@ -93,6 +93,9 @@
               !javax.el,
               !org.slf4j.spi,
               !org.zeroturnaround.javarebel,
+              javax.ws.rs;version="[0,2)",
+              javax.ws.rs.ext;version="[0,2)",
+              javax.ws.rs.core;version="[0,2)",
               org.apache.stanbol.commons.web.base,
               org.apache.stanbol.commons.web.base.*,
               freemarker.cache.*,
@@ -119,32 +122,18 @@
       <artifactId>rdf.jena.serializer</artifactId>
     </dependency>
 
-    <!-- Jersey -->
-<dependency>
-      <groupId>com.sun.jersey</groupId>
-      <artifactId>jersey-server</artifactId>
-    </dependency>
     <dependency>
-      <groupId>com.sun.jersey</groupId>
-      <artifactId>jersey-servlet</artifactId>
+      <groupId>org.freemarker</groupId>
+      <artifactId>freemarker</artifactId>
     </dependency>
     <dependency>
-      <groupId>com.sun.jersey</groupId>
-      <artifactId>jersey-core</artifactId>
+        <groupId>javax.ws.rs</groupId>
+        <artifactId>jsr311-api</artifactId>
     </dependency>
-    <!-- <dependency>
-      <groupId>com.sun.jersey</groupId>
-      <artifactId>jersey-json</artifactId>
-    </dependency>  -->
     <dependency>
       <groupId>javax.servlet</groupId>
       <artifactId>servlet-api</artifactId>
     </dependency>
-
-    <dependency>
-      <groupId>org.freemarker</groupId>
-      <artifactId>freemarker</artifactId>
-    </dependency>
     <!-- indirect dependency for freemarker -->
     <dependency>
       <groupId>org.codehaus.jettison</groupId>
@@ -197,7 +186,12 @@
       <artifactId>slf4j-simple</artifactId>
       <scope>test</scope>
     </dependency>
-
+    <dependency>
+      <groupId>org.apache.wink</groupId>
+      <artifactId>wink-common</artifactId>
+      <version>1.2.1-incubating</version>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
 
 </project>

Copied: stanbol/trunk/commons/web/base/src/main/java/org/apache/stanbol/commons/web/base/CorsConstants.java (from r1414125, stanbol/trunk/commons/web/base/src/main/java/org/apache/stanbol/commons/web/base/JerseyEndpoint.java)
URL: http://svn.apache.org/viewvc/stanbol/trunk/commons/web/base/src/main/java/org/apache/stanbol/commons/web/base/CorsConstants.java?p2=stanbol/trunk/commons/web/base/src/main/java/org/apache/stanbol/commons/web/base/CorsConstants.java&p1=stanbol/trunk/commons/web/base/src/main/java/org/apache/stanbol/commons/web/base/JerseyEndpoint.java&r1=1414125&r2=1415062&rev=1415062&view=diff
==============================================================================
--- stanbol/trunk/commons/web/base/src/main/java/org/apache/stanbol/commons/web/base/JerseyEndpoint.java (original)
+++ stanbol/trunk/commons/web/base/src/main/java/org/apache/stanbol/commons/web/base/CorsConstants.java Thu Nov 29 07:24:47 2012
@@ -16,234 +16,11 @@
  */
 package org.apache.stanbol.commons.web.base;
 
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Dictionary;
-import java.util.HashSet;
-import java.util.Hashtable;
-import java.util.List;
-import java.util.Set;
+public class CorsConstants {
 
-import javax.servlet.ServletContext;
-import javax.servlet.ServletException;
 
-import org.apache.felix.scr.annotations.Activate;
-import org.apache.felix.scr.annotations.Component;
-import org.apache.felix.scr.annotations.Deactivate;
-import org.apache.felix.scr.annotations.Property;
-import org.apache.felix.scr.annotations.Reference;
-import org.apache.felix.scr.annotations.ReferenceCardinality;
-import org.apache.felix.scr.annotations.ReferencePolicy;
-import org.apache.stanbol.commons.web.base.resource.BaseStanbolResource;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-import org.osgi.service.cm.ConfigurationException;
-import org.osgi.service.component.ComponentContext;
-import org.osgi.service.http.HttpService;
-import org.osgi.service.http.NamespaceException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.sun.jersey.spi.container.servlet.ServletContainer;
-
-/**
- * Jersey-based RESTful endpoint for the Stanbol Enhancer engines and store.
- * <p>
- * This OSGi component serves as a bridge between the OSGi context and the Servlet context available to JAX-RS
- * resources.
- */
-@Component(immediate = true, metatype = true)
-@Reference(name = "webFragment", referenceInterface = WebFragment.class, cardinality = ReferenceCardinality.OPTIONAL_MULTIPLE, policy = ReferencePolicy.DYNAMIC)
-public class JerseyEndpoint {
-
-    private final Logger log = LoggerFactory.getLogger(getClass());
-
-    @Property(value = "/")
-    public static final String ALIAS_PROPERTY = "org.apache.stanbol.commons.web.alias";
-
-    @Property(value = "/static")
-    public static final String STATIC_RESOURCES_URL_ROOT_PROPERTY = "org.apache.stanbol.commons.web.static.url";
-
-    /**
-     * The origins allowed for multi-host requests
-     */
-    @Property(cardinality = 100, value = {"*"})
     public static final String CORS_ORIGIN = "org.apache.stanbol.commons.web.cors.origin";
 
-    @Property(cardinality = 100, value = {"Location"})
     public static final String CORS_ACCESS_CONTROL_EXPOSE_HEADERS = "org.apache.stanbol.commons.web.cors.access_control_expose_headers";
 
-    @Reference
-    HttpService httpService;
-
-    protected ComponentContext componentContext;
-
-    protected ServletContext servletContext;
-
-    protected final List<WebFragment> webFragments = new ArrayList<WebFragment>();
-
-    protected final List<String> registeredAliases = new ArrayList<String>();
-
-    protected Set<String> corsOrigins;
-
-    protected Set<String> exposedHeaders;
-
-    public Dictionary<String,String> getInitParams() {
-        Dictionary<String,String> initParams = new Hashtable<String,String>();
-        // make jersey automatically turn resources into Viewable models and
-        // hence lookup matching freemarker templates
-        initParams.put("com.sun.jersey.config.feature.ImplicitViewables", "true");
-        return initParams;
-    }
-
-    @Activate
-    protected void activate(ComponentContext ctx) throws IOException,
-                                                 ServletException,
-                                                 NamespaceException,
-                                                 ConfigurationException {
-        componentContext = ctx;
-        // init corsOrigins
-        Object values = componentContext.getProperties().get(CORS_ORIGIN);
-        if (values instanceof String && !((String) values).isEmpty()) {
-            corsOrigins = Collections.singleton((String) values);
-        } else if (values instanceof String[]) {
-            corsOrigins = new HashSet<String>(Arrays.asList((String[]) values));
-        } else if (values instanceof Iterable<?>) {
-            corsOrigins = new HashSet<String>();
-            for (Object value : (Iterable<?>) values) {
-                if (value != null && !value.toString().isEmpty()) {
-                    corsOrigins.add(value.toString());
-                }
-            }
-        } else {
-            throw new ConfigurationException(CORS_ORIGIN,
-                    "CORS origin(s) MUST be a String, String[], Iterable<String> (value:" + values + ")");
-        }
-
-        // parse headers to be exposed
-        values = componentContext.getProperties().get(CORS_ACCESS_CONTROL_EXPOSE_HEADERS);
-        if (values instanceof String && !((String) values).isEmpty()) {
-            exposedHeaders = Collections.singleton((String) values);
-        } else if (values instanceof String[]) {
-            exposedHeaders = new HashSet<String>(Arrays.asList((String[]) values));
-        } else if (values instanceof Iterable<?>) {
-            exposedHeaders = new HashSet<String>();
-            for (Object value : (Iterable<?>) values) {
-                if (value != null && !value.toString().isEmpty()) {
-                    exposedHeaders.add(value.toString());
-                }
-            }
-        } else {
-            exposedHeaders = new HashSet<String>();
-        }
-
-        if (!webFragments.isEmpty()) {
-            initJersey();
-        }
-    }
-
-    /** Initialize the Jersey subsystem */
-    private synchronized void initJersey() throws NamespaceException, ServletException {
-
-        if (componentContext == null) {
-            log.debug(" ... can not init Jersey Endpoint - Component not yet activated!");
-            //throw new IllegalStateException("Null ComponentContext, not activated?");
-            return;
-        }
-
-        shutdownJersey();
-
-        log.info("(Re)initializing the Stanbol Jersey subsystem");
-
-        // register all the JAX-RS resources into a a JAX-RS application and bind it to a configurable URL
-        // prefix
-        JerseyEndpointApplication app = new JerseyEndpointApplication();
-        String staticUrlRoot = (String) componentContext.getProperties().get(
-            STATIC_RESOURCES_URL_ROOT_PROPERTY);
-        String applicationAlias = (String) componentContext.getProperties().get(ALIAS_PROPERTY);
-
-        // incrementally contribute fragment resources
-        List<LinkResource> linkResources = new ArrayList<LinkResource>();
-        List<ScriptResource> scriptResources = new ArrayList<ScriptResource>();
-        List<NavigationLink> navigationLinks = new ArrayList<NavigationLink>();
-        for (WebFragment fragment : webFragments) {
-            log.debug("Registering web fragment '{}' into jaxrs application", fragment.getName());
-            linkResources.addAll(fragment.getLinkResources());
-            scriptResources.addAll(fragment.getScriptResources());
-            navigationLinks.addAll(fragment.getNavigationLinks());
-            app.contributeClasses(fragment.getJaxrsResourceClasses());
-            app.contributeSingletons(fragment.getJaxrsResourceSingletons());
-            String staticPath = fragment.getStaticResourceClassPath();
-            if (staticPath != null) {
-                String resourceAlias = (applicationAlias.endsWith("/") ? applicationAlias.substring(0,
-                    applicationAlias.length() - 1) : applicationAlias)
-                                       + staticUrlRoot
-                                       + '/'
-                                       + fragment.getName();
-                httpService.registerResources(resourceAlias, staticPath, new BundleHttpContext(fragment));
-                registeredAliases.add(resourceAlias);
-            }
-        }
-        Collections.sort(linkResources);
-        Collections.sort(scriptResources);
-        Collections.sort(navigationLinks);
-
-        // bind the aggregate JAX-RS application to a dedicated servlet
-        ServletContainer container = new ServletContainer(app);
-        Bundle appBundle = componentContext.getBundleContext().getBundle();
-        httpService.registerServlet(applicationAlias, container, getInitParams(), new BundleHttpContext(
-                appBundle));
-        registeredAliases.add(applicationAlias);
-
-        // forward the main Stanbol OSGi runtime context so that JAX-RS resources can lookup arbitrary
-        // services
-        servletContext = container.getServletContext();
-        servletContext.setAttribute(BundleContext.class.getName(), componentContext.getBundleContext());
-        servletContext.setAttribute(BaseStanbolResource.ROOT_URL, applicationAlias);
-        servletContext.setAttribute(BaseStanbolResource.STATIC_RESOURCES_ROOT_URL, staticUrlRoot);
-        servletContext.setAttribute(BaseStanbolResource.LINK_RESOURCES, linkResources);
-        servletContext.setAttribute(BaseStanbolResource.SCRIPT_RESOURCES, scriptResources);
-        servletContext.setAttribute(BaseStanbolResource.NAVIGATION_LINKS, navigationLinks);
-        servletContext.setAttribute(CORS_ORIGIN, corsOrigins);
-        servletContext.setAttribute(CORS_ACCESS_CONTROL_EXPOSE_HEADERS, exposedHeaders);
-
-        log.info("JerseyEndpoint servlet registered at {}", applicationAlias);
-    }
-
-    /** Shutdown Jersey, if there's anything to do */
-    private synchronized void shutdownJersey() {
-        log.debug("Unregistering aliases {}", registeredAliases);
-        for (String alias : registeredAliases) {
-            httpService.unregister(alias);
-        }
-        registeredAliases.clear();
-    }
-
-    @Deactivate
-    protected void deactivate(ComponentContext ctx) {
-        shutdownJersey();
-        servletContext = null;
-        componentContext = null;
-    }
-
-    protected void bindWebFragment(WebFragment webFragment) throws IOException,
-                                                           ServletException,
-                                                           NamespaceException {
-        // TODO: support some ordering for jax-rs resource and template overrides?
-        webFragments.add(webFragment);
-        initJersey();
-    }
-
-    protected void unbindWebFragment(WebFragment webFragment) throws IOException,
-                                                             ServletException,
-                                                             NamespaceException {
-        webFragments.remove(webFragment);
-        initJersey();
-    }
-
-    public List<WebFragment> getWebFragments() {
-        return webFragments;
-    }
 }

Modified: stanbol/trunk/commons/web/base/src/main/java/org/apache/stanbol/commons/web/base/CorsHelper.java
URL: http://svn.apache.org/viewvc/stanbol/trunk/commons/web/base/src/main/java/org/apache/stanbol/commons/web/base/CorsHelper.java?rev=1415062&r1=1415061&r2=1415062&view=diff
==============================================================================
--- stanbol/trunk/commons/web/base/src/main/java/org/apache/stanbol/commons/web/base/CorsHelper.java (original)
+++ stanbol/trunk/commons/web/base/src/main/java/org/apache/stanbol/commons/web/base/CorsHelper.java Thu Nov 29 07:24:47 2012
@@ -16,8 +16,8 @@
  */
 package org.apache.stanbol.commons.web.base;
 
-import static org.apache.stanbol.commons.web.base.JerseyEndpoint.CORS_ORIGIN;
-import static org.apache.stanbol.commons.web.base.JerseyEndpoint.CORS_ACCESS_CONTROL_EXPOSE_HEADERS;
+import static org.apache.stanbol.commons.web.base.CorsConstants.CORS_ORIGIN;
+import static org.apache.stanbol.commons.web.base.CorsConstants.CORS_ACCESS_CONTROL_EXPOSE_HEADERS;
 
 import java.util.Collection;
 import java.util.List;

Copied: stanbol/trunk/commons/web/base/src/main/java/org/apache/stanbol/commons/web/base/DefaultApplication.java (from r1414723, stanbol/trunk/commons/web/base/src/main/java/org/apache/stanbol/commons/web/base/JerseyEndpointApplication.java)
URL: http://svn.apache.org/viewvc/stanbol/trunk/commons/web/base/src/main/java/org/apache/stanbol/commons/web/base/DefaultApplication.java?p2=stanbol/trunk/commons/web/base/src/main/java/org/apache/stanbol/commons/web/base/DefaultApplication.java&p1=stanbol/trunk/commons/web/base/src/main/java/org/apache/stanbol/commons/web/base/JerseyEndpointApplication.java&r1=1414723&r2=1415062&rev=1415062&view=diff
==============================================================================
--- stanbol/trunk/commons/web/base/src/main/java/org/apache/stanbol/commons/web/base/JerseyEndpointApplication.java (original)
+++ stanbol/trunk/commons/web/base/src/main/java/org/apache/stanbol/commons/web/base/DefaultApplication.java Thu Nov 29 07:24:47 2012
@@ -35,10 +35,10 @@ import freemarker.cache.TemplateLoader;
 /**
  * Define the list of available resources and providers to be used by the Stanbol JAX-RS Endpoint.
  */
-public class JerseyEndpointApplication extends Application {
+public class DefaultApplication extends Application {
 
     @SuppressWarnings("unused")
-    private static final Logger log = LoggerFactory.getLogger(JerseyEndpointApplication.class);
+    private static final Logger log = LoggerFactory.getLogger(DefaultApplication.class);
 
     protected final Set<Class<?>> contributedClasses = new HashSet<Class<?>>();
 

Modified: stanbol/trunk/commons/web/base/src/test/java/org/apache/stanbol/commons/web/base/CorsAccessControlAllowMethodTest.java
URL: http://svn.apache.org/viewvc/stanbol/trunk/commons/web/base/src/test/java/org/apache/stanbol/commons/web/base/CorsAccessControlAllowMethodTest.java?rev=1415062&r1=1415061&r2=1415062&view=diff
==============================================================================
--- stanbol/trunk/commons/web/base/src/test/java/org/apache/stanbol/commons/web/base/CorsAccessControlAllowMethodTest.java (original)
+++ stanbol/trunk/commons/web/base/src/test/java/org/apache/stanbol/commons/web/base/CorsAccessControlAllowMethodTest.java Thu Nov 29 07:24:47 2012
@@ -29,11 +29,11 @@ import javax.ws.rs.core.HttpHeaders;
 import javax.ws.rs.core.MultivaluedMap;
 import javax.ws.rs.core.Response;
 import javax.ws.rs.core.Response.ResponseBuilder;
+import org.apache.wink.common.internal.MultivaluedMapImpl;
 
 import org.junit.Assert;
 import org.junit.Test;
 
-import com.sun.jersey.core.util.MultivaluedMapImpl;
 
 /**
  * Tests issue reported/fix for STANBOL-616
@@ -46,7 +46,7 @@ public class CorsAccessControlAllowMetho
     @Test
     public void testAccessControlAllowMethodTest() {
         ServletContext context = new MockServletContext();
-        context.setAttribute(JerseyEndpoint.CORS_ORIGIN, Collections.singleton("*"));
+        context.setAttribute(CorsConstants.CORS_ORIGIN, Collections.singleton("*"));
         MultivaluedMap<String,String> header = new MultivaluedMapImpl();
         header.add("Origin", "https://issues.apache.org/jira/browse/STANBOL-616");
         header.put("Access-Control-Request-Headers", Arrays.asList("Origin", "Content-Type", "Accept"));

Modified: stanbol/trunk/commons/web/base/src/test/java/org/apache/stanbol/commons/web/base/MockServletContext.java
URL: http://svn.apache.org/viewvc/stanbol/trunk/commons/web/base/src/test/java/org/apache/stanbol/commons/web/base/MockServletContext.java?rev=1415062&r1=1415061&r2=1415062&view=diff
==============================================================================
--- stanbol/trunk/commons/web/base/src/test/java/org/apache/stanbol/commons/web/base/MockServletContext.java (original)
+++ stanbol/trunk/commons/web/base/src/test/java/org/apache/stanbol/commons/web/base/MockServletContext.java Thu Nov 29 07:24:47 2012
@@ -43,7 +43,7 @@ public final class MockServletContext im
     private final Map<String,Object> attributes = new HashMap<String,Object>();
 
     protected MockServletContext() {
-        attributes.put(JerseyEndpoint.CORS_ACCESS_CONTROL_EXPOSE_HEADERS,
+        attributes.put(CorsConstants.CORS_ACCESS_CONTROL_EXPOSE_HEADERS,
             new HashSet<String>(Arrays.asList(new String[] {"Location"})));
     }
 

Modified: stanbol/trunk/commons/web/ldviewable/src/main/java/org/apache/stanbol/commons/ldviewable/mbw/ViewableWriter.java
URL: http://svn.apache.org/viewvc/stanbol/trunk/commons/web/ldviewable/src/main/java/org/apache/stanbol/commons/ldviewable/mbw/ViewableWriter.java?rev=1415062&r1=1415061&r2=1415062&view=diff
==============================================================================
--- stanbol/trunk/commons/web/ldviewable/src/main/java/org/apache/stanbol/commons/ldviewable/mbw/ViewableWriter.java (original)
+++ stanbol/trunk/commons/web/ldviewable/src/main/java/org/apache/stanbol/commons/ldviewable/mbw/ViewableWriter.java Thu Nov 29 07:24:47 2012
@@ -17,21 +17,13 @@
 package org.apache.stanbol.commons.ldviewable.mbw;
 
 import java.io.IOException;
-import java.io.InputStream;
 import java.io.OutputStream;
 import java.io.OutputStreamWriter;
-import java.io.PrintStream;
 import java.io.Writer;
 import java.lang.annotation.Annotation;
 import java.lang.reflect.Type;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.servlet.ServletContext;
 import javax.ws.rs.Produces;
 import javax.ws.rs.WebApplicationException;
-import javax.ws.rs.core.Context;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.MultivaluedMap;
 import javax.ws.rs.ext.MessageBodyWriter;
@@ -41,14 +33,6 @@ import org.apache.felix.scr.annotations.
 import org.apache.felix.scr.annotations.Service;
 import org.apache.stanbol.commons.ldpathtemplate.LdRenderer;
 import org.apache.stanbol.commons.ldviewable.Viewable;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.sun.jersey.spi.template.ViewProcessor;
-
-import freemarker.cache.TemplateLoader;
-import freemarker.template.Configuration;
-import freemarker.template.Template;
 
 @Component
 @Service(ViewableWriter.class)

Modified: stanbol/trunk/entityhub/jersey/pom.xml
URL: http://svn.apache.org/viewvc/stanbol/trunk/entityhub/jersey/pom.xml?rev=1415062&r1=1415061&r2=1415062&view=diff
==============================================================================
--- stanbol/trunk/entityhub/jersey/pom.xml (original)
+++ stanbol/trunk/entityhub/jersey/pom.xml Thu Nov 29 07:24:47 2012
@@ -214,6 +214,11 @@
       <artifactId>junit</artifactId>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>com.sun.jersey</groupId>
+      <artifactId>jersey-core</artifactId>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
 
 </project>

Modified: stanbol/trunk/entityhub/jersey/src/main/java/org/apache/stanbol/entityhub/jersey/resource/ReferencedSiteRootResource.java
URL: http://svn.apache.org/viewvc/stanbol/trunk/entityhub/jersey/src/main/java/org/apache/stanbol/entityhub/jersey/resource/ReferencedSiteRootResource.java?rev=1415062&r1=1415061&r2=1415062&view=diff
==============================================================================
--- stanbol/trunk/entityhub/jersey/src/main/java/org/apache/stanbol/entityhub/jersey/resource/ReferencedSiteRootResource.java (original)
+++ stanbol/trunk/entityhub/jersey/src/main/java/org/apache/stanbol/entityhub/jersey/resource/ReferencedSiteRootResource.java Thu Nov 29 07:24:47 2012
@@ -114,7 +114,6 @@ import at.newmedialab.ldpath.model.progr
 
 import com.hp.hpl.jena.reasoner.rulesys.builtins.GE;
 import org.apache.stanbol.commons.ldviewable.Viewable;
-import com.sun.research.ws.wadl.HTTPMethods;
 
 /**
  * Resource to provide a REST API for the {@link SiteManager}

Modified: stanbol/trunk/entityhub/jersey/src/main/java/org/apache/stanbol/entityhub/jersey/utils/JerseyUtils.java
URL: http://svn.apache.org/viewvc/stanbol/trunk/entityhub/jersey/src/main/java/org/apache/stanbol/entityhub/jersey/utils/JerseyUtils.java?rev=1415062&r1=1415061&r2=1415062&view=diff
==============================================================================
--- stanbol/trunk/entityhub/jersey/src/main/java/org/apache/stanbol/entityhub/jersey/utils/JerseyUtils.java (original)
+++ stanbol/trunk/entityhub/jersey/src/main/java/org/apache/stanbol/entityhub/jersey/utils/JerseyUtils.java Thu Nov 29 07:24:47 2012
@@ -61,7 +61,6 @@ import org.apache.stanbol.entityhub.serv
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.sun.jersey.api.representation.Form;
 /**
  * Utility methods used by several of the RESTful service endpoints of the
  * Entityhub.

Modified: stanbol/trunk/launchers/bundlelists/stanbolcommons/src/main/bundles/list.xml
URL: http://svn.apache.org/viewvc/stanbol/trunk/launchers/bundlelists/stanbolcommons/src/main/bundles/list.xml?rev=1415062&r1=1415061&r2=1415062&view=diff
==============================================================================
--- stanbol/trunk/launchers/bundlelists/stanbolcommons/src/main/bundles/list.xml (original)
+++ stanbol/trunk/launchers/bundlelists/stanbolcommons/src/main/bundles/list.xml Thu Nov 29 07:24:47 2012
@@ -172,7 +172,7 @@
     <bundle>
       <groupId>com.sun.jersey</groupId>
       <artifactId>jersey-core</artifactId>
-      <version>1.12</version>
+      <version>1.15</version>
     </bundle>
     <bundle>
       <groupId>org.codehaus.jackson</groupId>
@@ -194,18 +194,18 @@
     <bundle>
       <groupId>com.sun.jersey</groupId>
       <artifactId>jersey-server</artifactId>
-      <version>1.12</version>
+      <version>1.15</version>
     </bundle>
     <bundle>
       <groupId>com.sun.jersey</groupId>
       <artifactId>jersey-servlet</artifactId>
-      <version>1.12</version>
+      <version>1.15</version>
     </bundle>
     <!-- needed to read data from mime multipart requests -->
     <bundle>
       <groupId>com.sun.jersey.contribs</groupId>
       <artifactId>jersey-multipart</artifactId>
-      <version>1.12</version>
+      <version>1.15</version>
     </bundle>
     <!-- dependency of jersey-multipart -->
     <bundle>
@@ -423,6 +423,11 @@
     </bundle>
     <bundle>
       <groupId>org.apache.stanbol</groupId>
+      <artifactId>org.apache.stanbol.commons.web.base.jersey</artifactId>
+      <version>0.10.1-SNAPSHOT</version>
+    </bundle>
+    <bundle>
+      <groupId>org.apache.stanbol</groupId>
       <artifactId>org.apache.stanbol.commons.web.home</artifactId>
       <version>0.10.0-SNAPSHOT</version>
     </bundle>

Modified: stanbol/trunk/launchers/full-war/src/main/bundles/list.xml
URL: http://svn.apache.org/viewvc/stanbol/trunk/launchers/full-war/src/main/bundles/list.xml?rev=1415062&r1=1415061&r2=1415062&view=diff
==============================================================================
--- stanbol/trunk/launchers/full-war/src/main/bundles/list.xml (original)
+++ stanbol/trunk/launchers/full-war/src/main/bundles/list.xml Thu Nov 29 07:24:47 2012
@@ -43,7 +43,7 @@
     <bundle>
       <groupId>com.sun.jersey</groupId>
       <artifactId>jersey-client</artifactId>
-      <version>1.12</version>
+      <version>1.15</version>
     </bundle>
   </startLevel>
 

Modified: stanbol/trunk/launchers/full/src/main/bundles/list.xml
URL: http://svn.apache.org/viewvc/stanbol/trunk/launchers/full/src/main/bundles/list.xml?rev=1415062&r1=1415061&r2=1415062&view=diff
==============================================================================
--- stanbol/trunk/launchers/full/src/main/bundles/list.xml (original)
+++ stanbol/trunk/launchers/full/src/main/bundles/list.xml Thu Nov 29 07:24:47 2012
@@ -38,7 +38,7 @@
     <bundle>
       <groupId>com.sun.jersey</groupId>
       <artifactId>jersey-client</artifactId>
-      <version>1.12</version>
+      <version>1.15</version>
     </bundle>
   </startLevel>
 

Modified: stanbol/trunk/ontologymanager/web/pom.xml
URL: http://svn.apache.org/viewvc/stanbol/trunk/ontologymanager/web/pom.xml?rev=1415062&r1=1415061&r2=1415062&view=diff
==============================================================================
--- stanbol/trunk/ontologymanager/web/pom.xml (original)
+++ stanbol/trunk/ontologymanager/web/pom.xml Thu Nov 29 07:24:47 2012
@@ -64,9 +64,6 @@
             <Export-Package>
               org.apache.stanbol.ontologymanager.web.*
             </Export-Package>
-            <Embed-Dependency>*;scope=compile|runtime;inline=false;artifactId=jersey-json|jettison|jackson-core-asl
-            </Embed-Dependency>
-            <Embed-Transitive>true</Embed-Transitive>
           </instructions>
         </configuration>
       </plugin>
@@ -156,11 +153,11 @@
       <groupId>com.sun.jersey</groupId>
       <artifactId>jersey-core</artifactId>
     </dependency>
-    <dependency>
+   <!-- <dependency>
       <groupId>com.sun.jersey</groupId>
       <artifactId>jersey-json</artifactId>
       <exclusions>
-        <!-- jaxb is now part of java 6 -->
+        <!- jaxb is now part of java 6 ->
         <exclusion>
           <groupId>com.sun.xml.bind</groupId>
           <artifactId>jaxb-api</artifactId>
@@ -170,7 +167,7 @@
           <artifactId>jaxb-impl</artifactId>
         </exclusion>
       </exclusions>
-    </dependency>
+    </dependency> -->
     <dependency>
       <groupId>com.sun.jersey.contribs</groupId>
       <artifactId>jersey-multipart</artifactId>
@@ -183,15 +180,15 @@
       <groupId>javax.ws.rs</groupId>
       <artifactId>jsr311-api</artifactId>
     </dependency>    
-    <dependency>
+    <!-- <dependency>
       <groupId>org.freemarker</groupId>
       <artifactId>freemarker</artifactId>
     </dependency>
-    <!-- indirect dependency for freemarker -->
+
     <dependency>
       <groupId>org.codehaus.jettison</groupId>
       <artifactId>jettison</artifactId>
-    </dependency>
+    </dependency> -->
 
     <!-- servlet container, most useful for the tests -->
     <dependency>

Modified: stanbol/trunk/parent/pom.xml
URL: http://svn.apache.org/viewvc/stanbol/trunk/parent/pom.xml?rev=1415062&r1=1415061&r2=1415062&view=diff
==============================================================================
--- stanbol/trunk/parent/pom.xml (original)
+++ stanbol/trunk/parent/pom.xml Thu Nov 29 07:24:47 2012
@@ -57,7 +57,7 @@
 
   <properties>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-    <jersey-version>1.12</jersey-version>
+    <jersey-version>1.15</jersey-version>
     <freemarker-version>2.3.19</freemarker-version>
     <solr-version>3.6.1</solr-version>
     <pax-exam-version>2.3.0.M1</pax-exam-version>

Modified: stanbol/trunk/rules/web/pom.xml
URL: http://svn.apache.org/viewvc/stanbol/trunk/rules/web/pom.xml?rev=1415062&r1=1415061&r2=1415062&view=diff
==============================================================================
--- stanbol/trunk/rules/web/pom.xml (original)
+++ stanbol/trunk/rules/web/pom.xml Thu Nov 29 07:24:47 2012
@@ -59,9 +59,6 @@
             <Export-Package>
               org.apache.stanbol.rules.web.*
             </Export-Package>
-            <Embed-Dependency>*;scope=compile|runtime;inline=false;artifactId=jersey-json|jettison|jackson-core-asl
-            </Embed-Dependency>
-            <Embed-Transitive>true</Embed-Transitive>
             <Import-Package>
               !org.apache.felix.http.jetty, 
               !org.mortbay.jetty.*,
@@ -139,7 +136,7 @@
     	<groupId>org.apache.stanbol</groupId>
   		<artifactId>org.apache.stanbol.commons.ldviewable</artifactId>
     </dependency>
-<dependency>
+    <dependency>
       <groupId>com.sun.jersey</groupId>
       <artifactId>jersey-server</artifactId>
     </dependency>
@@ -147,22 +144,23 @@
       <groupId>com.sun.jersey</groupId>
       <artifactId>jersey-core</artifactId>
     </dependency>
-    <dependency>
+    <!-- <dependency>
       <groupId>com.sun.jersey</groupId>
       <artifactId>jersey-json</artifactId>
-    </dependency>
+    </dependency> -->
     <dependency>
       <groupId>com.sun.jersey.contribs</groupId>
       <artifactId>jersey-multipart</artifactId>
     </dependency>
-    <dependency>
+    <!-- <dependency>
       <groupId>javax.servlet</groupId>
       <artifactId>servlet-api</artifactId>
     </dependency>
     <dependency>
       <groupId>org.freemarker</groupId>
       <artifactId>freemarker</artifactId>
-    </dependency>
+    </dependency> -->
+   
 
     <!-- OSGi tax -->
     <dependency>