ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Isaac Sparrow (Staff Engineer)" <isaac.spar...@visicomp.com>
Subject Re: adding class-path to manifest
Date Fri, 13 Apr 2001 09:27:24 GMT
Interesting question about the culprit adding the manifest file. I would
*guess* that the underlying jdk is generating it. If you manually create
a jar file, with out a manifest, you will find a directory in that jar
(META-INF) containing a manifest file. If I remember correctly, I've
seen this behavior on Windows 98/NT and Linux while manually creating
jar files.

Thanks for further clarifying my comments on the jar task.

--Isaac Sparrow

Marc Portier wrote:
> 
> taking this step by step:
> 1. you create your build file as suggested by Isaac
>  <jar
>     jarfile="NameofJartoCreate.jar"
> 
> basedir="wheretojarfrom_is_a_directory_that_holds_NO_Manifest.mf_in_either_s
> ubdir"
>     manifest="yourManuallyEdited.mf"
>  />
> 2. you manually edit your own Manifest file, but you don't put it in the
> basedir somewhere
>   _manually_ means you edit yourself the file to hold the line:
>     Class-Path: struts.jar
> 3. instead you put it and call it as denoted in the manifest attribute of
> the jar task
> 
> said all that I do understand what you're getting at, I think...
> the point is that you probably already have some ${cp} property you're using
> in some <target name="testrun" />
> and you (well, we all, I guess) hate the idea that you manually have to sync
> additional needed jars in both the build.xml and the infamous
> yourManuallyEdited.mf
> (by the way: the same holds for the Main-Class manifest entry that doubles
> to the java classname="Main-Class" attribute, this for the java -jar
> addicts)
> 
> would be interesting to understand how the jar task now generates it's own
> Manifest.mf... and have a look into how that could be extended to maybe
> slide in a line or 2?  (maybe it's not even the jar task doing it but the
> underlaying JDK utility?)... that, or a manifest-building task preceeding
> the jar task?
> 
> -marc=
> > -----Original Message-----
> > From: G.L. Grobe [mailto:gary@grobe.org]
> > Sent: donderdag 12 april 2001 0:59
> > To: ant-user@jakarta.apache.org
> > Subject: Re: adding class-path to manifest
> >
> >
> > So if NameofJartoCreate.jar is the jar i'm creating and it
> > depends on an
> > external jar called struts.jar, where is the file struts.jar
> > or it's path to
> > struts.jar being added? All I can see from here is that I'd know what
> > manifest to use.
> >
> > <jar
> >     jarfile="NameofJartoCreate.jar"
> >     basedir="wheretojarfrom"
> >     manifest="nameofManifestfile"
> > />
> >
> > Thnxs for replying
> >
> > ----- Original Message -----
> > From: "Isaac Sparrow (Staff Engineer)" <isaac.sparrow@visicomp.com>
> > To: <ant-user@jakarta.apache.org>
> > Sent: Wednesday, April 11, 2001 5:53 PM
> > Subject: Re: adding class-path to manifest
> >
> >
> > > "G.L. Grobe" wrote:
> > > >
> > > > Reposting for some help here.
> > > >
> > > > How do you tell Ant to add an external jar file to the
> > MANIFEST.MF that
> > > > my-ejb.jar file depends on? If I manually add the
> > MANIFEST.MF, it get's
> > > > ignored and Ant creates an empty one.
> > > >
> > > > I need this in the file (I think) as my ejb's are not finding the
> > correct
> > > > paths to this jar.
> > > >
> > > > Class-Path: ../struts.jar
> > > >
> > > > Any help much appreciated.
> > >
> > > I have ant add a manifest I have created like this:
> > >
> > > <jar
> > >    jarfile="NameofJartoCreate.jar"
> > >    basedir="wheretojarfrom"
> > >    manifest="nameofManifestfile"
> > > />
> > >
> > >
> > > Hope this helps!
> > >
> > > --
> > > --Isaac Sparrow
> > > --------------------------
> > > Staff Engineer
> > > VisiComp, Inc.
> > >
> > > http://www.visicomp.com
> > >
> >

-- 
--Isaac Sparrow
--------------------------
Staff Engineer
VisiComp, Inc.

http://www.visicomp.com

Mime
View raw message