ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Conor MacNeill <co...@apache.org>
Subject Re: Generate manifest classpath with relative paths
Date Mon, 11 Jul 2005 12:06:52 GMT


Martin Olsson wrote:
> Hi,
> 
> At runtime my program is stored like this:
> 
> ./myprogram.jar
> ./lib/commons/commons-net.jar
> ./lib/commons/commons-configuration.jar
> ./lib/spring/spring_jar1.jar
> ./lib/spring/spring_jar2.jar
> ./lib/some/other/jarfile.jar
> 
> There is a ton of other .jar files too organized in the directory tree
> below ./lib/ and there is so many of them that I can't just put all of
> them directly in the lib directory.
> 

In the past I've used something like this

  <property name="lib.app.dir" location="lib/app"/>

    <pathconvert dirsep="/" pathsep=" " property="war.classpath">
      <map from="${lib.app.dir}" to="lib"/>
      <path>
        <fileset dir="${lib.app.dir}">
          <include name="*xwork*"/>
          <include name="*webwork*"/>
          <include name="*velocity*"/>
          <include name="*ognl*"/>

          <include name="*oscore*"/>
          <include name="*osuser*"/>
          <include name="*sitemesh*"/>
          <include name="*commons-logging*"/>
          <include name="*util-general*"/>
          <exclude name="*.tld"/>
        </fileset>
      </path>
    </pathconvert>


    <war webxml="${appconf.dir}/web.xml" warfile="${war.file}">

      <manifest>
        <attribute name="Class-Path" value="${war.classpath}"/>
      </manifest>

    ...


Some variation on that should get you going.

Conor

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


Mime
View raw message