[
https://issues.apache.org/jira/browse/GERONIMO-4251?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12665775#action_12665775
]
Frank Meilinger commented on GERONIMO-4251:
-------------------------------------------
Hi Ivan,
right! This should be the right beavior.
You may download the JEE 5 specification at
http://jcp.org/aboutJava/communityprocess/final/jsr244/index.html
The name of the document is: javaee-5_0-fr-spec.pdf
But here is a copy of the relevant section (of special interest here is point
2.):
============================
EE.8.2.1 Bundled Libraries
Libraries bundled with an application may be referenced in the following ways:
1. A JAR format file (such as a .jar file, .war file, or .rar file) may
reference a
.jar file or directory by naming the referenced .jar file or directory
in a
Class-Path header in the referencing JAR file's Manifest file. The
referenced
.jar file or directory is named using a URL relative to the URL of the
refer-
encing JAR file. The Manifest file is named META-INF/MANIFEST.MF in the
JAR
file. The Class-Path entry in the Manifest file is of the form
Class-Path: list-of-jar-files-or-directories-separated-by-spaces
The Java EE deployment tools must process all such referenced files and
directories when processing a Java EE module. Any deployment descriptors
in referenced .jar files must be ignored when processing the referencing
.jar
file. The deployment tool must install the .jar files and directories in
a way
that preserves the relative references between the files. Typically this
is done
by installing the .jar files into a directory hierarchy that matches the
original
application directory hierarchy. All referenced .jar files or
directories must
appear in the logical class path of the referencing JAR files at runtime.
Only JAR format files or directories containing class files or resources
to be
loaded directly by a standard class loader should be the target of a
Class-Path
reference; such files are always named with a .jar extension. Top level
JAR
files that are processed by a deployment tool should not contain
Class-Path
entries; such entries would, by definition, reference other files
external to the
deployment unit. A deployment tool is not required to process such
external
references.
2. A .ear file may contain a directory that contains libraries packaged in
JAR
files. The library-directory element of the .ear file's deployment
descriptor
contains the name of this directory. If a library-directory element
isn't spec-
ified, or if the .ear file does not contain a deployment descriptor,
the directory
named lib is used. An empty library-directory element may be used to
spec-
ify that there is no library directory.
All files in this directory (but not subdirectories) with a .jar
extension must
be made available to all components packaged in the EAR file, including
application clients. These libraries may reference other libraries,
either bun-
dled with the application or installed separately, using any of the
techniques
described herein.
3. A web application may include libraries in the WEB-INF/lib directory.
See the
Servlet specification for details. These libraries may reference other
libraries,
either bundled with the application or installed separately, using any
of the
techniques described herein.
============================
hope this helps.
Greetings and thanks for working on this issue,
Frank
> Class-Path entry in WAR manifest didn't work if entry is a directory
> --------------------------------------------------------------------
>
> Key: GERONIMO-4251
> URL: https://issues.apache.org/jira/browse/GERONIMO-4251
> Project: Geronimo
> Issue Type: Bug
> Security Level: public(Regular issues)
> Affects Versions: 2.1, 2.1.1, 2.1.2, 2.1.3, 2.1.4, 2.2
> Environment: Geronimo 2.1.2 on Windows XP
> Reporter: Frank Meilinger
> Fix For: 2.1.4, 2.2
>
>
> Hi,
> it's not possible to define an Class-Path element in the WARs manifest, if
> it's a directory. I try to access jar files packed in the EARs lib/
> directory from within a WAR module.
> e.g. this will work:
> Class-Path: a.jar b.jar
> but this doesn't work:
> Class-Path: lib/
> If a directory is specifyed, I receive the following error:
> 15:20:13,170 ERROR [DirectoryHotDeployer] Unable to deploy: Manifest class
> path
> entries must end with the .jar extension (J2EE 1.4 Section 8.2): module=../
> org.apache.geronimo.common.DeploymentException: Manifest class path entries
> must
> end with the .jar extension (J2EE 1.4 Section 8.2): module=../
> at
> org.apache.geronimo.deployment.DeploymentContext.addManifestClassPath
> (DeploymentContext.java:419)
> ...
> I think this is definitely an error because the JEE5 specification section
> 8.2.1 explicitely allows directories in manifest Class-Path entries.
> See discussion:
> http://www.nabble.com/EAR-bundle-dir-classpath-issue-tt18982334s134.html
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.