Repository: jena
Updated Branches:
  refs/heads/master da06f269a -> 9d4d8f3ee


jena-osgi,jena-osgi-test under apache-jena-osgi


Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/d70e7dbc
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/d70e7dbc
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/d70e7dbc

Branch: refs/heads/master
Commit: d70e7dbcff6e304724caaf644f1f0f5394ff6998
Parents: ef2071f
Author: Stian Soiland-Reyes <[email protected]>
Authored: Tue Feb 3 11:59:38 2015 +0000
Committer: Stian Soiland-Reyes <[email protected]>
Committed: Thu Feb 5 15:05:44 2015 +0000

----------------------------------------------------------------------
 apache-jena-osgi/jena-osgi-test/pom.xml         | 121 ++++++++++
 .../org/apache/jena/osgi/test/JenaOSGITest.java |  47 ++++
 .../jena/osgi/test/JenaOSGITestActivator.java   |  42 ++++
 .../apache/jena/osgi/test/JenaOSGITestImpl.java | 170 ++++++++++++++
 apache-jena-osgi/jena-osgi/pom.xml              | 234 +++++++++++++++++++
 apache-jena-osgi/pom.xml                        |  51 ++++
 jena-osgi-test/pom.xml                          | 121 ----------
 .../org/apache/jena/osgi/test/JenaOSGITest.java |  47 ----
 .../jena/osgi/test/JenaOSGITestActivator.java   |  42 ----
 .../apache/jena/osgi/test/JenaOSGITestImpl.java | 170 --------------
 jena-osgi/pom.xml                               | 234 -------------------
 pom.xml                                         |   4 +-
 12 files changed, 666 insertions(+), 617 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/d70e7dbc/apache-jena-osgi/jena-osgi-test/pom.xml
----------------------------------------------------------------------
diff --git a/apache-jena-osgi/jena-osgi-test/pom.xml 
b/apache-jena-osgi/jena-osgi-test/pom.xml
new file mode 100644
index 0000000..d3d5e80
--- /dev/null
+++ b/apache-jena-osgi/jena-osgi-test/pom.xml
@@ -0,0 +1,121 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+   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.
+-->
+
+<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";>
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.jena</groupId>
+    <artifactId>jena-parent</artifactId>
+    <version>12-SNAPSHOT</version>
+    <relativePath>../jena-parent</relativePath>
+  </parent>
+
+  <artifactId>jena-osgi-test</artifactId>
+  <version>2.13.0-SNAPSHOT</version>
+  <name>Apache Jena - OSGi bundle tests</name>
+  <description>Tests for jena-osgi as a bundle</description>
+  <packaging>bundle</packaging>
+
+  <dependencies>
+
+    <dependency>
+      <groupId>org.apache.jena</groupId>
+      <artifactId>jena-osgi</artifactId>
+      <version>${project.version}</version>
+      <type>bundle</type>
+    </dependency>
+
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.everit.osgi.dev</groupId>
+      <artifactId>org.everit.osgi.dev.testrunner.junit4</artifactId>
+      <version>3.0.4</version>
+      <scope>test</scope>
+    </dependency>
+    <!--  NOTE: LGPL -->                        
+
+    <dependency>
+      <groupId>org.osgi</groupId>
+      <artifactId>org.osgi.core</artifactId>
+      <version>4.3.1</version>
+      <scope>provided</scope>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.felix</groupId>
+        <artifactId>maven-bundle-plugin</artifactId>
+        <extensions>true</extensions>
+        <configuration>
+          <instructions>
+            
<Bundle-Activator>org.apache.jena.osgi.test.JenaOSGITestActivator</Bundle-Activator>
+            <!-- <Import-Package>com.hp.hpl.jena</Import-Package> -->
+            <!-- 
<Embed-Dependency>artifactId=jena-core;inline=true</Embed-Dependency> -->
+            
+            <!-- Update according to expected number of @Test methods -->      
                                              
+            <EOSGi-TestNum>4</EOSGi-TestNum>
+          </instructions>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.everit.osgi.dev</groupId>
+        <artifactId>eosgi-maven-plugin</artifactId>
+        <version>3.1.0</version>
+        <executions>
+          <execution>
+            <id>integration-test</id>
+            <phase>integration-test</phase>
+            <goals>
+              <goal>integration-test</goal>
+            </goals>
+          </execution>
+        </executions>
+        <configuration>
+          <environments>
+            <environment>
+              <id>felix</id>
+              <framework>felix</framework>
+              <timeout>15000</timeout><!-- = 15s -->
+              <systemProperties>
+                <!-- We don't care if there are any JNAs -->
+                <jna.nosys>true</jna.nosys>
+              </systemProperties>
+            </environment>
+            <environment>
+              <id>equinox</id>
+              <framework>equinox</framework>
+              <timeout>15000</timeout> <!-- = 15s -->
+              <systemProperties>
+                <jna.nosys>true</jna.nosys>
+              </systemProperties>
+            </environment>
+          </environments>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>

http://git-wip-us.apache.org/repos/asf/jena/blob/d70e7dbc/apache-jena-osgi/jena-osgi-test/src/main/java/org/apache/jena/osgi/test/JenaOSGITest.java
----------------------------------------------------------------------
diff --git 
a/apache-jena-osgi/jena-osgi-test/src/main/java/org/apache/jena/osgi/test/JenaOSGITest.java
 
