tamaya-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject [1/2] incubator-tamaya git commit: TAMAYA-49 re-enable java7 build again.
Date Thu, 08 Jan 2015 08:05:27 GMT
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 <struberg@apache.org>
Authored: Thu Jan 8 08:33:18 2015 +0100
Committer: Mark Struberg <struberg@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>


Mime
View raw message