Use <pathconvert> with a <map>

    <fileset id="dsinfra-jars" dir="${jar-dir}">
      <include name="*.jar" />
      <include name="*.zip" />
      <exclude name="*_test.jar" />
    </fileset>

    <!-- Create pseudo Infra's JAR(s) with appropriate
         Class-Path: attribute in its manifest to avoid
         command line limitations with long classpath -->
    <pathconvert property="dsinfra-classpath"
                 refid="dsinfra-jars"
                 pathsep=" "
                 dirsep="/">
      <map from="${jar-dir}" to="all" />
    </pathconvert>

    <jar destfile="..." basedir="...">
      <manifest>
        <attribute name="Class-Path"
                   value="${dsinfra-classpath}"/>
...
      </manifest>
    </jar>

-----Original Message-----
From: Derek A. Bodin [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, January 22, 2003 10:12 AM
To: [EMAIL PROTECTED]
Subject: relative paths

When using the path element ant automatically converts the path to a
direct path, is there any way to keep the path relative?  I am trying to
do this for the class-path element of the manifest file so that I can
move an application to another computer and have it work there also,
thanks.
 
<path id="class.path">
            <fileset dir="src/lib">
                        <include name="**/*.jar"/>
            </fileset>
 </path>
 
-Derek

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to