ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 13042] New: - Need to have a way to override Java version when parsing
Date Thu, 26 Sep 2002 19:08:20 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13042>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13042

Need to have a way to override Java version when parsing

           Summary: Need to have a way to override Java version when parsing
           Product: Ant
           Version: 1.5
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Enhancement
          Priority: Other
         Component: Core
        AssignedTo: ant-dev@jakarta.apache.org
        ReportedBy: shankar@cotagesoft.com


This is mainly for AntRunner support. AntRunner is the JBuilder OpenTool that
can run ant on the project buildfile.  It parses the buildfile to determine the
list of targets that it presents to the IDE user to select.

The background is that JBuilder itself runs under an older JDK (1.3), for a
variety of reasons detailed in the JBuilder newsgroups.  The user programs,
however, and compiled, run and debugged (and javadoc'ed) using whatever the user
specifies, usually JDK 1.4. 

The problem is now that when I want to use a JDK1.4-specific element in an Ant
project, when AntRunner (which, because it is a JBuilder extension, is being run
under a 1.3 JDK) parses the build.xml (by calling ProjectHelper.parse()), it
throws errors about some elements (in this case, <tag>) not being supported. 
Even though this is a complete non-issue: the actual build is performed by an
external Ant task which uses the right JDK.

What might help is one of the following:

(a) An option to force JavaEnvUtils to pretend that the JDK version is whatever
the caller (in this case, AntRunner) wants it to be. It is up to the caller to
actually ensure that the build.xml gets actually *run* with the appropriate JDK.

OR

(b) An option to just parse the file for *syntactic* correctness and list the
targets (i.e. don't actually process any of the elements within).

(Actually, you can see this problem even today: if you have a syntax error in
tbe build.xml file, "ant -projecthelp" just puts out a Buildfile: line and does
an exit(1) without emitting any errors at all.  A proper verification option
that can also list out the targets would go a long way towards helping AntRunner
cope with this unfortunate JDK "mismatch" situation).

(Another note: think of this as a way to support tools that allow you to check
Ant files using the "ant" parser itself, where the tool itself runs under a
different JDK than the target build process).

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message