b/apache-jena-osgi/jena-osgi-test/src/main/java/org/apache/jena/osgi/test/JenaOSGITest.java
new file mode 100644
index 0000000..79ffc72
--- /dev/null
+++ 
b/apache-jena-osgi/jena-osgi-test/src/main/java/org/apache/jena/osgi/test/JenaOSGITest.java
@@ -0,0 +1,47 @@
+/*
+ * 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.jena.osgi.test;
+
+import org.junit.Test;
+
+/** 
+ * OSGi service interface for test using osgi-testrunner-junit4 
+ * <p>
+ * Junit annotations like @Test must be made here.
+ * The implementation is in JenaOSGITestImpl, which is registered
+ * with OSGi by JenaOSGIActiviator.
+ * 
+ * @author stain
+ *
+ */
+public interface JenaOSGITest {
+
+       @Test
+       public void testJenaIRI() throws Exception;
+
+       @Test
+       public void testJenaCore() throws Exception;
+       
+       @Test
+       public void testJenaArq() throws Exception;
+       
+       @Test
+       public void testJenaTdb() throws Exception;
+       
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/d70e7dbc/apache-jena-osgi/jena-osgi-test/src/main/java/org/apache/jena/osgi/test/JenaOSGITestActivator.java
----------------------------------------------------------------------
diff --git 
a/apache-jena-osgi/jena-osgi-test/src/main/java/org/apache/jena/osgi/test/JenaOSGITestActivator.java
 
b/apache-jena-osgi/jena-osgi-test/src/main/java/org/apache/jena/osgi/test/JenaOSGITestActivator.java
new file mode 100644
index 0000000..1349114
--- /dev/null
+++ 
b/apache-jena-osgi/jena-osgi-test/src/main/java/org/apache/jena/osgi/test/JenaOSGITestActivator.java
@@ -0,0 +1,42 @@
+/*
+ * 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.jena.osgi.test;
+
+import java.util.Dictionary;
+import java.util.Hashtable;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+public class JenaOSGITestActivator implements BundleActivator {
+
+       @Override
+       public void start(BundleContext context) throws Exception {
+               System.out.println("Starting ");
+               Dictionary<String, String> properties = new Hashtable<>();
+               properties.put("eosgi.testId", "JenaOSGITest");
+               properties.put("eosgi.testEngine", "junit4");           
+               context.registerService(JenaOSGITest.class, new 
JenaOSGITestImpl(), properties);
+       }
+
+       @Override
+       public void stop(BundleContext context) throws Exception {
+       }
+
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/d70e7dbc/apache-jena-osgi/jena-osgi-test/src/main/java/org/apache/jena/osgi/test/JenaOSGITestImpl.java
----------------------------------------------------------------------
diff --git 
a/apache-jena-osgi/jena-osgi-test/src/main/java/org/apache/jena/osgi/test/JenaOSGITestImpl.java
 
b/apache-jena-osgi/jena-osgi-test/src/main/java/org/apache/jena/osgi/test/JenaOSGITestImpl.java
new file mode 100644
index 0000000..3674d53
--- /dev/null
+++ 
b/apache-jena-osgi/jena-osgi-test/src/main/java/org/apache/jena/osgi/test/JenaOSGITestImpl.java
@@ -0,0 +1,170 @@
+/*
+ * 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.jena.osgi.test;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.io.OutputStream;
+import java.io.StringWriter;
+import java.io.Writer;
+import java.nio.file.Files;
+import java.nio.file.Path;
+
+import org.apache.jena.iri.IRI;
+import org.apache.jena.iri.IRIFactory;
+import org.apache.jena.riot.Lang;
+import org.apache.jena.riot.RDFDataMgr;
+import org.junit.Test;
+
+import com.hp.hpl.jena.ontology.Individual;
+import com.hp.hpl.jena.ontology.ObjectProperty;
+import com.hp.hpl.jena.ontology.OntModel;
+import com.hp.hpl.jena.ontology.OntModelSpec;
+import com.hp.hpl.jena.query.Dataset;
+import com.hp.hpl.jena.query.DatasetFactory;
+import com.hp.hpl.jena.query.Query;
+import com.hp.hpl.jena.query.QueryExecution;
+import com.hp.hpl.jena.query.QueryExecutionFactory;
+import com.hp.hpl.jena.query.QueryFactory;
+import com.hp.hpl.jena.query.QuerySolution;
+import com.hp.hpl.jena.query.ReadWrite;
+import com.hp.hpl.jena.query.ResultSet;
+import com.hp.hpl.jena.rdf.model.Model;
+import com.hp.hpl.jena.rdf.model.ModelFactory;
+import com.hp.hpl.jena.rdf.model.Property;
+import com.hp.hpl.jena.rdf.model.Resource;
+import com.hp.hpl.jena.tdb.TDBFactory;
+
+/**
+ * Brief tests of the Jena modules covered by jena-osgi
+ * <p>
+ * Do NOT add tests to this class without also adding a
+ * \@Test-annotated method to the interface JenaOSGITest
+ * -- otherwise it won't be picked up when testing inside OSGi
+ *  
+ */
+public class JenaOSGITestImpl implements JenaOSGITest {
+
+       private static final String EXAMPLE_COM_GRAPH = 
"http://example.com/graph";;
+       private Resource alice;
+       private Property knows;
+       private Resource bob;
+
+       @Test
+       @Override
+       public void testJenaCore() throws Exception {
+               Model model = makeModel();
+
+               // Does Model's Class.forName() still work?
+               model.setWriterClassName("someWriter",
+                               "com.hp.hpl.jena.rdf.model.impl.NTripleWriter");
+               Writer writer = new StringWriter();
+               model.write(writer, "someWriter");
+               // yes, but only as long as that classname is accessible within
+               // jena-osgi bundle
+               assertEquals(
+                               "<http://example.com/alice> 
<http://xmlns.com/foaf/0.1/knows> <http://example.com/bob> .",
+                               writer.toString().trim());
+
+               // Let's also test com.hp.hpl.jena.ontology
+               OntModel ontModel = ModelFactory
+                               
.createOntologyModel(OntModelSpec.OWL_DL_MEM_RULE_INF);
+               ObjectProperty knowsObjProp = 
ontModel.createObjectProperty(knows
+                               .getURI());
+               ObjectProperty hasFriend = ontModel
+                               
.createObjectProperty("http://example.com/has_friend";);
+               hasFriend.addSuperProperty(knowsObjProp);
+
+               Individual aliceIndividual = ontModel.createIndividual(alice);
+               Individual bobIndividiual = ontModel.createIndividual(bob);
+               ontModel.add(aliceIndividual, hasFriend, bobIndividiual);
+               assertTrue(aliceIndividual.hasProperty(knowsObjProp, 
bobIndividiual));
+       }
+
+       private Model makeModel() {
+               Model model = ModelFactory.createDefaultModel();
+               alice = model.createResource("http://example.com/alice";);
+               knows = model.createProperty("http://xmlns.com/foaf/0.1/knows";);
+               bob = model.createResource("http://example.com/bob";);
+               model.add(model.createStatement(alice, knows, bob));
+               return model;
+       }
+
+       @Test
+       @Override
+       public void testJenaArq() throws Exception {
+               Dataset dataset = DatasetFactory.createMem();
+               dataset.addNamedModel(EXAMPLE_COM_GRAPH, makeModel());
+
+               Path path = Files.createTempFile("example", ".jsonld");
+               // System.out.println(path);
+               path.toFile().deleteOnExit();
+
+               try (OutputStream output = Files.newOutputStream(path)) {
+                       RDFDataMgr.write(output, dataset, Lang.JSONLD);
+               }
+               // We test JSON-LD as it involves multiple other bundles
+
+               Dataset dataset2 = 
RDFDataMgr.loadDataset(path.toUri().toString());
+               assertTrue(dataset2.containsNamedModel(EXAMPLE_COM_GRAPH));
+
+               runQuery(dataset2);
+
+       }
+
+       private void runQuery(Dataset dataset) {
+               Query query = QueryFactory.create(""
+                               + "PREFIX foaf: <http://xmlns.com/foaf/0.1/>"
+                               + "SELECT ?bob WHERE { "
+                               + "  GRAPH <http://example.com/graph> { "
+                               + "      ?alice foaf:knows ?bob . " + "  }" + 
"}");
+               try (QueryExecution qexec = QueryExecutionFactory.create(query,
+                               dataset)) {
+                       ResultSet results = qexec.execSelect();
+                       assertTrue(results.hasNext());
+                       QuerySolution r = results.next();
+                       assertEquals(bob, r.get("bob").asResource());
+               }
+       }
+
+       @Test
+       @Override
+       public void testJenaIRI() throws Exception {
+               IRIFactory iriFactory = IRIFactory.jenaImplementation();
+               IRI iri = iriFactory.create("http://example.com/";);
+               assertEquals("http://example.com/";, iri.toASCIIString());
+       }
+
+       @Test
+       @Override
+       public void testJenaTdb() throws Exception {
+               Path tdbDir = Files.createTempDirectory("jena-tdb-test");
+               Dataset dataset = TDBFactory.createDataset(tdbDir.toString());
+               
+               dataset.begin(ReadWrite.WRITE) ;
+               dataset.addNamedModel(EXAMPLE_COM_GRAPH, makeModel());
+               dataset.commit();
+               dataset.end();
+               
+               dataset.begin(ReadWrite.READ);
+               runQuery(dataset);
+               dataset.end();
+       }
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/d70e7dbc/apache-jena-osgi/jena-osgi/pom.xml
----------------------------------------------------------------------
diff --git a/apache-jena-osgi/jena-osgi/pom.xml 
b/apache-jena-osgi/jena-osgi/pom.xml
new file mode 100644
index 0000000..1637732
--- /dev/null
+++ b/apache-jena-osgi/jena-osgi/pom.xml
@@ -0,0 +1,234 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+   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.
+-->
+
+<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/maven-v4_0_0.xsd";>
+
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.jena</groupId>
+  <artifactId>jena-osgi</artifactId>
+  <packaging>bundle</packaging>
+  <name>Apache Jena - OSGi bundle</name>
+  <url>http://jena.apache.org/</url>
+  <version>2.13.0-SNAPSHOT</version>
+  <description>
+      Embedding all Jena modules in a single OSGi bundle.
+  </description>
+  <parent>
+    <groupId>org.apache.jena</groupId>
+    <artifactId>jena-parent</artifactId>
+    <version>12-SNAPSHOT</version>
+    <relativePath>../jena-parent</relativePath>
+  </parent>
+
+
+  <!--
+       Most of the job is done by maven-bundle-plugin (see below).
+       It inspects the embedded/shadowed class files from jena-* to
+       generate the correct Import/Export-Package statements.
+
+
+       SCOPES:
+
+       <scope>provided</scope> are explicitly picked up 
+       by maven-bundle-plugin below to be shadowed within the bundle.  These
+       are the non-OSGi bundles we want to package, e.g. Jena 
+       and any dependencies that are not easily available as
+       bundles..
+
+       Those without <scope> (e.g. compile) below are already
+       OSGi bundles and will become runtime dependencies of
+       the jena-osgi bundle when used through Maven. Their
+       transitive dependencies (e.g. jsonld-java depends on 
+       jackson-core) are not explicitly listed here.
+
+       Note that many OSGi users don't use Maven
+       and would have to find those dependencies
+       themselves. See ../jena-osgi-test/ for
+       example.
+
+
+       To avoid duplicates of non-bundle and bundle dependencies,
+       e.g. httpcore vs. httpcore-osgi, there are several
+       <excludes> below - as not everyone 
+       follows the <scope>provided</scope> pattern.
+
+       Use mvn dependency:tree to inspect what dependencies are
+       exposed in the end, and unzip -t target/*.jar to inspect
+       what becomes bundled in the bundle.
+
+       Explore META-INF/MANFEST.MF in the jar to see what
+       Import and Export the maven-bundle-plugin has figured out,
+       usually the details figured out through code 
+       introspections are correct - if verbose.
+
+       -->
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.jena</groupId>
+      <artifactId>jena-arq</artifactId>
+      <version>2.13.0-SNAPSHOT</version>
+      <scope>provided</scope>
+      <exclusions>
+       <!-- These are all embedded within httpclient-osgi -->
+       <exclusion>
+         <groupId>org.apache.httpcomponents</groupId>
+         <artifactId>httpclient</artifactId>
+       </exclusion>
+       <exclusion>
+         <groupId>commons-codec</groupId>
+         <artifactId>commons-codec</artifactId>
+       </exclusion>
+       <exclusion>
+         <groupId>org.apache.httpcomponents</groupId>
+         <artifactId>httpmime</artifactId>
+       </exclusion>
+       <exclusion>
+         <groupId>org.apache.httpcomponents</groupId>
+         <artifactId>httpclient-cache</artifactId>
+       </exclusion>
+       <exclusion>
+         <groupId>org.apache.httpcomponents</groupId>
+         <artifactId>fluent-hc</artifactId>
+       </exclusion>
+      </exclusions>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.jena</groupId>
+      <artifactId>jena-core</artifactId>
+      <version>2.13.0-SNAPSHOT</version>
+      <scope>provided</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.jena</groupId>
+      <artifactId>jena-tdb</artifactId>
+      <version>1.1.2-SNAPSHOT</version>
+      <scope>provided</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.jena</groupId>
+      <artifactId>jena-iri</artifactId>
+      <version>1.1.2-SNAPSHOT</version>
+      <scope>provided</scope>
+    </dependency>
+
+    <!-- OSGi versions of Jena dependencies -->
+    <dependency>
+      <groupId>org.apache.httpcomponents</groupId>
+      <artifactId>httpclient-osgi</artifactId>
+      <version>${ver.httpclient}</version>
+      <exclusions>
+       <!-- These are all embedded within httpclient-osgi -->
+       <exclusion>
+         <groupId>org.apache.httpcomponents</groupId>
+         <artifactId>httpclient</artifactId>
+       </exclusion>
+       <exclusion>
+         <groupId>commons-codec</groupId>
+         <artifactId>commons-codec</artifactId>
+       </exclusion>
+       <exclusion>
+         <groupId>org.apache.httpcomponents</groupId>
+         <artifactId>httpmime</artifactId>
+       </exclusion>
+       <exclusion>
+         <groupId>org.apache.httpcomponents</groupId>
+         <artifactId>httpclient-cache</artifactId>
+       </exclusion>
+       <exclusion>
+         <groupId>org.apache.httpcomponents</groupId>
+         <artifactId>fluent-hc</artifactId>
+       </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.httpcomponents</groupId>
+      <artifactId>httpcore-osgi</artifactId>
+      <version>${ver.httpcore}</version> 
+      <exclusions>
+        <exclusion>
+          <groupId>org.apache.httpcomponents</groupId>
+          <artifactId>httpcore</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.apache.httpcomponents</groupId>
+          <artifactId>httpcore-nio</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+
+    <dependency>
+      <groupId>com.github.jsonld-java</groupId>
+      <artifactId>jsonld-java</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.commons</groupId>
+      <artifactId>commons-csv</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.thrift</groupId>
+      <artifactId>libthrift</artifactId>
+      <exclusions>
+        <!-- Use httpclient-osgi instead -->
+        <exclusion>
+          <groupId>org.apache.httpcomponents</groupId>
+          <artifactId>httpclient</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.apache.httpcomponents</groupId>
+          <artifactId>httpcore</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>jcl-over-slf4j</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-api</artifactId>
+      <version>${ver.slf4j}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.commons</groupId>
+      <artifactId>commons-lang3</artifactId>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.felix</groupId>
+        <artifactId>maven-bundle-plugin</artifactId>
+        <configuration>
+          <instructions>
+            
<Export-Package>com.hp.hpl.jena.*,org.apache.jena.*</Export-Package>
+            
<Embed-Dependency>artifactId=jena*;inline=true,artifactId=xercesImpl;inline=true,artifactId=xml-apis;inline=true</Embed-Dependency>
+            <Embed-Transitive>true</Embed-Transitive>
+            
<Import-Package>!sun.io,!org.apache.avalon.framework.logger,!com.ibm.uvm.tools,!com.sun.jdmk.comm,!org.apache.log,!org.apache.xml.*,!org.apache.xerces.*,*</Import-Package>
+          </instructions>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>

http://git-wip-us.apache.org/repos/asf/jena/blob/d70e7dbc/apache-jena-osgi/pom.xml
----------------------------------------------------------------------
diff --git a/apache-jena-osgi/pom.xml b/apache-jena-osgi/pom.xml
new file mode 100644
index 0000000..6250917
--- /dev/null
+++ b/apache-jena-osgi/pom.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+   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.
+-->
+
+<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/maven-v4_0_0.xsd";>
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.jena</groupId>
+    <artifactId>jena-parent</artifactId>
+    <version>12-SNAPSHOT</version>
+    <relativePath>../jena-parent</relativePath>
+  </parent> 
+
+  <name>Apache Jena - OSGi</name>
+  <artifactId>apache-jena-osgi</artifactId>
+  <version>2.13.0-SNAPSHOT</version>
+
+  <description>Apache Jena OSGi distribution and test</description>
+  <packaging>pom</packaging>
+
+  <repositories>
+    <repository>
+      <id>apache.snapshots</id>
+      <name>Apache Snapshot Repository</name>
+      <url>http://repository.apache.org/snapshots</url>
+      <releases>
+        <enabled>false</enabled>
+      </releases>
+    </repository>
+  </repositories>
+
+  <modules>
+    <module>jena-osgi</module>
+    <module>jena-osgi-test</module>
+  </modules>
+  
+</project>

http://git-wip-us.apache.org/repos/asf/jena/blob/d70e7dbc/jena-osgi-test/pom.xml
----------------------------------------------------------------------
diff --git a/jena-osgi-test/pom.xml b/jena-osgi-test/pom.xml
deleted file mode 100644
index d3d5e80..0000000
--- a/jena-osgi-test/pom.xml
+++ /dev/null
@@ -1,121 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-   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.
--->
-
-<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";>
-  <modelVersion>4.0.0</modelVersion>
-  <parent>
-    <groupId>org.apache.jena</groupId>
-    <artifactId>jena-parent</artifactId>
-    <version>12-SNAPSHOT</version>
-    <relativePath>../jena-parent</relativePath>
-  </parent>
-
-  <artifactId>jena-osgi-test</artifactId>
-  <version>2.13.0-SNAPSHOT</version>
-  <name>Apache Jena - OSGi bundle tests</name>
-  <description>Tests for jena-osgi as a bundle</description>
-  <packaging>bundle</packaging>
-
-  <dependencies>
-
-    <dependency>
-      <groupId>org.apache.jena</groupId>
-      <artifactId>jena-osgi</artifactId>
-      <version>${project.version}</version>
-      <type>bundle</type>
-    </dependency>
-
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <scope>compile</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.everit.osgi.dev</groupId>
-      <artifactId>org.everit.osgi.dev.testrunner.junit4</artifactId>
-      <version>3.0.4</version>
-      <scope>test</scope>
-    </dependency>
-    <!--  NOTE: LGPL -->                        
-
-    <dependency>
-      <groupId>org.osgi</groupId>
-      <artifactId>org.osgi.core</artifactId>
-      <version>4.3.1</version>
-      <scope>provided</scope>
-    </dependency>
-  </dependencies>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.felix</groupId>
-        <artifactId>maven-bundle-plugin</artifactId>
-        <extensions>true</extensions>
-        <configuration>
-          <instructions>
-            
<Bundle-Activator>org.apache.jena.osgi.test.JenaOSGITestActivator</Bundle-Activator>
-            <!-- <Import-Package>com.hp.hpl.jena</Import-Package> -->
-            <!-- 
<Embed-Dependency>artifactId=jena-core;inline=true</Embed-Dependency> -->
-            
-            <!-- Update according to expected number of @Test methods -->      
                                              
-            <EOSGi-TestNum>4</EOSGi-TestNum>
-          </instructions>
-        </configuration>
-      </plugin>
-      <plugin>
-        <groupId>org.everit.osgi.dev</groupId>
-        <artifactId>eosgi-maven-plugin</artifactId>
-        <version>3.1.0</version>
-        <executions>
-          <execution>
-            <id>integration-test</id>
-            <phase>integration-test</phase>
-            <goals>
-              <goal>integration-test</goal>
-            </goals>
-          </execution>
-        </executions>
-        <configuration>
-          <environments>
-            <environment>
-              <id>felix</id>
-              <framework>felix</framework>
-              <timeout>15000</timeout><!-- = 15s -->
-              <systemProperties>
-                <!-- We don't care if there are any JNAs -->
-                <jna.nosys>true</jna.nosys>
-              </systemProperties>
-            </environment>
-            <environment>
-              <id>equinox</id>
-              <framework>equinox</framework>
-              <timeout>15000</timeout> <!-- = 15s -->
-              <systemProperties>
-                <jna.nosys>true</jna.nosys>
-              </systemProperties>
-            </environment>
-          </environments>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-
-</project>

http://git-wip-us.apache.org/repos/asf/jena/blob/d70e7dbc/jena-osgi-test/src/main/java/org/apache/jena/osgi/test/JenaOSGITest.java
----------------------------------------------------------------------
diff --git 
a/jena-osgi-test/src/main/java/org/apache/jena/osgi/test/JenaOSGITest.java 
b/jena-osgi-test/src/main/java/org/apache/jena/osgi/test/JenaOSGITest.java
deleted file mode 100644
index 79ffc72..0000000
--- a/jena-osgi-test/src/main/java/org/apache/jena/osgi/test/JenaOSGITest.java
+++ /dev/null
@@ -1,47 +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.jena.osgi.test;
-
-import org.junit.Test;
-
-/** 
- * OSGi service interface for test using osgi-testrunner-junit4 
- * <p>
- * Junit annotations like @Test must be made here.
- * The implementation is in JenaOSGITestImpl, which is registered
- * with OSGi by JenaOSGIActiviator.
- * 
- * @author stain
- *
- */
-public interface JenaOSGITest {
-
-       @Test
-       public void testJenaIRI() throws Exception;
-
-       @Test
-       public void testJenaCore() throws Exception;
-       
-       @Test
-       public void testJenaArq() throws Exception;
-       
-       @Test
-       public void testJenaTdb() throws Exception;
-       
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/d70e7dbc/jena-osgi-test/src/main/java/org/apache/jena/osgi/test/JenaOSGITestActivator.java
----------------------------------------------------------------------
diff --git 
a/jena-osgi-test/src/main/java/org/apache/jena/osgi/test/JenaOSGITestActivator.java
 
b/jena-osgi-test/src/main/java/org/apache/jena/osgi/test/JenaOSGITestActivator.java
deleted file mode 100644
index 1349114..0000000
--- 
a/jena-osgi-test/src/main/java/org/apache/jena/osgi/test/JenaOSGITestActivator.java
+++ /dev/null
@@ -1,42 +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.jena.osgi.test;
-
-import java.util.Dictionary;
-import java.util.Hashtable;
-
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-public class JenaOSGITestActivator implements BundleActivator {
-
-       @Override
-       public void start(BundleContext context) throws Exception {
-               System.out.println("Starting ");
-               Dictionary<String, String> properties = new Hashtable<>();
-               properties.put("eosgi.testId", "JenaOSGITest");
-               properties.put("eosgi.testEngine", "junit4");           
-               context.registerService(JenaOSGITest.class, new 
JenaOSGITestImpl(), properties);
-       }
-
-       @Override
-       public void stop(BundleContext context) throws Exception {
-       }
-
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/d70e7dbc/jena-osgi-test/src/main/java/org/apache/jena/osgi/test/JenaOSGITestImpl.java
----------------------------------------------------------------------
diff --git 
a/jena-osgi-test/src/main/java/org/apache/jena/osgi/test/JenaOSGITestImpl.java 
b/jena-osgi-test/src/main/java/org/apache/jena/osgi/test/JenaOSGITestImpl.java
deleted file mode 100644
index 3674d53..0000000
--- 
a/jena-osgi-test/src/main/java/org/apache/jena/osgi/test/JenaOSGITestImpl.java
+++ /dev/null
@@ -1,170 +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.jena.osgi.test;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.io.OutputStream;
-import java.io.StringWriter;
-import java.io.Writer;
-import java.nio.file.Files;
-import java.nio.file.Path;
-
-import org.apache.jena.iri.IRI;
-import org.apache.jena.iri.IRIFactory;
-import org.apache.jena.riot.Lang;
-import org.apache.jena.riot.RDFDataMgr;
-import org.junit.Test;
-
-import com.hp.hpl.jena.ontology.Individual;
-import com.hp.hpl.jena.ontology.ObjectProperty;
-import com.hp.hpl.jena.ontology.OntModel;
-import com.hp.hpl.jena.ontology.OntModelSpec;
-import com.hp.hpl.jena.query.Dataset;
-import com.hp.hpl.jena.query.DatasetFactory;
-import com.hp.hpl.jena.query.Query;
-import com.hp.hpl.jena.query.QueryExecution;
-import com.hp.hpl.jena.query.QueryExecutionFactory;
-import com.hp.hpl.jena.query.QueryFactory;
-import com.hp.hpl.jena.query.QuerySolution;
-import com.hp.hpl.jena.query.ReadWrite;
-import com.hp.hpl.jena.query.ResultSet;
-import com.hp.hpl.jena.rdf.model.Model;
-import com.hp.hpl.jena.rdf.model.ModelFactory;
-import com.hp.hpl.jena.rdf.model.Property;
-import com.hp.hpl.jena.rdf.model.Resource;
-import com.hp.hpl.jena.tdb.TDBFactory;
-
-/**
- * Brief tests of the Jena modules covered by jena-osgi
- * <p>
- * Do NOT add tests to this class without also adding a
- * \@Test-annotated method to the interface JenaOSGITest
- * -- otherwise it won't be picked up when testing inside OSGi
- *  
- */
-public class JenaOSGITestImpl implements JenaOSGITest {
-
-       private static final String EXAMPLE_COM_GRAPH = 
"http://example.com/graph";;
-       private Resource alice;
-       private Property knows;
-       private Resource bob;
-
-       @Test
-       @Override
-       public void testJenaCore() throws Exception {
-               Model model = makeModel();
-
-               // Does Model's Class.forName() still work?
-               model.setWriterClassName("someWriter",
-                               "com.hp.hpl.jena.rdf.model.impl.NTripleWriter");
-               Writer writer = new StringWriter();
-               model.write(writer, "someWriter");
-               // yes, but only as long as that classname is accessible within
-               // jena-osgi bundle
-               assertEquals(
-                               "<http://example.com/alice> 
<http://xmlns.com/foaf/0.1/knows> <http://example.com/bob> .",
-                               writer.toString().trim());
-
-               // Let's also test com.hp.hpl.jena.ontology
-               OntModel ontModel = ModelFactory
-                               
.createOntologyModel(OntModelSpec.OWL_DL_MEM_RULE_INF);
-               ObjectProperty knowsObjProp = 
ontModel.createObjectProperty(knows
-                               .getURI());
-               ObjectProperty hasFriend = ontModel
-                               
.createObjectProperty("http://example.com/has_friend";);
-               hasFriend.addSuperProperty(knowsObjProp);
-
-               Individual aliceIndividual = ontModel.createIndividual(alice);
-               Individual bobIndividiual = ontModel.createIndividual(bob);
-               ontModel.add(aliceIndividual, hasFriend, bobIndividiual);
-               assertTrue(aliceIndividual.hasProperty(knowsObjProp, 
bobIndividiual));
-       }
-
-       private Model makeModel() {
-               Model model = ModelFactory.createDefaultModel();
-               alice = model.createResource("http://example.com/alice";);
-               knows = model.createProperty("http://xmlns.com/foaf/0.1/knows";);
-               bob = model.createResource("http://example.com/bob";);
-               model.add(model.createStatement(alice, knows, bob));
-               return model;
-       }
-
-       @Test
-       @Override
-       public void testJenaArq() throws Exception {
-               Dataset dataset = DatasetFactory.createMem();
-               dataset.addNamedModel(EXAMPLE_COM_GRAPH, makeModel());
-
-               Path path = Files.createTempFile("example", ".jsonld");
-               // System.out.println(path);
-               path.toFile().deleteOnExit();
-
-               try (OutputStream output = Files.newOutputStream(path)) {
-                       RDFDataMgr.write(output, dataset, Lang.JSONLD);
-               }
-               // We test JSON-LD as it involves multiple other bundles
-
-               Dataset dataset2 = 
RDFDataMgr.loadDataset(path.toUri().toString());
-               assertTrue(dataset2.containsNamedModel(EXAMPLE_COM_GRAPH));
-
-               runQuery(dataset2);
-
-       }
-
-       private void runQuery(Dataset dataset) {
-               Query query = QueryFactory.create(""
-                               + "PREFIX foaf: <http://xmlns.com/foaf/0.1/>"
-                               + "SELECT ?bob WHERE { "
-                               + "  GRAPH <http://example.com/graph> { "
-                               + "      ?alice foaf:knows ?bob . " + "  }" + 
"}");
-               try (QueryExecution qexec = QueryExecutionFactory.create(query,
-                               dataset)) {
-                       ResultSet results = qexec.execSelect();
-                       assertTrue(results.hasNext());
-                       QuerySolution r = results.next();
-                       assertEquals(bob, r.get("bob").asResource());
-               }
-       }
-
-       @Test
-       @Override
-       public void testJenaIRI() throws Exception {
-               IRIFactory iriFactory = IRIFactory.jenaImplementation();
-               IRI iri = iriFactory.create("http://example.com/";);
-               assertEquals("http://example.com/";, iri.toASCIIString());
-       }
-
-       @Test
-       @Override
-       public void testJenaTdb() throws Exception {
-               Path tdbDir = Files.createTempDirectory("jena-tdb-test");
-               Dataset dataset = TDBFactory.createDataset(tdbDir.toString());
-               
-               dataset.begin(ReadWrite.WRITE) ;
-               dataset.addNamedModel(EXAMPLE_COM_GRAPH, makeModel());
-               dataset.commit();
-               dataset.end();
-               
-               dataset.begin(ReadWrite.READ);
-               runQuery(dataset);
-               dataset.end();
-       }
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/d70e7dbc/jena-osgi/pom.xml
----------------------------------------------------------------------
diff --git a/jena-osgi/pom.xml b/jena-osgi/pom.xml
deleted file mode 100644
index 1637732..0000000
--- a/jena-osgi/pom.xml
+++ /dev/null
@@ -1,234 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-   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.
--->
-
-<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/maven-v4_0_0.xsd";>
-
-  <modelVersion>4.0.0</modelVersion>
-  <groupId>org.apache.jena</groupId>
-  <artifactId>jena-osgi</artifactId>
-  <packaging>bundle</packaging>
-  <name>Apache Jena - OSGi bundle</name>
-  <url>http://jena.apache.org/</url>
-  <version>2.13.0-SNAPSHOT</version>
-  <description>
-      Embedding all Jena modules in a single OSGi bundle.
-  </description>
-  <parent>
-    <groupId>org.apache.jena</groupId>
-    <artifactId>jena-parent</artifactId>
-    <version>12-SNAPSHOT</version>
-    <relativePath>../jena-parent</relativePath>
-  </parent>
-
-
-  <!--
-       Most of the job is done by maven-bundle-plugin (see below).
-       It inspects the embedded/shadowed class files from jena-* to
-       generate the correct Import/Export-Package statements.
-
-
-       SCOPES:
-
-       <scope>provided</scope> are explicitly picked up 
-       by maven-bundle-plugin below to be shadowed within the bundle.  These
-       are the non-OSGi bundles we want to package, e.g. Jena 
-       and any dependencies that are not easily available as
-       bundles..
-
-       Those without <scope> (e.g. compile) below are already
-       OSGi bundles and will become runtime dependencies of
-       the jena-osgi bundle when used through Maven. Their
-       transitive dependencies (e.g. jsonld-java depends on 
-       jackson-core) are not explicitly listed here.
-
-       Note that many OSGi users don't use Maven
-       and would have to find those dependencies
-       themselves. See ../jena-osgi-test/ for
-       example.
-
-
-       To avoid duplicates of non-bundle and bundle dependencies,
-       e.g. httpcore vs. httpcore-osgi, there are several
-       <excludes> below - as not everyone 
-       follows the <scope>provided</scope> pattern.
-
-       Use mvn dependency:tree to inspect what dependencies are
-       exposed in the end, and unzip -t target/*.jar to inspect
-       what becomes bundled in the bundle.
-
-       Explore META-INF/MANFEST.MF in the jar to see what
-       Import and Export the maven-bundle-plugin has figured out,
-       usually the details figured out through code 
-       introspections are correct - if verbose.
-
-       -->
-  <dependencies>
-    <dependency>
-      <groupId>org.apache.jena</groupId>
-      <artifactId>jena-arq</artifactId>
-      <version>2.13.0-SNAPSHOT</version>
-      <scope>provided</scope>
-      <exclusions>
-       <!-- These are all embedded within httpclient-osgi -->
-       <exclusion>
-         <groupId>org.apache.httpcomponents</groupId>
-         <artifactId>httpclient</artifactId>
-       </exclusion>
-       <exclusion>
-         <groupId>commons-codec</groupId>
-         <artifactId>commons-codec</artifactId>
-       </exclusion>
-       <exclusion>
-         <groupId>org.apache.httpcomponents</groupId>
-         <artifactId>httpmime</artifactId>
-       </exclusion>
-       <exclusion>
-         <groupId>org.apache.httpcomponents</groupId>
-         <artifactId>httpclient-cache</artifactId>
-       </exclusion>
-       <exclusion>
-         <groupId>org.apache.httpcomponents</groupId>
-         <artifactId>fluent-hc</artifactId>
-       </exclusion>
-      </exclusions>
-    </dependency>
-
-    <dependency>
-      <groupId>org.apache.jena</groupId>
-      <artifactId>jena-core</artifactId>
-      <version>2.13.0-SNAPSHOT</version>
-      <scope>provided</scope>
-    </dependency>
-
-    <dependency>
-      <groupId>org.apache.jena</groupId>
-      <artifactId>jena-tdb</artifactId>
-      <version>1.1.2-SNAPSHOT</version>
-      <scope>provided</scope>
-    </dependency>
-
-    <dependency>
-      <groupId>org.apache.jena</groupId>
-      <artifactId>jena-iri</artifactId>
-      <version>1.1.2-SNAPSHOT</version>
-      <scope>provided</scope>
-    </dependency>
-
-    <!-- OSGi versions of Jena dependencies -->
-    <dependency>
-      <groupId>org.apache.httpcomponents</groupId>
-      <artifactId>httpclient-osgi</artifactId>
-      <version>${ver.httpclient}</version>
-      <exclusions>
-       <!-- These are all embedded within httpclient-osgi -->
-       <exclusion>
-         <groupId>org.apache.httpcomponents</groupId>
-         <artifactId>httpclient</artifactId>
-       </exclusion>
-       <exclusion>
-         <groupId>commons-codec</groupId>
-         <artifactId>commons-codec</artifactId>
-       </exclusion>
-       <exclusion>
-         <groupId>org.apache.httpcomponents</groupId>
-         <artifactId>httpmime</artifactId>
-       </exclusion>
-       <exclusion>
-         <groupId>org.apache.httpcomponents</groupId>
-         <artifactId>httpclient-cache</artifactId>
-       </exclusion>
-       <exclusion>
-         <groupId>org.apache.httpcomponents</groupId>
-         <artifactId>fluent-hc</artifactId>
-       </exclusion>
-      </exclusions>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.httpcomponents</groupId>
-      <artifactId>httpcore-osgi</artifactId>
-      <version>${ver.httpcore}</version> 
-      <exclusions>
-        <exclusion>
-          <groupId>org.apache.httpcomponents</groupId>
-          <artifactId>httpcore</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>org.apache.httpcomponents</groupId>
-          <artifactId>httpcore-nio</artifactId>
-        </exclusion>
-      </exclusions>
-    </dependency>
-
-    <dependency>
-      <groupId>com.github.jsonld-java</groupId>
-      <artifactId>jsonld-java</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.commons</groupId>
-      <artifactId>commons-csv</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.thrift</groupId>
-      <artifactId>libthrift</artifactId>
-      <exclusions>
-        <!-- Use httpclient-osgi instead -->
-        <exclusion>
-          <groupId>org.apache.httpcomponents</groupId>
-          <artifactId>httpclient</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>org.apache.httpcomponents</groupId>
-          <artifactId>httpcore</artifactId>
-        </exclusion>
-      </exclusions>
-    </dependency>
-    <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>jcl-over-slf4j</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-api</artifactId>
-      <version>${ver.slf4j}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.commons</groupId>
-      <artifactId>commons-lang3</artifactId>
-    </dependency>
-  </dependencies>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.felix</groupId>
-        <artifactId>maven-bundle-plugin</artifactId>
-        <configuration>
-          <instructions>
-            
<Export-Package>com.hp.hpl.jena.*,org.apache.jena.*</Export-Package>
-            
<Embed-Dependency>artifactId=jena*;inline=true,artifactId=xercesImpl;inline=true,artifactId=xml-apis;inline=true</Embed-Dependency>
-            <Embed-Transitive>true</Embed-Transitive>
-            
<Import-Package>!sun.io,!org.apache.avalon.framework.logger,!com.ibm.uvm.tools,!com.sun.jdmk.comm,!org.apache.log,!org.apache.xml.*,!org.apache.xerces.*,*</Import-Package>
-          </instructions>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-
-</project>

http://git-wip-us.apache.org/repos/asf/jena/blob/d70e7dbc/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 1da7a46..7f0e1fe 100644
--- a/pom.xml
+++ b/pom.xml
@@ -120,10 +120,8 @@
 
         <module>apache-jena-libs</module>
         <module>apache-jena</module>
+        <module>apache-jena-osgi</module>
         <module>jena-extras</module>
-        <module>jena-osgi</module>
-       <!-- Breaks the build -->
-       <!--<module>jena-osgi-test</module>-->
       </modules>
     </profile>
   </profiles>

Reply via email to