ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marc Portier" <Marc.Port...@the-ecorp.com>
Subject RE: adding class-path to manifest
Date Thu, 12 Apr 2001 14:55:59 GMT
John, 
looks great, will try out.
guess this covers more then the running question of this thread
quite sure this is usefull

is this in the optional packages in any near future?
or does this run as a feature preview for some next <jar> task?

-marc=

> -----Original Message-----
> From: John Kohler [mailto:jkohler@daforma.com]
> Sent: donderdag 12 april 2001 16:07
> To: 'ant-user@jakarta.apache.org'
> Subject: RE: adding class-path to manifest
> 
> 
> I've developed a task that will create a jar from a 
> set of 'root' classes, including all dependant classes
> along with other arbitrary files.  
> 
> Moreover, you can specify the content of the manifest file
> directly in the build.xml, e.g.:
> 
> <genjar jarfile="theJarFile.jar">
>   <class name="foo.bar.Main" /> 
>   <classfilter>
>     <exclude name="org."/>
>   </classfilter>
>   <resource pkg="foo.bar">
>     <fileset dir="images"/>
>   </resource>
>   <manifest>
>     <attribute name="Class-Path" value="./xerces.jar" />
>     <attribute name="Main-Class" value="foo.bar.Main" />
>   </manifest>
> </genjar>
> 
> This task will put in the jar, all files referenced
> by foo.bar.Main except those in the 'org.' package.
> Additionally it will include all files in the image
> directory (changing their package to foo.bar).
> And it creates a manifest with the 'Class-Path' and
> 'Main-Class' attributes.
> 
> I created this task because I do not like maintaining
> a seperate manifest.
> 
> Source and docs are attached, hope it's useful.
> 
> John Kohler
> 


Mime
View raw message