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 38914] - ant -p doesn't display targets correctly when CLASSPATH=""
Date Fri, 10 Mar 2006 11:59:54 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38914>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38914





------- Additional Comments From dennis.bednar@comcast.net  2006-03-10 11:59 -------
(In reply to comment #1)
> I've just confirmed this issue with the ant code base (trunk).
> 
> If you have no CLASSPATH variable at all, ant -p/-projecthelp works fine
> If you set CLASSPATH="", ant -p jsut executes the default target
> If you set CLASSPATH to some meaningful value, ant -p/-projecthelp works fine
> 
> I think this is to do with Windows not allowing you to easily 'unset' an
> environment variable.  Obviously with a CLASSPATH="", something is going screwy
> with Ant
> 
> As to the 'Ant must have tools.jar etc etc', Java5 (Java6rc and probably
> Java1.4) is tightly integrated into Windows (moreso than previously).  I've come
> across this problem when wanting to have different versions of Java installed
> and testing against them - JAVA_HOME=d:\java\jdk1.4.1, but my machine still
> thinks that java -version = 1.6.0-rc1 - I think that there may be a registry
> issue here with the newer versions of Java looking in the registry (on Windows
> XP) instead of honouring the JAVA_HOME env veriable.  I've never had any problem
> on Linux - just change JAVA_HOME and you are using a new/old Java - WindowsXP +
> Java5+ exhibit a very different behaviour in my experience
> 
> Dennis:
> 
> Try with no CLASSPATH variable at all - you should be fine, setting CLASSPATH=""
> in Windows is obviously not 'unsetting' the value and causing some ant
> strangeness.  I'll try to track down the issue as I'm on XP here at work


I have 3 comments:

1. Since then I've discovered how to "unset an enviroment variable in DOS CMD
   window:
      set classpath=
   this will remove the classpath environment variable.

2. Besides "ant -p" running the default target, so does "ant -?"
   So it appears that the command line option is being ignored,
   even though its really some quirk with the enviroment variable...
   Weird.

3. These 2 are different:
    set classpath="foo"
    set classpath=foo
   In unix (i think, don't have a Linux handy here to test it), unix
   strips off the double quotes.. but Windows XP doesn't.  You can prove
   this by typing
     set classpath
   to display the current value, the first case displays "foo" while the
   second case displays foo

   


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


Mime
View raw message