You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bu...@apache.org on 2001/07/04 16:05:00 UTC

[Bug 1126] - bin\lcp.bat prepends Ant libraries to user's path

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

*** shadow/1126	Sun May 20 17:24:03 2001
--- shadow/1126.tmp.21099	Wed Jul  4 07:05:00 2001
***************
*** 1,19 ****
! Bug#: 1126
! Product: Ant
! Version: 1.3
! Platform: PC
! OS/Version: 
! Status: NEW   
! Resolution: 
! Severity: Normal
! Priority: 
! Component: Build Process
! AssignedTo: ant-dev@jakarta.apache.org                            
! ReportedBy: jim_stearns@hp.com               
! URL: 
! Cc: 
! Summary: bin\lcp.bat prepends Ant libraries to user's path
! 
  On DOS (not Linux or cygwin), ant.bat calls lcp.bat to add the ant libraries, 
  such as lib\parser.jar, to the CLASSPATH passed to ant.  The problem is that 
  lcp.bat *prepends* (not appends) these libraries to the user's classpath.  
--- 1,19 ----
! +============================================================================+
! | bin\lcp.bat prepends Ant libraries to user's path                          |
! +----------------------------------------------------------------------------+
! |        Bug #: 1126                        Product: Ant                     |
! |       Status: NEW                         Version: 1.3                     |
! |   Resolution:                            Platform: PC                      |
! |     Severity: Normal                   OS/Version: All                     |
! |     Priority: High                      Component: Build Process           |
! +----------------------------------------------------------------------------+
! |  Assigned To: glennm@apache.org                                            |
! |  Reported By: jim_stearns@hp.com                                           |
! |      CC list: Cc:                                                          |
! +----------------------------------------------------------------------------+
! |          URL:                                                              |
! +============================================================================+
! |                              DESCRIPTION                                   |
  On DOS (not Linux or cygwin), ant.bat calls lcp.bat to add the ant libraries, 
  such as lib\parser.jar, to the CLASSPATH passed to ant.  The problem is that 
  lcp.bat *prepends* (not appends) these libraries to the user's classpath.  
***************
*** 36,38 ****
--- 36,48 ----
  Thanks,
  
  Jim Stearns
+ 
+ ------- Additional Comments From glennm@apache.org  2001-07-04 07:04 -------
+ Not being able to find the original lcp.bat used for Ant 1.2 (it looks like it
+ was deleted out of jakarta-ant/bin and moved to jakarta-ant/src/scripts, in the
+ process losing the history) I can't find any comments explaining the change.
+ 
+ Is there any reason to *not* implement the requested change?  The comment in the
+ ant script indicates it was changed to reflect the behaviour in the Windows
+ version (always prepend the jars to the classpath rather than append), but
+ according to this report, that wasn't always the case.

Re: [Bug 1126] - bin\lcp.bat prepends Ant libraries to user's path

Posted by Peter Donald <do...@apache.org>.
On Thu,  5 Jul 2001 00:05, bugzilla@apache.org wrote:
> + Is there any reason to *not* implement the requested change?  The comment
> in the + ant script indicates it was changed to reflect the behaviour in
> the Windows + version (always prepend the jars to the classpath rather than
> append), but + according to this report, that wasn't always the case.

The reason not to do it is that it inhibits using ant with no CLASSPATH set 
because it can lead to empty entries at start of CLASSPATH var. The way it 
works now puts the possibly empty entries at end of CLASSPATH. Some JVMs stop 
reading CLASSPATH entries at first empty entry and thus would never see any 
of later entrys.

Cheers,

Pete

*-----------------------------------------------------*
| "Faced with the choice between changing one's mind, |
| and proving that there is no need to do so - almost |
| everyone gets busy on the proof."                   |
|              - John Kenneth Galbraith               |
*-----------------------------------------------------*