geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r432948 - in /geronimo/genesis/trunk/plugins/tools-maven-plugin/src: main/java/org/apache/geronimo/genesis/plugins/tools/RequireJavaVersionMojo.java site/apt/usage.apt
Date Sun, 20 Aug 2006 07:14:50 GMT
Author: jdillon
Date: Sun Aug 20 00:14:48 2006
New Revision: 432948

URL: http://svn.apache.org/viewvc?rev=432948&view=rev
Log:
Fixed bug w/+ processing
Update usage docs to show tokens

Modified:
    geronimo/genesis/trunk/plugins/tools-maven-plugin/src/main/java/org/apache/geronimo/genesis/plugins/tools/RequireJavaVersionMojo.java
    geronimo/genesis/trunk/plugins/tools-maven-plugin/src/site/apt/usage.apt

Modified: geronimo/genesis/trunk/plugins/tools-maven-plugin/src/main/java/org/apache/geronimo/genesis/plugins/tools/RequireJavaVersionMojo.java
URL: http://svn.apache.org/viewvc/geronimo/genesis/trunk/plugins/tools-maven-plugin/src/main/java/org/apache/geronimo/genesis/plugins/tools/RequireJavaVersionMojo.java?rev=432948&r1=432947&r2=432948&view=diff
==============================================================================
--- geronimo/genesis/trunk/plugins/tools-maven-plugin/src/main/java/org/apache/geronimo/genesis/plugins/tools/RequireJavaVersionMojo.java
(original)
+++ geronimo/genesis/trunk/plugins/tools-maven-plugin/src/main/java/org/apache/geronimo/genesis/plugins/tools/RequireJavaVersionMojo.java
Sun Aug 20 00:14:48 2006
@@ -67,6 +67,10 @@
             log.debug("Checking Java version is in the same group as: " + version);
             
             String tmp = SystemUtils.JAVA_VERSION_TRIMMED;
+            
+            log.debug("Requested version: " + tmp);
+            log.debug("JVM version: " + SystemUtils.JAVA_VERSION_FLOAT);
+            
             if (!tmp.startsWith(version)) {
                 throw new MojoFailureException("This build requires Java version " + version
+ 
                     " or a greater version in the same group, found version: " + 
@@ -79,7 +83,11 @@
             log.debug("Checking Java version is greater than: " + version);
             
             float tmp = Float.parseFloat(version);
-            if (tmp >= SystemUtils.JAVA_VERSION_FLOAT) {
+            
+            log.debug("Requested version: " + tmp);
+            log.debug("JVM version: " + SystemUtils.JAVA_VERSION_FLOAT);
+            
+            if (tmp > SystemUtils.JAVA_VERSION_FLOAT) {
                 throw new MojoFailureException("This build requires Java version " + version
+ 
                     " or greater, found version: " + SystemUtils.JAVA_VERSION_FLOAT);
             }
@@ -88,6 +96,9 @@
             log.debug("Checking Java version is equal to: " + version);
             
             float tmp = Float.parseFloat(version);
+            
+            log.debug("Requested version: " + tmp);
+            log.debug("JVM version: " + SystemUtils.JAVA_VERSION_FLOAT);
             
             if (tmp != SystemUtils.JAVA_VERSION_FLOAT) {
                 throw new MojoFailureException("This build requires Java version " + version
+ 

Modified: geronimo/genesis/trunk/plugins/tools-maven-plugin/src/site/apt/usage.apt
URL: http://svn.apache.org/viewvc/geronimo/genesis/trunk/plugins/tools-maven-plugin/src/site/apt/usage.apt?rev=432948&r1=432947&r2=432948&view=diff
==============================================================================
--- geronimo/genesis/trunk/plugins/tools-maven-plugin/src/site/apt/usage.apt (original)
+++ geronimo/genesis/trunk/plugins/tools-maven-plugin/src/site/apt/usage.apt Sun Aug 20 00:14:48
2006
@@ -10,6 +10,8 @@
 * Require a specific Java version
 
  This will only allow the build to function if the Java version is 1.4.1, any other version
will cause a build failure.
+ 
+ NOTE: That for 1.4.1 you specify 1.41.  The version should have only one decimal.
 
 +----------+
 <plugin>
@@ -29,8 +31,10 @@
 </plugin>
 +----------+
 
-* Require Java version equal to or greater than a given version
+* Require Java version greater than or equal
 
+ Specify the '+' token as a suffix to the version number.
+ 
  This will only allow the build to function if the Java version is 1.4 or grater.
 
  For example 1.4.1 or 1.5, but not 1.3.
@@ -53,8 +57,10 @@
 </plugin>
 +----------+
 
-* Require Java version equal to or greater than a given version in the same group
+* Require Java version in the same group
 
+ Specify the '*' token as a suffix to the version number.
+ 
  This will only allow the build to function if the Java version is 1.4 or grater in the same
group.
 
  For example 1.4.1 or 1.4.2, but not 1.5.



Mime
View raw message