jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject [23/35] jena git commit: jena-osgi-test (incomplete)
Date Sun, 01 Feb 2015 13:12:32 GMT
jena-osgi-test (incomplete)


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

Branch: refs/heads/master
Commit: b7e65a6e65af8fc844403a72410a0c1e9ec1ca78
Parents: b289435
Author: Stian Soiland-Reyes <soiland-reyes@cs.manchester.ac.uk>
Authored: Fri Jan 9 03:40:05 2015 +0000
Committer: Stian Soiland-Reyes <stain@apache.org>
Committed: Mon Jan 12 01:19:17 2015 +0000

----------------------------------------------------------------------
 jena-osgi-test/pom.xml                          | 133 +++++++++++++++++++
 .../org/apache/jena/osgi/test/JenaCoreTest.java |  32 +++++
 .../apache/jena/osgi/test/JenaCoreTestImpl.java |  28 ++++
 pom.xml                                         |   3 +
 4 files changed, 196 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/b7e65a6e/jena-osgi-test/pom.xml
----------------------------------------------------------------------
diff --git a/jena-osgi-test/pom.xml b/jena-osgi-test/pom.xml
new file mode 100644
index 0000000..938f364
--- /dev/null
+++ b/jena-osgi-test/pom.xml
@@ -0,0 +1,133 @@
+<?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.12.2-SNAPSHOT</version>
+	<name>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>org.apache.jena</groupId>
+			<artifactId>jena-core</artifactId>
+			<version>${project.version}</version>
+			<type>test-jar</type>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.jena</groupId>
+			<artifactId>jena-arq</artifactId>
+			<version>${project.version}</version>
+			<type>test-jar</type>
+		</dependency>
+	 -->
+
+		<dependency>
+			<groupId>junit</groupId>
+			<artifactId>junit</artifactId>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.felix</groupId>
+			<artifactId>org.apache.felix.scr.annotations</artifactId>
+			<version>1.9.8</version>
+			<type>bundle</type>
+			<scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.everit.osgi.dev</groupId>
+			<artifactId>org.everit.osgi.dev.testrunner.junit4</artifactId>
+			<version>3.0.3</version>
+			<type>bundle</type>
+		</dependency>
+
+	</dependencies>
+
+	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.apache.felix</groupId>
+				<artifactId>maven-bundle-plugin</artifactId>
+				<extensions>true</extensions>
+				<configuration>
+					<instructions>
+						<!-- 
+						<Embed-Dependency>artifactId=jena-core;inline=true</Embed-Dependency>
+						<Import-Package>com.hp.hpl.jena,org.apache.jena</Import-Package>
+						 -->
+						<!--  Update according to expected number of *Test classes -->
+						<EOSGi-TestNum>1</EOSGi-TestNum>
+					</instructions>
+				</configuration>
+			</plugin>
+			<plugin>
+				<groupId>org.apache.felix</groupId>
+				<artifactId>maven-scr-plugin</artifactId>
+				<version>1.20.0</version>
+				<executions>
+					<execution>
+						<id>generate-scr-scrdescriptor</id>
+						<goals>
+							<goal>scr</goal>
+						</goals>
+					</execution>
+				</executions>
+
+			</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>equinox</id>
+							<framework>equinox</framework>
+						</environment>
+						<environment>
+							<id>felix</id>
+							<framework>felix</framework>
+						</environment>
+					</environments>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/jena/blob/b7e65a6e/jena-osgi-test/src/main/java/org/apache/jena/osgi/test/JenaCoreTest.java
----------------------------------------------------------------------
diff --git a/jena-osgi-test/src/main/java/org/apache/jena/osgi/test/JenaCoreTest.java b/jena-osgi-test/src/main/java/org/apache/jena/osgi/test/JenaCoreTest.java
new file mode 100644
index 0000000..f687f28
--- /dev/null
+++ b/jena-osgi-test/src/main/java/org/apache/jena/osgi/test/JenaCoreTest.java
@@ -0,0 +1,32 @@
+/**
+ * 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.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Properties;
+import org.apache.felix.scr.annotations.Property;
+import org.apache.felix.scr.annotations.Service;
+
+@Component
+@Properties({
+        @Property(name = "eosgi.testEngine", value = "junit4"),
+        @Property(name = "eosgi.testId", value = "JenaCoreTest")
+})
+public interface JenaCoreTest {
+
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/b7e65a6e/jena-osgi-test/src/main/java/org/apache/jena/osgi/test/JenaCoreTestImpl.java
----------------------------------------------------------------------
diff --git a/jena-osgi-test/src/main/java/org/apache/jena/osgi/test/JenaCoreTestImpl.java
b/jena-osgi-test/src/main/java/org/apache/jena/osgi/test/JenaCoreTestImpl.java
new file mode 100644
index 0000000..4a1c153
--- /dev/null
+++ b/jena-osgi-test/src/main/java/org/apache/jena/osgi/test/JenaCoreTestImpl.java
@@ -0,0 +1,28 @@
+package org.apache.jena.osgi.test;
+
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Service;
+import org.junit.Test;
+
+@Component
+@Service(JenaCoreTest.class)
+public class JenaCoreTestImpl implements JenaCoreTest {
+	@Test
+	public void coreTests() {
+		System.out.println("Testing stuff");
+		// Ideally we would run everything in com.hp.hpl.jena.test.TestPackage
+		// directly, but currently it relies heavily on the folder testing/ being
+		// on the current path. We'll cheat and set that at the user.dir..
+//		Path jenaCoreFolder = Paths.get("..", "jena-core");
+//		if (! Files.isDirectory(jenaCoreFolder.resolve("testing"))) { 
+//			throw new RuntimeException("Can't find ../jena-core/testing");
+//		}
+//		System.setProperty("user.dir", jenaCoreFolder.toAbsolutePath().toString());		
+		
+//		TestSuite suite = TestPackage.suite();
+//		junit.textui.TestRunner.run(suite) ;
+//        //SimpleTestRunner.runAndReport(suite) ;
+	}
+	
+
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/b7e65a6e/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index ef635f3..c888918 100644
--- a/pom.xml
+++ b/pom.xml
@@ -158,4 +158,7 @@
     <system>JIRA</system>
     <url>http://issues.apache.org/jira/browse/JENA</url>
   </issueManagement>
+  <modules>
+  	<module>jena-osgi-test</module>
+  </modules>
 </project>


Mime
View raw message