You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tamaya.apache.org by st...@apache.org on 2015/01/08 09:05:27 UTC

[1/2] incubator-tamaya git commit: TAMAYA-49 re-enable java7 build again.

Repository: incubator-tamaya
Updated Branches:
  refs/heads/master 6d15f753d -> ae6667533


TAMAYA-49 re-enable java7 build again.


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

Branch: refs/heads/master
Commit: c3441b00f696330ddbdaf746753c5b249852668a
Parents: 6d15f75
Author: Mark Struberg <st...@apache.org>
Authored: Thu Jan 8 08:33:18 2015 +0100
Committer: Mark Struberg <st...@apache.org>
Committed: Thu Jan 8 08:33:18 2015 +0100

----------------------------------------------------------------------
 README.md      | 19 ++++++++++++++----
 java7/pom.xml  | 30 ++++++++++++++++++++++++++++
 toolchains.xml | 56 +++++++++++++++++++++++++++++------------------------
 3 files changed, 76 insertions(+), 29 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/c3441b00/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index d23963e..1eba0ac 100644
--- a/README.md
+++ b/README.md
@@ -1,15 +1,26 @@
 Building Apache Tamaya (incubating)
 
 
+The Apache Tamaya project contains modules which are intended to be used with Java8 and others
+which are for Java7. 
 
-The Apache Tamaya project contains classes which are intended to be built with Java7 and others
-which are for Java8. This means you need to have both JDK-1.7 and JDK-1.8 installed on your computer.
+This means if we like to release then we need to have both JDK-1.7 and JDK-1.8 
+installed on your computer.
 
-To tell maven which JDK it should use for each of the projects we do leverage the 
+To tell Maven which JDK it should use for each of the projects we do leverage the 
 maven-toolchains-plugin and Mavens toolchains support.
 
 See the following links for more information
 http://maven.apache.org/ref/3.2.5/maven-core/toolchains.html
 http://maven.apache.org/guides/mini/guide-using-toolchains.html
 
-Please copy the provided toolchains.xml sample to ~.m2/toolchains.xml
\ No newline at end of file
+The easiest way to setup your computer for being able to use toolchains is to 
+simply copy the provided ./toolchains.xml sample to ~.m2/toolchains.xml and 
+edit the paths to your own JDK installations.
+We activate the maven-toolchains-plugin with a 'java7' profile in all 
+the modules we need it.
+
+For building the java7 modules with JDK-1.7 you simply need to build Tamaya with
+
+$> mvn clean install -Pjava7
+

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/c3441b00/java7/pom.xml
----------------------------------------------------------------------
diff --git a/java7/pom.xml b/java7/pom.xml
index 2bf889f..78dd929 100644
--- a/java7/pom.xml
+++ b/java7/pom.xml
@@ -40,4 +40,34 @@ under the License.
         <module>core</module>
 -->
     </modules>
+
+    <profiles>
+        <profile>
+            <id>java7</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <!-- use java7 to compile the modules in this tree -->
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-toolchains-plugin</artifactId>
+                        <version>1.1</version>
+                        <executions>
+                            <execution>
+                                <goals>
+                                    <goal>toolchain</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                        <configuration>
+                            <toolchains>
+                                <jdk>
+                                    <version>[1.7,)</version>
+                                </jdk>
+                            </toolchains>
+                        </configuration>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/c3441b00/toolchains.xml
----------------------------------------------------------------------
diff --git a/toolchains.xml b/toolchains.xml
index 98617b2..c58bb0d 100644
--- a/toolchains.xml
+++ b/toolchains.xml
@@ -1,27 +1,33 @@
 <toolchains xmlns="http://maven.apache.org/TOOLCHAINS/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://maven.apache.org/TOOLCHAINS/1.1.0 http://maven.apache.org/xsd/toolchains-1.1.0.xsd">
