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 Sat, 03 Dec 2011 07:00:10 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=52227

--- Comment #4 from Stefan Bodewig <bodewig@apache.org> 2011-12-03 07:00:10 UTC ---
You are misreading the manual then.

If you say <pathelement path="lib/log4j.jar" /> then this will be a path
relative to your project's basedir - it points to the jar inside your
build directory.

<manifestclasspath> calculates the path of this file relative to the
jar you specify in the task's jarfile attribute.  Of course it is the
log4j.jar file in your build directory, you told it to use that.

<manifestclasspath> only works if the things you put into the classpath
already are reachable using the same relative paths to the specified jarfile
as they will be when deployed.  In your case this is not true.

It would work if you set the jarfile attribute to a-classpath3.jar without any
leading path so it is assumed to the top level of your build directory
and lib/log4j.jar is the relative path from there.

The reason it works when you invoke things via <ant> from a build file
in your destination directory is the way basedir is reset when using <ant>.

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