Bug 141058
Summary: | ant.home not set by ant binary (but is set by classic-ant script) | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Daniel L. Rall <dlr> | ||||
Component: | ant | Assignee: | Vadim Nasardinov <vnasardinov> | ||||
Status: | CLOSED RAWHIDE | QA Contact: | |||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | rawhide | CC: | mattdm | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2005-11-10 20:58:18 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Daniel L. Rall
2004-11-28 23:59:02 UTC
Incidently, here's how ant.home gets set from the ANT_HOME environment variable in the classic-ant shell script: $ grep 'ant\.home' `which classic-ant` "$JAVACMD" $ANT_OPTS -classpath "$LOCALCLASSPATH" -Dant.home="${ANT_HOME}" -Djikes.class.path="$JIKESPATH" -Dcygwin.user.home="$CYGHOME" org.apache.tools.ant.Main $ANT_ARGS "$@" "$JAVACMD" $ANT_OPTS -classpath "$LOCALCLASSPATH" -Dant.home="${ANT_HOME}" -Dcygwin.user.home="$CYGHOME" org.apache.tools.ant.Main $ANT_ARGS "$@" "$JAVACMD" $ANT_OPTS -classpath "$LOCALCLASSPATH" -Dant.home="${ANT_HOME}" -Djikes.class.path="$JIKESPATH" org.apache.tools.ant.Main $ANT_ARGS "$@" "$JAVACMD" $ANT_OPTS -classpath "$LOCALCLASSPATH" -Dant.home="${ANT_HOME}" org.apache.tools.ant.Main $ANT_ARGS "$@" Fedora Core 2 is now maintained by the Fedora Legacy project for security updates only. If this problem is a security issue, please reopen and reassign to the Fedora Legacy product. If it is not a security issue and hasn't been resolved in the current FC3 updates or in the FC4 test release, reopen and change the version to match. Due to the native-compiled version of the ant executable, this is still a problem in FC3, and will be a problem in FC4 as well. Please let me know what additional information I can provide. Thanks. I'm going to set this to version "devel" for FC4. This won't be an issue for FC4. Current rawhide has bytecode ant, and the new BC ABI in libgcj means that stuff shouldn't break when we roll out the native stuff (Real Soon Nowâ¢). Gary, thanks for the feedback! This bytecode API sounds like a major improvement which will likely fix a ton of the classloading issues I've seen with the native-compiled ant binary. However, I'm unsure how it alone could fix the setting of ant.home, a java.lang.System property which is set for the JVM by all the traditional Ant invocation wrapper scripts, and assumed by many Ant tasks and build.xml files to be available. To fix this issue, it seems to me that some additional code would need to be executed by the gcj-compiled binary on startup which performs the additional operations handled by the traditional wrapper scripts (operations which occur before any Java bytecode is ever executed). Missing the ant.home system property is only once instance of this class of problem; note other system properties like jikes.class.path and cygwin.user.home which are set by the snippet of the traditional shell wrapper script which I pasted into comment #1. For most developer/end users of Ant, Ant is more than the its Java bytecodes. It's also that set of wrapper scripts which insulate the user from environment specific issues which they'd prefer not to have to know about. :-) In FC4 we're using the standard ant wrapper scripts -- the gcj-compiled binary is history. Created attachment 120903 [details] bz141058.sh simple test case Seems to work in FC4: |$ curl -o bz141058.sh \ | 'https://bugzilla.redhat.com/bugzilla/attachment.cgi?id=120903' | % Total % Received % Xferd Average Speed Time Time Time Current | Dload Upload Total Spent Left Speed |100 242 100 242 0 0 290 0 --:--:-- --:--:-- --:--:-- 236k |$ bash bz141058.sh |Buildfile: /dev/fd/63 | |test: | [echo] ant.home=/usr/share/ant | |BUILD SUCCESSFUL |Total time: 1 second Closing. Nice work guys. Verified on FC4. |