-  
-  <!-- jdk-1.7 -->
-  <toolchain>
-    <type>jdk</type>
-    <provides>
-      <version>1.7</version>
-      <vendor>Oracle</vendor>
-    </provides>
-    <configuration>
-      <jdkHome>/path/to/jdk/1.7</jdkHome>
-    </configuration>
-  </toolchain>
-  
-  <!-- jdk-1.8 -->
-  <toolchain>
-    <type>jdk</type>
-    <provides>
-      <version>1.8</version>
-      <vendor>Oracle</vendor>
-    </provides>
-    <configuration>
-      <jdkHome>/path/to/jdk/1.8</jdkHome>
-    </configuration>
-  </toolchain>
+            xsi:schemaLocation="http://maven.apache.org/TOOLCHAINS/1.1.0 http://maven.apache.org/xsd/toolchains-1.1.0.xsd">
+
+
+    <!--
+     This is a simple example to configure your maven-toolchains-plugin.
+     Copy this file over to your ~.m2/ directory and edit the /path/to/jdk/... entries
+     to fit your local setup.
+    -->
+    <!-- jdk-1.7 -->
+    <toolchain>
+        <type>jdk</type>
+        <provides>
+            <version>1.7</version>
+            <vendor>Oracle</vendor>
+        </provides>
+        <configuration>
+            <jdkHome>/path/to/jdk/1.7</jdkHome>
+        </configuration>
+    </toolchain>
+
+    <!-- jdk-1.8 -->
+    <toolchain>
+        <type>jdk</type>
+        <provides>
+            <version>1.8</version>
+            <vendor>Oracle</vendor>
+        </provides>
+        <configuration>
+            <jdkHome>/path/to/jdk/1.8</jdkHome>
+        </configuration>
+    </toolchain>
 </toolchains>


[2/2] incubator-tamaya git commit: TAMAYA-32 remove unused imports

Posted by st...@apache.org.
TAMAYA-32 remove unused imports


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

Branch: refs/heads/master
Commit: ae6667533b751b3acf350465a6cecc7bd50ad29d
Parents: c3441b0
Author: Mark Struberg <st...@apache.org>
Authored: Thu Jan 8 08:35:41 2015 +0100
Committer: Mark Struberg <st...@apache.org>
Committed: Thu Jan 8 08:35:41 2015 +0100

----------------------------------------------------------------------
 .../java/org/apache/tamaya/core/testdata/TestPropertyFilter.java   | 1 -
 .../org/apache/tamaya/modules/json/JSONPropertySourceTest.java     | 2 --
 2 files changed, 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/ae666753/java8/core/src/test/java/org/apache/tamaya/core/testdata/TestPropertyFilter.java
----------------------------------------------------------------------
diff --git a/java8/core/src/test/java/org/apache/tamaya/core/testdata/TestPropertyFilter.java b/java8/core/src/test/java/org/apache/tamaya/core/testdata/TestPropertyFilter.java
index 0713fee..6faa831 100644
--- a/java8/core/src/test/java/org/apache/tamaya/core/testdata/TestPropertyFilter.java
+++ b/java8/core/src/test/java/org/apache/tamaya/core/testdata/TestPropertyFilter.java
@@ -21,7 +21,6 @@ package org.apache.tamaya.core.testdata;
 import org.apache.tamaya.spi.PropertyFilter;
 
 import javax.annotation.Priority;
-import java.util.function.Function;
 
 /**
  * Simple PropertyFilter that filters exact one value, registered using ServiceLoader.

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/ae666753/modules/json/src/test/java/org/apache/tamaya/modules/json/JSONPropertySourceTest.java
----------------------------------------------------------------------
diff --git a/modules/json/src/test/java/org/apache/tamaya/modules/json/JSONPropertySourceTest.java b/modules/json/src/test/java/org/apache/tamaya/modules/json/JSONPropertySourceTest.java
index 0c48534..ad61374 100644
--- a/modules/json/src/test/java/org/apache/tamaya/modules/json/JSONPropertySourceTest.java
+++ b/modules/json/src/test/java/org/apache/tamaya/modules/json/JSONPropertySourceTest.java
@@ -19,7 +19,6 @@
 package org.apache.tamaya.modules.json;
 
 import org.apache.tamaya.ConfigException;
-import org.apache.tamaya.core.propertysource.DefaultOrdinal;
 import org.apache.tamaya.spi.PropertySource;
 import org.hamcrest.CoreMatchers;
 import org.hamcrest.Matchers;
@@ -35,7 +34,6 @@ import static org.hamcrest.CoreMatchers.notNullValue;
 import static org.hamcrest.CoreMatchers.nullValue;
 import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.Matchers.hasSize;
-import static org.junit.Assert.fail;
 
 public class JSONPropertySourceTest {