You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commonsrdf.apache.org by wi...@apache.org on 2015/03/27 19:15:46 UTC

[48/50] [abbrv] incubator-commonsrdf git commit: Remove java6 profile, not viable to support java-6 concurrently with 8 in the long term

Remove java6 profile, not viable to support java-6 concurrently with 8
in the long term

Project: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/commit/8141ae08
Tree: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/tree/8141ae08
Diff: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/diff/8141ae08

Branch: refs/heads/master
Commit: 8141ae0806d7101d8cc2ad5abb4e21b564e2df14
Parents: 9ad70a4
Author: Peter Ansell <p_...@yahoo.com>
Authored: Mon Mar 9 12:35:52 2015 +1100
Committer: Peter Ansell <p_...@yahoo.com>
Committed: Mon Mar 9 12:35:52 2015 +1100

----------------------------------------------------------------------
 api/src/main/patches/java6.patch | 226 ----------------------------------
 pom.xml                          | 200 ++++++++++--------------------
 2 files changed, 64 insertions(+), 362 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/8141ae08/api/src/main/patches/java6.patch
----------------------------------------------------------------------
diff --git a/api/src/main/patches/java6.patch b/api/src/main/patches/java6.patch
deleted file mode 100644
index 8795013..0000000
--- a/api/src/main/patches/java6.patch
+++ /dev/null
@@ -1,226 +0,0 @@
-diff --git a/api/src/main/java/com/github/commonsrdf/api/Graph.java b/api/src/main/java/com/github/commonsrdf/api/Graph.java
-index 40f4808..e1f6074 100644
---- a/api/src/main/java/com/github/commonsrdf/api/Graph.java
-+++ b/api/src/main/java/com/github/commonsrdf/api/Graph.java
-@@ -13,8 +13,7 @@
-  */
- package com.github.commonsrdf.api;
- 
--import java.util.function.Predicate;
--import java.util.stream.Stream;
-+import java.util.Iterator;
- 
- /**
-  * An <a href="http://www.w3.org/TR/rdf11-concepts/#section-rdf-graph"> RDF 1.1
-@@ -22,7 +21,7 @@ import java.util.stream.Stream;
-  * href="http://www.w3.org/TR/rdf11-concepts/" >RDF-1.1 Concepts and Abstract
-  * Syntax</a>, a W3C Recommendation published on 25 February 2014.
-  */
--public interface Graph extends AutoCloseable {
-+public interface Graph {
- 
- 	/**
- 	 * Add a triple to the graph.
-@@ -79,9 +78,7 @@ public interface Graph extends AutoCloseable {
- 	 * Implementations might not need {@link #close()}, hence the default
- 	 * implementation does nothing.
- 	 */
--	@Override
--	default void close() throws Exception {
--	}
-+	public void close() throws Exception;
- 
- 	/**
- 	 * Remove a concrete triple from the graph.
-@@ -125,15 +122,15 @@ public interface Graph extends AutoCloseable {
- 	 * The iteration does not contain any duplicate triples, as determined by
- 	 * the equals method for each {@link Triple}.
- 	 * <p>
--	 * The behaviour of the Stream is not specified if add, remove, or clear,
--	 * are called on the Stream before it terminates.<br>
-+     * The behaviour of the Iterator is not specified if add, remove, or clear,
-+     * are called on the Iterator before it terminates.<br>
- 	 * <p>
--	 * Implementations may throw ConcurrentModificationException from Stream
--	 * methods if they detect a conflict while the Stream is active.
-+     * Implementations may throw ConcurrentModificationException from Iterator 
-+     * methods if they detect a conflict while the Iterator is active.
- 	 *
--	 * @return A {@link Stream} over all of the triples in the graph
-+     * @return A {@link Iterator} over all of the triples in the graph
- 	 */
--	Stream<? extends Triple> getTriples();
-+    Iterator<? extends Triple> getTriples();
- 
- 	/**
- 	 * Get all triples contained by the graph matched with the pattern.
-@@ -141,11 +138,11 @@ public interface Graph extends AutoCloseable {
- 	 * The iteration does not contain any duplicate triples, as determined by
- 	 * the equals method for each {@link Triple}.
- 	 * <p>
--	 * The behaviour of the Stream is not specified if add, remove, or clear,
--	 * are called on the Stream before it terminates.<br>
-+     * The behaviour of the Iterator is not specified if add, remove, or clear,
-+     * are called on the Iterator before it terminates.<br>
- 	 * <p>
--	 * Implementations may throw ConcurrentModificationException from Stream
--	 * methods if they detect a conflict while the Stream is active.
-+     * Implementations may throw ConcurrentModificationException from Iterator 
-+     * methods if they detect a conflict while the Iterator is active.
- 	 *
- 	 * @param subject
- 	 *            The triple subject (null is a wildcard)
-@@ -153,27 +150,9 @@ public interface Graph extends AutoCloseable {
- 	 *            The triple predicate (null is a wildcard)
- 	 * @param object
- 	 *            The triple object (null is a wildcard)
--	 * @return A {@link Stream} over the matched triples.
-+	 * @return A {@link Iterator} over the matched triples.
- 	 */
--	Stream<? extends Triple> getTriples(BlankNodeOrIRI subject, IRI predicate,
-+	Iterator<? extends Triple> getTriples(BlankNodeOrIRI subject, IRI predicate,
- 			RDFTerm object);
- 
--	/**
--	 * Get all triples contained by the graph matched with the pattern.
--	 * <p>
--	 * The iteration does not contain any duplicate triples, as determined by
--	 * the equals method for each {@link Triple}.
--	 * <p>
--	 * The behaviour of the Stream is not specified if add, remove, or clear,
--	 * are called on the Stream before it terminates.<br>
--	 * <p>
--	 * Implementations may throw ConcurrentModificationException from Stream
--	 * methods if they detect a conflict while the Stream is active.
--	 *
--	 * @param filter
--	 *            A filter to match against each triple in the graph.
--	 * @return A {@link Stream} over the matched triples.
--	 */
--	Stream<? extends Triple> getTriples(Predicate<Triple> filter);
--
- }
-diff --git a/api/src/main/java/com/github/commonsrdf/api/Literal.java b/api/src/main/java/com/github/commonsrdf/api/Literal.java
-index 4982327..703f1d2 100644
---- a/api/src/main/java/com/github/commonsrdf/api/Literal.java
-+++ b/api/src/main/java/com/github/commonsrdf/api/Literal.java
-@@ -13,7 +13,7 @@
-  */
- package com.github.commonsrdf.api;
- 
--import java.util.Optional;
-+import com.google.common.base.Optional;
- 
- /**
-  * A RDF-1.1 Literal, as defined by <a href=
-diff --git a/api/src/main/java/com/github/commonsrdf/api/RDFTermFactory.java b/api/src/main/java/com/github/commonsrdf/api/RDFTermFactory.java
-index 0643ba4..ef36b67 100644
---- a/api/src/main/java/com/github/commonsrdf/api/RDFTermFactory.java
-+++ b/api/src/main/java/com/github/commonsrdf/api/RDFTermFactory.java
-@@ -48,10 +48,7 @@ public interface RDFTermFactory {
- 	 * @throws UnsupportedOperationException
- 	 *             If the operation is not supported.
- 	 */
--	default BlankNode createBlankNode() throws UnsupportedOperationException {
--		throw new UnsupportedOperationException(
--				"createBlankNode() not supported");
--	}
-+	public BlankNode createBlankNode() throws UnsupportedOperationException ;
- 
- 	/**
- 	 * Create a blank node for the given internal identifier.
-@@ -72,11 +69,8 @@ public interface RDFTermFactory {
- 	 * @throws UnsupportedOperationException
- 	 *             If the operation is not supported.
- 	 */
--	default BlankNode createBlankNode(String identifier)
--			throws IllegalArgumentException, UnsupportedOperationException {
--		throw new UnsupportedOperationException(
--				"createBlankNode(String) not supported");
--	}
-+	public BlankNode createBlankNode(String identifier)
-+			throws IllegalArgumentException, UnsupportedOperationException;
- 
- 	/**
- 	 * Create a new graph.
-@@ -88,9 +82,7 @@ public interface RDFTermFactory {
- 	 * @throws UnsupportedOperationException
- 	 *             If the operation is not supported.
- 	 */
--	default Graph createGraph() throws UnsupportedOperationException {
--		throw new UnsupportedOperationException("createGraph() not supported");
--	}
-+	public Graph createGraph() throws UnsupportedOperationException;
- 
- 	/**
- 	 * Create an IRI from a (possibly escaped) String.
-@@ -108,11 +100,8 @@ public interface RDFTermFactory {
- 	 * @throws UnsupportedOperationException
- 	 *             If the operation is not supported.
- 	 */
--	default IRI createIRI(String iri) throws IllegalArgumentException,
--			UnsupportedOperationException {
--		throw new UnsupportedOperationException(
--				"createIRI(String) not supported");
--	}
-+	public IRI createIRI(String iri) throws IllegalArgumentException,
-+			UnsupportedOperationException;
- 
- 	/**
- 	 * Create a simple literal.
-@@ -136,11 +125,8 @@ public interface RDFTermFactory {
- 	 * @throws UnsupportedOperationException
- 	 *             If the operation is not supported.
- 	 */
--	default Literal createLiteral(String lexicalForm)
--			throws IllegalArgumentException, UnsupportedOperationException {
--		throw new UnsupportedOperationException(
--				"createLiteral(String) not supported");
--	}
-+	public Literal createLiteral(String lexicalForm)
-+			throws IllegalArgumentException, UnsupportedOperationException;
- 
- 	/**
- 	 * Create a literal with the specified data type.
-@@ -173,11 +159,8 @@ public interface RDFTermFactory {
- 	 * @throws UnsupportedOperationException
- 	 *             If the operation is not supported.
- 	 */
--	default Literal createLiteral(String lexicalForm, IRI dataType)
--			throws IllegalArgumentException, UnsupportedOperationException {
--		throw new UnsupportedOperationException(
--				"createLiteral(String) not supported");
--	}
-+	public Literal createLiteral(String lexicalForm, IRI dataType)
-+			throws IllegalArgumentException, UnsupportedOperationException;
- 
- 	/**
- 	 * Create a language-tagged literal.
-@@ -212,11 +195,8 @@ public interface RDFTermFactory {
- 	 * @throws UnsupportedOperationException
- 	 *             If the operation is not supported.
- 	 */
--	default Literal createLiteral(String lexicalForm, String languageTag)
--			throws IllegalArgumentException, UnsupportedOperationException {
--		throw new UnsupportedOperationException(
--				"createLiteral(String,String) not supported");
--	}
-+	public Literal createLiteral(String lexicalForm, String languageTag)
-+			throws IllegalArgumentException, UnsupportedOperationException;
- 
- 	/**
- 	 * Create a triple.
-@@ -240,11 +220,8 @@ public interface RDFTermFactory {
- 	 * @throws UnsupportedOperationException
- 	 *             If the operation is not supported.
- 	 */
--	default Triple createTriple(BlankNodeOrIRI subject, IRI predicate,
-+	public Triple createTriple(BlankNodeOrIRI subject, IRI predicate,
- 			RDFTerm object) throws IllegalArgumentException,
--			UnsupportedOperationException {
--		throw new UnsupportedOperationException(
--				"createTriple(BlankNodeOrIRI,IRI,RDFTerm) not supported");
--	}
-+			UnsupportedOperationException;
- 
- }

http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/8141ae08/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index b8b708f..f34c209 100644
--- a/pom.xml
+++ b/pom.xml
@@ -82,7 +82,7 @@
 
     <modules>
       <module>api</module>
-      <!-- <module>simple</module> only enabled in java8 profile -->
+      <module>simple</module>
     </modules>
 
     <build>
@@ -153,7 +153,70 @@
                 </execution>
               </executions>
             </plugin>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-compiler-plugin</artifactId>
+				<version>3.1</version>
+				<configuration>
+					<source>1.8</source>
+					<target>1.8</target>
+					<encoding>UTF-8</encoding>
+				</configuration>
+			</plugin>
+			<!-- Create code coverage reports and submit them to coveralls.io. -->
+			<plugin>
+				<groupId>org.eluder.coveralls</groupId>
+				<artifactId>coveralls-maven-plugin</artifactId>
+				<version>3.0.1</version>
+			</plugin>
+			<plugin>
+				<groupId>org.jacoco</groupId>
+				<artifactId>jacoco-maven-plugin</artifactId>
+				<version>0.7.2.201409121644</version>
+				<executions>
+					<execution>
+						<id>prepare-agent</id>
+						<goals>
+							<goal>prepare-agent</goal>
+						</goals>
+					</execution>
+				</executions>
+			</plugin>
         </plugins>
+		<pluginManagement>
+			<plugins>
+				<!--This plugin's configuration is used to store Eclipse m2e settings 
+					only. It has no influence on the Maven build itself. -->
+				<plugin>
+					<groupId>org.eclipse.m2e</groupId>
+					<artifactId>lifecycle-mapping</artifactId>
+					<version>1.0.0</version>
+					<configuration>
+						<lifecycleMappingMetadata>
+							<pluginExecutions>
+								<pluginExecution>
+									<pluginExecutionFilter>
+										<groupId>org.jacoco</groupId>
+										<artifactId>
+											jacoco-maven-plugin
+										</artifactId>
+										<versionRange>
+											[0.7.2.201409121644,)
+										</versionRange>
+										<goals>
+											<goal>prepare-agent</goal>
+										</goals>
+									</pluginExecutionFilter>
+									<action>
+										<ignore></ignore>
+									</action>
+								</pluginExecution>
+							</pluginExecutions>
+						</lifecycleMappingMetadata>
+					</configuration>
+				</plugin>
+			</plugins>
+		</pluginManagement>
     </build>
 
     <dependencies>
@@ -166,139 +229,4 @@
         </dependency>
     </dependencies>
 
-    <profiles>
-        <profile>
-            <id>java8</id>
-            <activation>
-                <activeByDefault>true</activeByDefault>
-            </activation>
-            <modules>
-              <module>api</module>
-              <module>simple</module>
-            </modules>
-            <build>
-                <plugins>
-                    <plugin>
-                        <groupId>org.apache.maven.plugins</groupId>
-                        <artifactId>maven-compiler-plugin</artifactId>
-                        <version>3.1</version>
-                        <configuration>
-                            <source>1.8</source>
-                            <target>1.8</target>
-                            <encoding>UTF-8</encoding>
-                        </configuration>
-                    </plugin>
-					<!-- Create code coverage reports and submit them to coveralls.io. -->
-					<plugin>
-						<groupId>org.eluder.coveralls</groupId>
-						<artifactId>coveralls-maven-plugin</artifactId>
-						<version>3.0.1</version>
-					</plugin>
-					<plugin>
-						<groupId>org.jacoco</groupId>
-						<artifactId>jacoco-maven-plugin</artifactId>
-						<version>0.7.2.201409121644</version>
-						<executions>
-							<execution>
-								<id>prepare-agent</id>
-								<goals>
-									<goal>prepare-agent</goal>
-								</goals>
-							</execution>
-						</executions>
-					</plugin>
-			    </plugins>
-				<pluginManagement>
-					<plugins>
-						<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
-						<plugin>
-							<groupId>org.eclipse.m2e</groupId>
-							<artifactId>lifecycle-mapping</artifactId>
-							<version>1.0.0</version>
-							<configuration>
-								<lifecycleMappingMetadata>
-									<pluginExecutions>
-										<pluginExecution>
-											<pluginExecutionFilter>
-												<groupId>org.jacoco</groupId>
-												<artifactId>
-													jacoco-maven-plugin
-												</artifactId>
-												<versionRange>
-													[0.7.2.201409121644,)
-												</versionRange>
-												<goals>
-													<goal>prepare-agent</goal>
-												</goals>
-											</pluginExecutionFilter>
-											<action>
-												<ignore></ignore>
-											</action>
-										</pluginExecution>
-									</pluginExecutions>
-								</lifecycleMappingMetadata>
-							</configuration>
-						</plugin>
-					</plugins>
-				</pluginManagement>
-			</build>
-        </profile>
-        <profile>
-            <id>java6</id>
-            <build>
-                <plugins>
-                    <plugin>
-                        <groupId>org.apache.maven.plugins</groupId>
-                        <artifactId>maven-compiler-plugin</artifactId>
-                        <version>3.1</version>
-                        <configuration>
-                            <source>1.6</source>
-                            <target>1.6</target>
-                            <encoding>UTF-8</encoding>
-                            <testExcludes>
-                            	<exclude>**</exclude>
-                            </testExcludes>
-                        </configuration>
-                    </plugin>
-                    <plugin>
-						<groupId>org.apache.maven.plugins</groupId>
-						<artifactId>maven-surefire-plugin</artifactId>
-						<version>2.17</version>	
-						<configuration>
-							<skip>true</skip>
-						</configuration>                    
-                    </plugin>
-                    <plugin>
-                        <groupId>org.apache.maven.plugins</groupId>
-                        <artifactId>maven-jar-plugin</artifactId>
-                        <configuration>
-                            <classifier>java6</classifier>
-                        </configuration>
-                    </plugin>
-                    <plugin>
-                        <groupId>org.codehaus.mojo</groupId>
-                        <artifactId>animal-sniffer-maven-plugin</artifactId>
-                        <version>1.11</version>
-                        <executions>
-                            <execution>
-                                <phase>test</phase>
-                                <goals>
-                                    <goal>check</goal>
-                                </goals>
-                            </execution>
-                        </executions>
-                        <configuration>
-                            <signature>
-                                <groupId>org.codehaus.mojo.signature</groupId>
-                                <artifactId>java16</artifactId>
-                                <version>1.1</version>
-                            </signature>
-                        </configuration>
-                    </plugin>
-                </plugins>
-            </build>
-        </profile>
-
-    </profiles>
-
 </project>