ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 52227] manifestclasspath makes paths relative to build dir and not jarfile
Date Fri, 02 Dec 2011 21:01:49 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=52227

Tushar Kapila <tgkprog@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |NEW

--- Comment #3 from Tushar Kapila <tgkprog@gmail.com> 2011-12-02 21:01:49 UTC ---
lasspath-make:
    [echo] Start classpath:
    [echo]
../../Users/stefan.bodewig/Desktop/ant-test-manifest-cp/lib/log4j.jar
    [echo] end
    [echo] file :/run/anttestManifestClasspath/a-classpath3.jar
     [jar] Building MANIFEST-only jar:
C:\run\anttestManifestClasspath\a-classpath3.jar
    [echo] Jar done

BUILD SUCCESSFUL

the path in the manifest is printed after  [echo] Start classpath:

../../Users/stefan.bodewig/Desktop/ant-test-manifest-cp/lib/log4j.jar
    [echo] end

This is your build path.

expected is lib/log4j.jar

at run time there will be no dir
sers/stefan.bodewig/Desktop/ant-test-manifest-cp/lib/

The app & this classpath jar will be at 

d:/run/anttestManifestClasspath/a-classpath3.jar

the lib dir will be 
d:/run/anttestManifestClasspath/lib

so a relative path from d:/run/anttestManifestClasspath/a-classpath3.jar to 
d:/run/anttestManifestClasspath/lib/log4j.jar will be:-

    [echo] Start classpath:
    [echo]
      lib/log4j.jar
    [echo] end

if you run the build process from d:\run\anttestManifestClasspath\

or simple change the 
basedir=""
to 
basedir="d:/run/anttestManifestClasspath/"
you will get expected output 

Note on windows when giving a path to java can give
d:/run/anttestManifestClasspath/ or d:\run\anttestManifestClasspath\

only need to use \ before invoking jvm so have used both slashes ....

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

Mime
View raw message