build.xml should fail gracefully with info if using invalid ant or jdk versions
-------------------------------------------------------------------------------

         Key: BEEHIVE-37
         URL: http://issues.apache.org/jira/browse/BEEHIVE-37
     Project: Beehive
        Type: Improvement
 Environment: ant less than 1.6, jdk less than 1.5
    Reporter: bob mcwhirter


Will submit a patch.  Just noting it here for progress tracking.

running ant from the top-level of the build should check and gracefully fail if 
the current version of ant and/or the jdk is not sufficient to build beehive.

There is only 1 construct in the current top-level build that isn't supported 
by older versions of ant, being the <fail> with a nested <condition>.  The ant 
manual itself shows a different way of using <condition> to set a property 
followed by a <fail unless="..."> idiom, instead of the nesting.  I've 
confirmed that this idiom does indeed work with older (more common) versions of 
ant.

Suggested verbiage from my localhost...

for failing JDK version check:

      <fail unless="jdk.version.okay">
        Newer JDK required.

        Building the project requires JDK 1.5.

        You are currently using the following JDK:

            java.home    = ${java.home}
            java.version = ${java.version}
            java.vendor  = ${java.vendor}

        You may obtain a newer version of the JDK from 

            http://java.sun.com/

        If you have JDK 1.5 installed on your system, you may need to 
        adjust your JAVA_HOME environment variable.
      </fail>

for failing ant version check

      <fail unless="ant.version.okay">
        Newer Ant required.

        Building the project requires apache-ant 1.6.

        You are currently using the following apache-ant:
      
            ant.home    = ${ant.home}
            ant.version = ${ant.version}

        You may obtain a newer version of ant from 

            http://ant.apache.org/

        If you have ant 1.6 installed on your system, you may need to 
        adjust your ANT_HOME environment variable.
      </fail>



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira

Reply via email to