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 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: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: including manifest file in ejbjar
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 [EMAIL PROTECTED] To: Ant Users List [EMAIL PROTECTED] 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: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: including manifest file in ejbjar
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 [EMAIL PROTECTED] To: Ant Users List [EMAIL PROTECTED] 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: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]