ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dominique Devienne" <ddevie...@gmail.com>
Subject Re: ANT 1.7: ManifestClasspath How does it work??
Date Fri, 09 Nov 2007 15:22:43 GMT
On 11/9/07, francis.andre@easynet.fr <francis.andre@easynet.fr> wrote:
> With the following code:
> <manifestclasspath property="jar.classpath"  jarfile="BlogJDO_EJBClient.jar">
>   <classpath>
>     <filelist>
>       <file name="connector_1_5_0.jar"/>
>     </filelist>
>   </classpath>
> </manifestclasspath>

You're problem is likely that you don't use file names which are unambiguous.

<manifestclasspath> needs to compute the relative path between the
jarfile, and the jars or directories listed in the classpath. But you
are using a relative path for jarfile, and filelist for the classpath,
so jarfile's location depends on the build's basedir, which can be
different if you can the build directly or via another build that
<ant>'s it (since <ant> can force the sub-build to use another
basedir, something I abhor personally ;-), and filelist are just names
of files that don't have to exists, so again what absolute filename
this will map to also depends on the context.

I seems to me that you are using manifest classpath as if you wanted
the "text" of the files you specify in filelists to be used as is,
when <manifestclasspath> was designed to *compute* the in-manifest
classpath from existing files.

Feed it real files that exist (via <fileset> or <pathelement
location="" /> if order matters, which it shouldn't of course! ;-),
and anchor your jarfile filename to a path always the same in all
contexts (using a property, or ensuring basedir is really what you
think it should be), and the task will get you the correct manifest
classpath all the time.

--DD

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


Mime
View raw message