You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by jb...@apache.org on 2014/06/30 13:02:52 UTC
git commit: [KARAF-3084] Remove CXF dependency and fix httpcore-osgi
version
Repository: karaf-cave
Updated Branches:
refs/heads/cave-2.x 0e4b18406 -> 8b4056bb3
[KARAF-3084] Remove CXF dependency and fix httpcore-osgi version
Project: http://git-wip-us.apache.org/repos/asf/karaf-cave/repo
Commit: http://git-wip-us.apache.org/repos/asf/karaf-cave/commit/8b4056bb
Tree: http://git-wip-us.apache.org/repos/asf/karaf-cave/tree/8b4056bb
Diff: http://git-wip-us.apache.org/repos/asf/karaf-cave/diff/8b4056bb
Branch: refs/heads/cave-2.x
Commit: 8b4056bb3d4fc1f6853297eb4bcd57eaf887e9f5
Parents: 0e4b184
Author: Jean-Baptiste Onofré <jb...@apache.org>
Authored: Mon Jun 30 13:02:21 2014 +0200
Committer: Jean-Baptiste Onofré <jb...@apache.org>
Committed: Mon Jun 30 13:02:21 2014 +0200
----------------------------------------------------------------------
assembly/pom.xml | 5 --
assembly/src/main/resources/cxf.cfg | 1 -
assembly/src/main/resources/features.xml | 8 +--
client/NOTICE | 29 ----------
client/pom.xml | 56 ------------------
.../karaf/cave/client/RepositoryAdminProxy.java | 60 --------------------
.../main/webapp/user-guide/installation.conf | 2 +-
pom.xml | 6 --
server/api/pom.xml | 7 ---
.../karaf/cave/server/api/CaveRepository.java | 2 -
.../cave/server/api/CaveRepositoryService.java | 19 +------
server/storage/pom.xml | 4 --
.../OSGI-INF/blueprint/cave-storage.xml | 15 +----
13 files changed, 4 insertions(+), 210 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/karaf-cave/blob/8b4056bb/assembly/pom.xml
----------------------------------------------------------------------
diff --git a/assembly/pom.xml b/assembly/pom.xml
index 9279d1c..b8ec117 100644
--- a/assembly/pom.xml
+++ b/assembly/pom.xml
@@ -87,11 +87,6 @@
<type>cfg</type>
<classifier>filesystem</classifier>
</artifact>
- <artifact>
- <file>target/classes/cxf.cfg</file>
- <type>cfg</type>
- <classifier>cxf</classifier>
- </artifact>
</artifacts>
</configuration>
</execution>
http://git-wip-us.apache.org/repos/asf/karaf-cave/blob/8b4056bb/assembly/src/main/resources/cxf.cfg
----------------------------------------------------------------------
diff --git a/assembly/src/main/resources/cxf.cfg b/assembly/src/main/resources/cxf.cfg
deleted file mode 100644
index 81e411e..0000000
--- a/assembly/src/main/resources/cxf.cfg
+++ /dev/null
@@ -1 +0,0 @@
-org.apache.cxf.servlet.context=/services
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/karaf-cave/blob/8b4056bb/assembly/src/main/resources/features.xml
----------------------------------------------------------------------
diff --git a/assembly/src/main/resources/features.xml b/assembly/src/main/resources/features.xml
index 4016abc..6d2db3e 100644
--- a/assembly/src/main/resources/features.xml
+++ b/assembly/src/main/resources/features.xml
@@ -18,20 +18,14 @@
-->
<features name="karaf-cave-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.0.0">
- <repository>mvn:org.apache.cxf.karaf/apache-cxf/${cxf.version}/xml/features</repository>
-
<feature name="cave-server" version="${project.version}">
- <configfile finalname="/etc/org.apache.cxf.osgi.cfg">
- mvn:org.apache.karaf.cave/apache-karaf-cave/${project.version}/cfg/cxf
- </configfile>
- <feature version="[2.4,3)">cxf</feature>
<feature>obr</feature>
<feature>war</feature>
<configfile finalname="/etc/org.apache.karaf.cave.server.storage.cfg">
mvn:org.apache.karaf.cave/apache-karaf-cave/${project.version}/cfg/filesystem
</configfile>
<bundle>mvn:commons-io/commons-io/${commons-io.version}</bundle>
- <bundle>mvn:org.apache.httpcomponents/httpcore-osgi/${httpclient.version}</bundle>
+ <bundle>mvn:org.apache.httpcomponents/httpcore-osgi/4.3.2</bundle>
<bundle>mvn:org.apache.httpcomponents/httpclient-osgi/${httpclient.version}</bundle>
<bundle>mvn:org.jsoup/jsoup/${jsoup.version}</bundle>
<bundle>mvn:org.apache.karaf.cave.server/org.apache.karaf.cave.server.api/${project.version}</bundle>
http://git-wip-us.apache.org/repos/asf/karaf-cave/blob/8b4056bb/client/NOTICE
----------------------------------------------------------------------
diff --git a/client/NOTICE b/client/NOTICE
deleted file mode 100644
index 2bd5453..0000000
--- a/client/NOTICE
+++ /dev/null
@@ -1,29 +0,0 @@
-Apache Karaf Cave
-Copyright 2010-2014 The Apache Software Foundation
-
-I. Included Software
-
-This product includes software developed at
-The Apache Software Foundation (http://www.apache.org/).
-Licensed under the Apache License 2.0.
-
-II. Used Software
-
-This product uses software developed at
-The OSGi Alliance (http://www.osgi.org/).
-Copyright (c) OSGi Alliance (2000, 2010).
-Licensed under the Apache License 2.0.
-
-This product uses software developed at
-OPS4J (http://www.ops4j.org/).
-Licensed under the Apache License 2.0.
-
-This product uses software developed at
-SLF4J (http://www.slf4j.org/).
-Licensed under the MIT License.
-
-This product includes software from http://www.json.org.
-Copyright (c) 2002 JSON.org
-
-III. License Summary
-- Apache License 2.0
http://git-wip-us.apache.org/repos/asf/karaf-cave/blob/8b4056bb/client/pom.xml
----------------------------------------------------------------------
diff --git a/client/pom.xml b/client/pom.xml
deleted file mode 100644
index 18fb126..0000000
--- a/client/pom.xml
+++ /dev/null
@@ -1,56 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-
- <!--
-
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- -->
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.karaf</groupId>
- <artifactId>cave</artifactId>
- <version>2.3.0-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
-
- <groupId>org.apache.karaf.cave</groupId>
- <artifactId>org.apache.karaf.cave.client</artifactId>
- <name>Apache Karaf :: Cave :: Client</name>
- <packaging>bundle</packaging>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-rt-frontend-jaxrs</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.felix</groupId>
- <artifactId>org.apache.felix.bundlerepository</artifactId>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- </plugin>
- </plugins>
- </build>
-
-</project>
http://git-wip-us.apache.org/repos/asf/karaf-cave/blob/8b4056bb/client/src/main/java/org/apache/karaf/cave/client/RepositoryAdminProxy.java
----------------------------------------------------------------------
diff --git a/client/src/main/java/org/apache/karaf/cave/client/RepositoryAdminProxy.java b/client/src/main/java/org/apache/karaf/cave/client/RepositoryAdminProxy.java
deleted file mode 100644
index 1e1ecce..0000000
--- a/client/src/main/java/org/apache/karaf/cave/client/RepositoryAdminProxy.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.karaf.cave.client;
-
-import org.apache.cxf.jaxrs.client.WebClient;
-import org.apache.felix.bundlerepository.DataModelHelper;
-import org.apache.felix.bundlerepository.RepositoryAdmin;
-import org.apache.felix.bundlerepository.Requirement;
-import org.apache.felix.bundlerepository.Resource;
-import org.apache.felix.bundlerepository.impl.DataModelHelperImpl;
-import org.apache.felix.bundlerepository.impl.RepositoryImpl;
-import org.osgi.framework.InvalidSyntaxException;
-
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * Implementation of the OBR RepositoryAdmin service which proxy to a Karaf Cave server.
- */
-public class RepositoryAdminProxy implements RepositoryAdmin {
-
- private final String caveServerUrl;
-
- private final Map<String, RepositoryImpl> repositories = new HashMap<String, RepositoryImpl>();
- private final DataModelHelper dataModelHelper = new DataModelHelperImpl();
-
- public RepositoryAdminProxy(String caveServerUrl) {
- this.caveServerUrl = caveServerUrl;
- }
-
- public Resource[] discoverResources(String filter) throws InvalidSyntaxException {
- // check if the syntax is valid
- dataModelHelper.filter(filter);
- // delegate to the Cave server
- WebClient client = WebClient.create(caveServerUrl + "/obr/resources");
-
- }
-
- public Resource[] discoverResources(Requirement[] requirements) {
- WebClient client = WebClient.create(caveServerUrl + "/obr/resources");
- }
-
-
-}
http://git-wip-us.apache.org/repos/asf/karaf-cave/blob/8b4056bb/manual/src/main/webapp/user-guide/installation.conf
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/user-guide/installation.conf b/manual/src/main/webapp/user-guide/installation.conf
index 19c7f20..b576897 100644
--- a/manual/src/main/webapp/user-guide/installation.conf
+++ b/manual/src/main/webapp/user-guide/installation.conf
@@ -32,7 +32,7 @@ The Apache Karaf Cave Server is installed by the {{cave-server}} feature:
karaf@root> features:install cave-server
{code}
-NB: installation of the cave-server feature will install additional features, such as obr, http, war, CXF. It could take
+NB: installation of the cave-server feature will install additional features, such as obr, http, war. It could take
several minutes depending of your network connection speed.
New Apache Karaf Cave commands are now available:
http://git-wip-us.apache.org/repos/asf/karaf-cave/blob/8b4056bb/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index fc93f9c..735067f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -36,7 +36,6 @@
<properties>
<commons-io.version>2.4</commons-io.version>
- <cxf.version>2.7.11</cxf.version>
<felix.bundlerepository.version>1.6.6</felix.bundlerepository.version>
<httpclient.version>4.3.4</httpclient.version>
<jsoup.version>1.7.3</jsoup.version>
@@ -66,11 +65,6 @@
<version>${commons-io.version}</version>
</dependency>
<dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-rt-frontend-jaxrs</artifactId>
- <version>${cxf.version}</version>
- </dependency>
- <dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient-osgi</artifactId>
<version>${httpclient.version}</version>
http://git-wip-us.apache.org/repos/asf/karaf-cave/blob/8b4056bb/server/api/pom.xml
----------------------------------------------------------------------
diff --git a/server/api/pom.xml b/server/api/pom.xml
index 4204404..6f23e95 100644
--- a/server/api/pom.xml
+++ b/server/api/pom.xml
@@ -33,13 +33,6 @@
<name>Apache Karaf :: Cave :: Server :: API</name>
<packaging>bundle</packaging>
- <dependencies>
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-rt-frontend-jaxrs</artifactId>
- </dependency>
- </dependencies>
-
<build>
<plugins>
<plugin>
http://git-wip-us.apache.org/repos/asf/karaf-cave/blob/8b4056bb/server/api/src/main/java/org/apache/karaf/cave/server/api/CaveRepository.java
----------------------------------------------------------------------
diff --git a/server/api/src/main/java/org/apache/karaf/cave/server/api/CaveRepository.java b/server/api/src/main/java/org/apache/karaf/cave/server/api/CaveRepository.java
index 025e530..ed9dc19 100644
--- a/server/api/src/main/java/org/apache/karaf/cave/server/api/CaveRepository.java
+++ b/server/api/src/main/java/org/apache/karaf/cave/server/api/CaveRepository.java
@@ -16,14 +16,12 @@
*/
package org.apache.karaf.cave.server.api;
-import javax.xml.bind.annotation.XmlRootElement;
import java.net.URL;
/**
* Cave repository is a storage area where to upload artifacts.
* It's already the basement of the OBR repository.xml metadata.
*/
-@XmlRootElement(name = "cave-repository")
public abstract class CaveRepository {
private String name;
http://git-wip-us.apache.org/repos/asf/karaf-cave/blob/8b4056bb/server/api/src/main/java/org/apache/karaf/cave/server/api/CaveRepositoryService.java
----------------------------------------------------------------------
diff --git a/server/api/src/main/java/org/apache/karaf/cave/server/api/CaveRepositoryService.java b/server/api/src/main/java/org/apache/karaf/cave/server/api/CaveRepositoryService.java
index 733f631..c0f7803 100644
--- a/server/api/src/main/java/org/apache/karaf/cave/server/api/CaveRepositoryService.java
+++ b/server/api/src/main/java/org/apache/karaf/cave/server/api/CaveRepositoryService.java
@@ -16,12 +16,9 @@
*/
package org.apache.karaf.cave.server.api;
-import javax.ws.rs.*;
-
/**
* Service to manipulate a Cave repository.
*/
-@Path("/")
public interface CaveRepositoryService {
/**
@@ -32,9 +29,6 @@ public interface CaveRepositoryService {
* @return the Cave repository.
* @throws Exception in case of creation failure.
*/
- @POST
- @Consumes("application/xml")
- @Produces("application/xml")
CaveRepository create(String name, boolean scan) throws Exception;
/**
@@ -46,9 +40,6 @@ public interface CaveRepositoryService {
* @return the Cave repository.
* @throws Exception in case of creation failure.
*/
- @POST
- @Consumes("application/xml")
- @Produces("application/xml")
CaveRepository create(String name, String location, boolean scan) throws Exception;
/**
@@ -81,8 +72,6 @@ public interface CaveRepositoryService {
* @param name the name of the Cave repository.
* @throws Exception in case of registration failure.
*/
- @POST
- @Consumes("text/plain")
void install(String name) throws Exception;
/**
@@ -90,9 +79,6 @@ public interface CaveRepositoryService {
*
* @return the Cave repositories.
*/
- @GET
- @Path("/repositories")
- @Produces("application/xml")
CaveRepository[] getRepositories();
/**
@@ -101,9 +87,6 @@ public interface CaveRepositoryService {
* @param name the name of the Cave repository.
* @return the Cave repository
*/
- @GET
- @Path("/repositories/{name}")
- @Produces("application/xml")
- CaveRepository getRepository(@PathParam("name") String name);
+ CaveRepository getRepository(String name);
}
http://git-wip-us.apache.org/repos/asf/karaf-cave/blob/8b4056bb/server/storage/pom.xml
----------------------------------------------------------------------
diff --git a/server/storage/pom.xml b/server/storage/pom.xml
index cefb766..8f5fc3f 100644
--- a/server/storage/pom.xml
+++ b/server/storage/pom.xml
@@ -55,10 +55,6 @@
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient-osgi</artifactId>
</dependency>
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-rt-frontend-jaxrs</artifactId>
- </dependency>
</dependencies>
<build>
http://git-wip-us.apache.org/repos/asf/karaf-cave/blob/8b4056bb/server/storage/src/main/resources/OSGI-INF/blueprint/cave-storage.xml
----------------------------------------------------------------------
diff --git a/server/storage/src/main/resources/OSGI-INF/blueprint/cave-storage.xml b/server/storage/src/main/resources/OSGI-INF/blueprint/cave-storage.xml
index d626174..d2cac91 100644
--- a/server/storage/src/main/resources/OSGI-INF/blueprint/cave-storage.xml
+++ b/server/storage/src/main/resources/OSGI-INF/blueprint/cave-storage.xml
@@ -20,13 +20,7 @@
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
- xmlns:cxf="http://cxf.apache.org/blueprint/core"
- xmlns:jaxrs="http://cxf.apache.org/blueprint/jaxrs"
- xsi:schemaLocation="
- http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
- http://cxf.apache.org/blueprint/jaxrs http://cxf.apache.org/schemas/blueprint/jaxrs.xsd
- http://cxf.apache.org/blueprint/core http://cxf.apache.org/schemas/blueprint/core.xsd
- "
+ xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd"
default-activation="lazy">
<bean id="caveRepositoryService" class="org.apache.karaf.cave.server.storage.CaveRepositoryServiceImpl" init-method="init">
@@ -45,11 +39,4 @@
</cm:default-properties>
</cm:property-placeholder>
- <!-- start the JAX-RS server -->
- <jaxrs:server id="caveRepositoryJaxRsServer" address="/cave">
- <jaxrs:serviceBeans>
- <ref component-id="caveRepositoryService"/>
- </jaxrs:serviceBeans>
- </jaxrs:server>
-
</blueprint>
\ No newline at end of file