You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@beehive.apache.org by "Jeremiah Johnson (JIRA)" <be...@incubator.apache.org> on 2005/05/12 18:35:29 UTC
[jira] Reopened: (BEEHIVE-37) build.xml should fail gracefully with info if using invalid ant or jdk versions
[ http://issues.apache.org/jira/browse/BEEHIVE-37?page=all ]
Jeremiah Johnson reopened BEEHIVE-37:
-------------------------------------
Assign To: Eddie O'Neil
Eddie, wasn't sure if you or Steve H would want this one. The Java version fix works as expected (tested with 1.4.2), but the Ant check will never work as is. The Ant check is in beehive-imports.xml which is imported by build.xml; import was added in Ant 1.6.0 (http://archive.apache.org/dist/ant/binaries/RELEASE-NOTES-1.6.0.html).
The current failure when run with Ant pre-1.6 is
BUILD FAILED
file:/home/jjohnson/projects/beehive/build.xml:25: Unexpected element "import"
> 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
> Assignee: Eddie O'Neil
> Fix For: V1Beta
>
> 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
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira