You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Todd Chambery <tc...@hotmail.com> on 2001/12/05 16:17:23 UTC

including manifest file in

Hi,

I am again wrestling with the <ejbjar> task, this time trying to include the
manifest.mf file contained in the descriptors directory with the ejb jar.
The problem is, Ant is not using the manifest.mf contained in the descriptor
directory and is overwriting it with a (basically) empty one.

The ejbjar task doc lists the following as attributes:

    flatdestdir
    classpath
    genericjarsuffix
    basenameterminator
    basejarname
    naming
    destdir
    srcdir
    descriptordir

though the Ejbjar.java file suggests a hidden feature(?):

     /**
      * Set the Manifest file to use when jarring.
      *
      * As of EJB 1.1, manifest files are no longer used to configure the
EJB. However, they
      * still have a vital importance if the EJB is intended to be packaged
in an EAR file.
      * By adding "Class-Path" settings to a Manifest file, the EJB can look
for classes inside
      * the EAR file itself, allowing for easier deployment. This is
outlined in the J2EE
      * specification, and all J2EE components are meant to support it.
      */
     public void setManifest(File manifest) {
         config.manifest = manifest;
     }

The comment states exactly why I need to include the existing manifest, viz.
it contains the classpath used by the .ear file.  I included the manifest
attribute in my <ejbjar> task, but simply using

  <ejbjar         srcdir                ="${ejbjar.classes.dir}"
                    destdir                    ="${deploy.dir}"
                    descriptordir
="${project.root}/ant_descriptors"
                    flatdestdir               ="true"
                    genericjarsuffix     =".jar"
                    manifest               ="MANIFEST.MF">

results in

    [ejbjar] building session_foo.jar with 6 files

    BUILD FAILED

    b:\d2v1\build.xml:264: Unable to read manifest

changing the manifest filename to "/MANIFEST.MF", "META-INF/MANIFEST.MF", or
"/META-INF/MANIFEST.MF" has no impact on this unfortunate outcome.

System spec: ant 1.4.1, NT 4.0sp6, jdk1.3.1_01


thanks in advance

Todd


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: including manifest file in

Posted by Alexander Syedin <ac...@sunbay.com>.
Todd,
seems that there is no way to correlate DD path with path to manifest file. Only one manifest file can be specified in ejbjar task and it will be shared among all generated jar files. AFAIK there is three solutions:
1) Use one manifest for all jars
2) Call <ejbjar> for each DD
3) Write your own DeploymentTool ;)

--
SY. Alexander Syedin

On 05 Dec 2001 at 11:54:33, Todd Chambery wrote:
> That would probably work, except that each descriptor is in its own
> directory:
> 
>     ant_descriptors
>         foo
>             meta-inf
>                 foo-ejb-jar.xml
>                 manifest.mf
>         bar
>             meta-inf
>                 bar-ejb-jar.xml
>                 manifest.mf
> 
> Basically, there is no constant absolute path.  I tried
> 
>     manifest    ="${project.root}/ant_descriptors/**/MANIFEST.MF"
> 
> but that gets the same:
> 
> java.io.FileNotFoundException:
> B:\project.root\ant_descriptors\**\MANIFEST.MF (The filename, directory
> name, or volume label syntax is incorrect)
> 
> This is related to the problem of grabbing the WebSphere specific .xmi files
> related to the particular current directory in which the task is operating:
> <ejbjar> can only grab from some absolute base dir.   I'm hoping I don't
> have to write a WebSphere optional task, but this kind of nitty work
> probably has to be done in the java code behind the scenes.
> 
> Just as an aside, has anyone heard of a completed WebSphere task (I'm not a
> wizard coder)? There used to be some code in the ant archives, but I
> couldn't find it the last time I looked.
> 
> 
> Todd
> 
> ----- Original Message -----
> From: "Alexander Syedin" <ac...@sunbay.com>
> To: "Ant Users List" <an...@jakarta.apache.org>
> Sent: Wednesday, December 05, 2001 11:22 AM
> Subject: Re: including manifest file in <ejbjar>
> 
> 
> > Hi Todd,
> > have you tryed to specify absolute path to manifest file (e.g.
> manifest="${basedir}/manifest.mf") ? Works fine for me.
> > --
> > SY. Alexander Syedin
> >
> > On 05 Dec 2001 at 10:17:23, Todd Chambery wrote:
> > > Hi,
> > >
> > > I am again wrestling with the <ejbjar> task, this time trying to include
> the
> 
> <snip>
> 
> > > thanks in advance
> > >
> > > Todd
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: build succesfull...test failed

Posted by Scott Jeppesen <je...@corp.earthlink.net>.
Crap sorry....wrong list.....

-----Original Message-----
From: Scott Jeppesen [mailto:jeppesens@corp.earthlink.net] 
Sent: Wednesday, December 05, 2001 10:29 AM
To: 'Ant Users List'
Subject: build succesfull...test failed

Hello,
I'm using Velocity 1.1.....I just ran ant in the velocity directory and
it ran fine. However, when I ran "ant test" it generated this
error....what's wrong?

Test-template:
	[echo] Running Template tests...
	[java] Class not found
"org.apache.velocity.test.TemplateTestCase"

BUILD FAILED

C:\velocity\build\testcases.xml:75: Java returned: -1

Total Time: 2 seconds



Any help is appreciated...
-SJ


--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


build succesfull...test failed

Posted by Scott Jeppesen <je...@corp.earthlink.net>.
Hello,
I'm using Velocity 1.1.....I just ran ant in the velocity directory and
it ran fine. However, when I ran "ant test" it generated this
error....what's wrong?

Test-template:
	[echo] Running Template tests...
	[java] Class not found
"org.apache.velocity.test.TemplateTestCase"

BUILD FAILED

C:\velocity\build\testcases.xml:75: Java returned: -1

Total Time: 2 seconds



Any help is appreciated...
-SJ


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: including manifest file in

Posted by Todd Chambery <tc...@hotmail.com>.
That would probably work, except that each descriptor is in its own
directory:

    ant_descriptors
        foo
            meta-inf
                foo-ejb-jar.xml
                manifest.mf
        bar
            meta-inf
                bar-ejb-jar.xml
                manifest.mf

Basically, there is no constant absolute path.  I tried

    manifest    ="${project.root}/ant_descriptors/**/MANIFEST.MF"

but that gets the same:

java.io.FileNotFoundException:
B:\project.root\ant_descriptors\**\MANIFEST.MF (The filename, directory
name, or volume label syntax is incorrect)

This is related to the problem of grabbing the WebSphere specific .xmi files
related to the particular current directory in which the task is operating:
<ejbjar> can only grab from some absolute base dir.   I'm hoping I don't
have to write a WebSphere optional task, but this kind of nitty work
probably has to be done in the java code behind the scenes.

Just as an aside, has anyone heard of a completed WebSphere task (I'm not a
wizard coder)? There used to be some code in the ant archives, but I
couldn't find it the last time I looked.


Todd

----- Original Message -----
From: "Alexander Syedin" <ac...@sunbay.com>
To: "Ant Users List" <an...@jakarta.apache.org>
Sent: Wednesday, December 05, 2001 11:22 AM
Subject: Re: including manifest file in <ejbjar>


> Hi Todd,
> have you tryed to specify absolute path to manifest file (e.g.
manifest="${basedir}/manifest.mf") ? Works fine for me.
> --
> SY. Alexander Syedin
>
> On 05 Dec 2001 at 10:17:23, Todd Chambery wrote:
> > Hi,
> >
> > I am again wrestling with the <ejbjar> task, this time trying to include
the

<snip>

> > thanks in advance
> >
> > Todd


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: including manifest file in

Posted by Alexander Syedin <ac...@sunbay.com>.
Hi Todd,
have you tryed to specify absolute path to manifest file (e.g. manifest="${basedir}/manifest.mf") ? Works fine for me.
--
SY. Alexander Syedin

On 05 Dec 2001 at 10:17:23, Todd Chambery wrote:
> Hi,
> 
> I am again wrestling with the <ejbjar> task, this time trying to include the
> manifest.mf file contained in the descriptors directory with the ejb jar.
> The problem is, Ant is not using the manifest.mf contained in the descriptor
> directory and is overwriting it with a (basically) empty one.
> 
> The ejbjar task doc lists the following as attributes:
> 
>     flatdestdir
>     classpath
>     genericjarsuffix
>     basenameterminator
>     basejarname
>     naming
>     destdir
>     srcdir
>     descriptordir
> 
> though the Ejbjar.java file suggests a hidden feature(?):
> 
>      /**
>       * Set the Manifest file to use when jarring.
>       *
>       * As of EJB 1.1, manifest files are no longer used to configure the
> EJB. However, they
>       * still have a vital importance if the EJB is intended to be packaged
> in an EAR file.
>       * By adding "Class-Path" settings to a Manifest file, the EJB can look
> for classes inside
>       * the EAR file itself, allowing for easier deployment. This is
> outlined in the J2EE
>       * specification, and all J2EE components are meant to support it.
>       */
>      public void setManifest(File manifest) {
>          config.manifest = manifest;
>      }
> 
> The comment states exactly why I need to include the existing manifest, viz.
> it contains the classpath used by the .ear file.  I included the manifest
> attribute in my <ejbjar> task, but simply using
> 
>   <ejbjar         srcdir                ="${ejbjar.classes.dir}"
>                     destdir                    ="${deploy.dir}"
>                     descriptordir
> ="${project.root}/ant_descriptors"
>                     flatdestdir               ="true"
>                     genericjarsuffix     =".jar"
>                     manifest               ="MANIFEST.MF">
> 
> results in
> 
>     [ejbjar] building session_foo.jar with 6 files
> 
>     BUILD FAILED
> 
>     b:\d2v1\build.xml:264: Unable to read manifest
> 
> changing the manifest filename to "/MANIFEST.MF", "META-INF/MANIFEST.MF", or
> "/META-INF/MANIFEST.MF" has no impact on this unfortunate outcome.
> 
> System spec: ant 1.4.1, NT 4.0sp6, jdk1.3.1_01
> 
> 
> thanks in advance
> 
> Todd
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>