[ 
https://issues.apache.org/jira/browse/GERONIMO-4251?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12665799#action_12665799
 ] 

Frank Meilinger commented on GERONIMO-4251:
-------------------------------------------

Hi Ivan,

I've insertet a copy of the specification section. But here is a summary of my 
understanding:

a) If an .ear file has a /lib directory, all jar files in this directory (but 
not subdirectories) are AUTOMATICALLY added to the classpath of all components 
packaged in this .ear file (ejbs, wars, rars, application clients, ...). It's 
not necessary to specify this /lib directory in the modules descriptor via the 
classpath element. The /lib directory is the default name, but the name of the 
directory may be changed in the .ear deployment descriptor (the 
library-directory element).
This is described in section 2. in 8.2.1.

b) Additionally and independend of a) it should be possible to specify jar 
files AND DIRECTORIES in the classpath element of modules deployment 
descriptors.

e.g. In a WAR manifest the ClassPath entry should allow the following:

ClassPath: a.jar b.jar /myLibs c.jar /x/aDirectory/

Which result in a classpath with includes a.jar, b.jar, all jar files in the 
directory /myLibs, c.jar and all jar files in the directory /x/aDirectory.

This behavior is described in section 1. in 8.2.1. in the following sentence:
 "...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.  ..."

Greetings,
 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.

Reply via email to