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 37085] New: - problem refering jars specfied by Class-Path attribute in manifest of a ant task jar file, when this ant task jar file is located in a directory with space
Date Fri, 14 Oct 2005 01:11:44 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=37085>.
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=37085

           Summary: problem refering jars specfied by Class-Path attribute
                    in manifest of a ant task jar file, when this ant task
                    jar file is located in a directory with space
           Product: Ant
           Version: 1.6.5
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: critical
          Priority: P1
         Component: Core
        AssignedTo: dev@ant.apache.org
        ReportedBy: ritesh.adval@sun.com


Can some please take a look at this problem? Also I was not able to add a bug 
to bugzilla. How do I add a bug report?

 

I have verified that this is indeed a problem with ant class loader. While 
debugging I found that this problem is due to conversion of white space to %20 
in AntClassLoader2 class. (This conversion is done in FileUtils.getFileURL())

 

 

I verified with ant which comes with netbeans 4.1 (ant 1.6.2), netbeans5.0beta 
as well as latest ant 1.6.5. All fails to run my test program if jar which 
contains test ant task is located in a directory which has space.

 

 

Attached is the test program. Two files:

 AntTaskLibraryWithClass-PathExtension.zip and build.xml

 

AntTaskLibraryWithClass-PathExtension.zip contains:

 

 AntTaskLibrary.jar

+ext

  +AntTaskDepedentLibrary.jar

 

 

AntTaskLibrary.jar has following manifest entry referring to 
AntTaskDepedentLibrary.jar

 

Class-Path: ext/AntTaskDepedentLibrary.jar

 

 

To run follow the steps below:

 

(a) Unzip AntTaskLibraryWithClass-PathExtension.zip to a directory which has 
space in its name. (Ex: c:\program Files)

 

(b) Extract build.xml to some directory.

 

(c) Go to directory where build.xml is and run:

 

 

ant -DAntTaskLibrary.jar= <location of AntTaskLibrary.jar as specified in step
(a) >  testAntTask

 

 

 

Ex:

 

ant -DAntTaskLibrary.jar= "c:\Program 
Files\Alaska\antTaskLibrary\AntTaskLibrary.jar" testAntTask

 

 

 

Note that it will fail to find AntTestTaskHelper class which is defined in 
AntTaskDepedentLibrary.jar

 

 

 

BUILD FAILED

 

java.lang.NoClassDefFoundError: AntTestTaskHelper

 

 

 

This is not a problem if AntTaskLibrary.jar is located in a dir which does not 
have space. (In step (a) choose a dir which does not have space)

-- 
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