JENA-879: using linkBundle and newer dependencies

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

Branch: refs/heads/master
Commit: f0d31e5d1cdc3cc939dbbacf0826a4cf347619ad
Parents: 9f6e947
Author: Stian Soiland-Reyes <[email protected]>
Authored: Tue Feb 3 01:22:08 2015 +0000
Committer: Stian Soiland-Reyes <[email protected]>
Committed: Mon Feb 9 10:03:56 2015 +0000

----------------------------------------------------------------------
 apache-jena-osgi/jena-osgi-test/pom.xml         | 26 ++++++++++++--
 .../org/apache/jena/osgi/test/JenaOSGITest.java | 37 ++++++++++----------
 2 files changed, 42 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/f0d31e5d/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
index 127fc8d..e2dd66a 100644
--- a/apache-jena-osgi/jena-osgi-test/pom.xml
+++ b/apache-jena-osgi/jena-osgi-test/pom.xml
@@ -28,8 +28,9 @@
 
        <properties>
                <!-- 
https://ops4j1.jira.com/wiki/display/PAXEXAM4/OSGi+Containers -->
-               <exam.version>3.4.0</exam.version>
+               <exam.version>4.4.0</exam.version>
                <url.version>1.6.0</url.version>
+               <felix.version>4.6.0</felix.version>
        </properties>
 
        <dependencies>
@@ -38,6 +39,13 @@
                        <artifactId>jena-osgi</artifactId>
                        <version>${project.version}</version>
                        <type>bundle</type>
+                       <scope>test</scope>
+               </dependency>
+
+               <dependency>
+                       <groupId>org.osgi</groupId>
+                       <artifactId>org.osgi.core</artifactId>
+                       <version>5.0.0</version>
                </dependency>
 
                <dependency>
@@ -79,7 +87,7 @@
                <dependency>
                        <groupId>org.apache.felix</groupId>
                        <artifactId>org.apache.felix.framework</artifactId>
-                       <version>3.2.2</version>
+                       <version>${felix.version}</version>
                        <scope>test</scope>
                </dependency>
 
@@ -104,6 +112,20 @@
                                        </instructions>
                                </configuration>
                        </plugin>
+                       <plugin>
+                               <groupId>org.ops4j.pax.exam</groupId>
+                               <artifactId>exam-maven-plugin</artifactId>
+                               <version>${exam.version}</version>
+                               <executions>
+                                       <execution>
+                                               <id>generate-config</id>
+                                               <goals>
+                                                       
<goal>generate-link-files</goal>
+                                               </goals>
+                                               
<phase>generate-test-resources</phase>
+                                       </execution>
+                               </executions>
+                       </plugin>
                </plugins>
        </build>
 

http://git-wip-us.apache.org/repos/asf/jena/blob/f0d31e5d/apache-jena-osgi/jena-osgi-test/src/test/java/org/apache/jena/osgi/test/JenaOSGITest.java
----------------------------------------------------------------------
diff --git 
a/apache-jena-osgi/jena-osgi-test/src/test/java/org/apache/jena/osgi/test/JenaOSGITest.java
 
b/apache-jena-osgi/jena-osgi-test/src/test/java/org/apache/jena/osgi/test/JenaOSGITest.java
index e20ecc5..4ce41b0 100644
--- 
a/apache-jena-osgi/jena-osgi-test/src/test/java/org/apache/jena/osgi/test/JenaOSGITest.java
+++ 
b/apache-jena-osgi/jena-osgi-test/src/test/java/org/apache/jena/osgi/test/JenaOSGITest.java
@@ -20,8 +20,8 @@ package org.apache.jena.osgi.test;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
-import static org.ops4j.pax.exam.CoreOptions.bootDelegationPackages;
 import static org.ops4j.pax.exam.CoreOptions.junitBundles;
+import static org.ops4j.pax.exam.CoreOptions.linkBundle;
 import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
 import static org.ops4j.pax.exam.CoreOptions.options;
 
@@ -40,6 +40,7 @@ import org.apache.jena.riot.RDFDataMgr;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.ops4j.pax.exam.Configuration;
+import org.ops4j.pax.exam.CoreOptions;
 import org.ops4j.pax.exam.Option;
 import org.ops4j.pax.exam.junit.PaxExam;
 import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
@@ -70,7 +71,6 @@ import com.hp.hpl.jena.tdb.TDBFactory;
  * 
  */
 @RunWith(PaxExam.class)
-// Restart OSGi framework PerClass or PerMethod ?
 @ExamReactorStrategy(PerClass.class)
 public class JenaOSGITest {
 
@@ -80,27 +80,26 @@ public class JenaOSGITest {
        @Configuration
        public Option[] config() {
                return options(
-                               bootDelegationPackages("sun.*", 
-                                               "com.sun.*",
-                                               "java.*",
-                                               "javax.*",
-                                               "javax.net.ssl"),
-                                               
+//                             bootDelegationPackages("sun.*", 
+//                                             "com.sun.*",
+//                                             "java.*",
+//                                             "javax.*",
+//                                             "javax.net.ssl"),
                                                // In PAX we have to list 
transitive dependencies
                                                // manually. See 
../jena-osgi/pom.xml 
                                                // for dependencies that are 
NOT in <scope>provided</scope>
                                                // (luckily the version numbers 
are picked up!)
-                               junitBundles(),                                 
-                               mavenBundle("org.apache.jena", "jena-osgi"),
-                               mavenBundle("org.apache.httpcomponents", 
"httpclient-osgi"),
-                               mavenBundle("org.apache.httpcomponents", 
"httpcore-osgi"),
-                               mavenBundle("com.github.jsonld-java", 
"jsonld-java"),
-                               mavenBundle("org.apache.commons", 
"commons-csv"),
-                               mavenBundle("org.apache.thrift", "libthrift"),
-                               mavenBundle("org.slf4j", "jcl-over-slf4j"),
-                               mavenBundle("org.slf4j", "slf4j-log4j12"),
-                               mavenBundle("org.slf4j", "slf4j-api"),
-                               mavenBundle("org.apache.commons", 
"commons-lang3")      
+                               mavenBundle("org.apache.jena", "jena-osgi", 
"2.13.0-SNAPSHOT"),
+                               
linkBundle("org.apache.httpcomponents.httpclient"),
+                               
linkBundle("org.apache.httpcomponents.httpcore"),
+                               linkBundle("com.github.jsonld-java"),
+                               linkBundle("org.apache.commons.csv"),
+                               linkBundle("org.apache.thrift"),
+                               linkBundle("jcl.over.slf4j"),
+                               linkBundle("slf4j.api"),
+                               linkBundle("slf4j.log4j12"),
+                               linkBundle("org.apache.commons.lang3"),
+                               junitBundles()
                                );
        }
 

Reply via email to