ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <DDevie...@lgc.com>
Subject RE: Setting filenames in FileSet to value of Class-Path in MANIFE ST.MF
Date Tue, 20 Aug 2002 15:26:45 GMT
See below: --DD

    <!-- Generate Manifest file -->
    <pathconvert property="xxx-classpath-1"
                 dirsep="/"
                 pathsep=" ${nl} "
                 refid="xxx.jar-files">
      <map from="${xxx.home}\jar" to="../dsp/jar" />
    </pathconvert>
    <property name="xxx-classpath"
              value="./plugin.jar ${nl} ${xxx-classpath-1}" />

    <copy file="src/com/acme/yyy/Yyy.manifest"
          tofile="build/Yyy.manifest"
          overwrite="yes">
      <filterset>
        <filter token="CLASSPATH" value="${xxx-classpath}" />
        <filter token="BUILDNUM" value="${MMdd}" />
      </filterset>
    </copy>

with src/com/acme/yyy/Yyy.manifest:

Main-Class: com.lgc.yyy.Main
Class-Path: 
 @CLASSPATH@
Specification-Title: YYY
Specification-Version: 2003.2.0.1
Specification-Vendor: ACME
Implementation-Title: com.lgc.yyy
Implementation-Version: 2003.2.0.1.@BUILDNUM@.01
Implementation-Vendor: ACME
Implementation-Vendor-Id: com.acme

-----Original Message-----
From: Jussi Iinatti [mailto:jussi.iinatti@emillion.fi] 
Sent: Tuesday, August 20, 2002 4:42 AM
To: ant-user@jakarta.apache.org
Subject: Setting filenames in FileSet to value of Class-Path in MANIFEST.MF

Hi.

I am creating a MANIFEST file and I want to add a Class-Path header
field into it - and have the names of files in a FileSet as a value.

E.g. 'Class-Path: servlet.jar infobus.jar acme/beans.jar'

Is there a way to set a list of files in a FileSet to the value
of the Class-Path header?

***
<fileset id = "path" dir="/lib">
    <include name="*.jar"/>
</fileset>

<property name  = "ClassPath"
          refid = "path"/>

<manifest file="MANIFEST.MF">
	<attribute name="Class-Path"
                 value="${ClassPath}"/>
</manifest>
***

But the created manifest file includes something like an ID of an Object:

***
Manifest-Version: 1.0
Created-By: Apache Ant 1.5
Class-Path: org.apache.tools.ant.types.FileSet@281d4b
***

It seems that it makes no sense to use reference of the FileSet here,
but is there a way to get the names of the files in a FileSet?


Any suggestions?


	- Jussi -




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

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


Mime
View raw message