ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Conor MacNeill" <co...@cortexebusiness.com.au>
Subject RE: Problem with Class-Path in Manifest
Date Thu, 01 Jan 2004 03:04:11 GMT


> -----Original Message-----
> From: Jeremy Whitlock [mailto:jwhitlock@starprecision.com]
> Sent: Thursday, 1 January 2004 7:27 AM
> To: Ant
> Subject: Problem with Class-Path in Manifest
> 
> 
> Ant,
>                 I am currently having to add jars to my Class-Path
> manually like so:
>  
> <property name="runtime.classpath" value="../lib/concurrent.jar
> ../lib/jdbc-MySQL.jar ../lib/jdbc-Oracle.jar ../lib/jdbc-PostgreSQL.jar
> ../lib/kunststoff.jar ../lib/jdom.jar ../conf"/>
>  
> This works great when building my jar and everything is good but I'd
> like to build it dynamically so I tried this:
>  
> <!-- classpath -->
>     <path id="classpath">
>                 <pathelement path="${basedir}" />
>                 <fileset dir="lib" >
>                 <include name="*.jar" />
>                 <include name="*.zip" />
>                 </fileset>
>                 <pathelement path="${conf.dir}"/>
>     </path>
>  
> <property name="runtime.classpath" refid="classpath"/>
>  
> This works in the sense that the Class-Path is fully dynamic and no
> matter what I add to the ${basedir}/lib folder, it will be included in
> the Class-Path if it's a .jar or a .zip.  Well, when I do this, the .jar
> will not execute where as before it did.  Can someone help me fix this
> or diagnose the problem?  It seems like a bug since something so useful
> aught to be usable.  Thanks,
> 

Jar classpaths in a manifest are space separated. Try a pathconvert

    <pathconvert dirsep="/" pathsep=" " property="manifest.classpath">
      <map from="${lib.app.dir}" to="lib"/>
      <path>
        <fileset dir="${lib.app.dir}">

Conor

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


Mime
View raw message