geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r1468573 - in /geronimo/server/branches/3.0: framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/condition/ plugins/jaxws/geronimo-jaxws-sun-tools/src/main/java/org/apache/geronimo/jaxws/sun/tools/
Date Tue, 16 Apr 2013 19:30:47 GMT
Author: gawor
Date: Tue Apr 16 19:30:47 2013
New Revision: 1468573

URL: http://svn.apache.org/r1468573
Log:
GERONIMO-6446: Fix a build problem with Apple Java 7

Modified:
    geronimo/server/branches/3.0/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/condition/JavaVariable.java
    geronimo/server/branches/3.0/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/condition/SystemUtils.java
    geronimo/server/branches/3.0/plugins/jaxws/geronimo-jaxws-sun-tools/src/main/java/org/apache/geronimo/jaxws/sun/tools/JAXWSTools.java

Modified: geronimo/server/branches/3.0/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/condition/JavaVariable.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/condition/JavaVariable.java?rev=1468573&r1=1468572&r2=1468573&view=diff
==============================================================================
--- geronimo/server/branches/3.0/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/condition/JavaVariable.java
(original)
+++ geronimo/server/branches/3.0/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/condition/JavaVariable.java
Tue Apr 16 19:30:47 2013
@@ -67,6 +67,10 @@ public class JavaVariable
     public boolean getIs1_6() {
         return SystemUtils.IS_JAVA_1_6;
     }
+    
+    public boolean getIs1_7() {
+        return SystemUtils.IS_JAVA_1_7;
+    }
 
     public boolean getIsVersionAtLeast(final float requiredVersion) {
         return SystemUtils.isJavaVersionAtLeast(requiredVersion);

Modified: geronimo/server/branches/3.0/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/condition/SystemUtils.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/condition/SystemUtils.java?rev=1468573&r1=1468572&r2=1468573&view=diff
==============================================================================
--- geronimo/server/branches/3.0/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/condition/SystemUtils.java
(original)
+++ geronimo/server/branches/3.0/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/condition/SystemUtils.java
Tue Apr 16 19:30:47 2013
@@ -893,6 +893,14 @@ public class SystemUtils
      */
     public static final boolean IS_JAVA_1_6 = getJavaVersionMatches("1.6");
 
+    /**
+     * <p>Is <code>true</code> if this is Java version 1.7 (also 1.7.x
versions).</p>
+     *
+     * <p>The field will return <code>false</code> if {@link #JAVA_VERSION}
is
+     * <code>null</code>.</p>
+     */
+    public static final boolean IS_JAVA_1_7 = getJavaVersionMatches("1.7");
+
     // Operating system checks
     //-----------------------------------------------------------------------
     // These MUST be declared after those above as they depend on the

Modified: geronimo/server/branches/3.0/plugins/jaxws/geronimo-jaxws-sun-tools/src/main/java/org/apache/geronimo/jaxws/sun/tools/JAXWSTools.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0/plugins/jaxws/geronimo-jaxws-sun-tools/src/main/java/org/apache/geronimo/jaxws/sun/tools/JAXWSTools.java?rev=1468573&r1=1468572&r2=1468573&view=diff
==============================================================================
--- geronimo/server/branches/3.0/plugins/jaxws/geronimo-jaxws-sun-tools/src/main/java/org/apache/geronimo/jaxws/sun/tools/JAXWSTools.java
(original)
+++ geronimo/server/branches/3.0/plugins/jaxws/geronimo-jaxws-sun-tools/src/main/java/org/apache/geronimo/jaxws/sun/tools/JAXWSTools.java
Tue Apr 16 19:30:47 2013
@@ -31,6 +31,7 @@ import org.apache.geronimo.kernel.reposi
 import org.apache.geronimo.kernel.repository.ListableRepository;
 import org.apache.geronimo.kernel.repository.Repository;
 import org.apache.geronimo.kernel.repository.Version;
+import org.apache.geronimo.system.configuration.condition.SystemUtils;
 import org.apache.xbean.classloader.JarFileClassLoader;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -146,9 +147,16 @@ public class JAXWSTools {
         if (this.saajImpl != null) {
             jars.add(getLocation(repositories, this.saajImpl));
         }
-        // add tools.jar to classpath except on Mac OS. On Mac OS there is classes.jar with
the
-        // same contents as tools.jar and is automatically included in the classpath.
-        if (!Os.isFamily(Os.FAMILY_MAC)) {
+
+        if (Os.isFamily(Os.FAMILY_MAC)) {
+            // add tools.jar to classpath on Mac OS but only when running Java 7+.
+            // With older JVMs there is classes.jar with the same contents as tools.jar and
+            // is automatically included in the classpath.
+            if (SystemUtils.IS_JAVA_1_7) {
+                addToolsJarLocation(jars);
+            }
+        } else {
+            // add tools.jar to classpath on non- Mac OS
             addToolsJarLocation(jars);
         }
 



Mime
View raw message