You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by "Marshall Schor (JIRA)" <ui...@incubator.apache.org> on 2009/09/14 16:27:57 UTC

[jira] Reopened: (UIMA-1273) Pear runtime pulls in all jar files in pear lib directory, no matter if they're on the classpath or not

     [ https://issues.apache.org/jira/browse/UIMA-1273?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marshall Schor reopened UIMA-1273:
----------------------------------


A user has pointed out that this behavior is documented, and it's even suggested that things in the lib do not have to be explicitly put on the PEAR classpath, in the UIMA References, section 6.1.4.5, where it says:

The buildComponentClasspath method of the PackageBrowser class builds a classpath string from what it finds in the CLASSPATH specification here, plus adds a classpath entry for all Jars in the lib directory. Because of this, *there is no need to specify Class Path entries for Jars in the lib directory*.

Because of this, there's a good likelyhood that this fix will break their Pear packages.  Also, I saw that the existing PEAR Wrapper implementation does log (at the CONFIG level) the final Classpath and Datapath that it sets up for the PEAR, so for debugging purposes, this information should be available in the uima log.  

Also, if a user puts a Jar into a PEAR lib file, and packages it as part of the PEAR, it seems to me that the intent of the user is to have that Jar on the classpath.

I think for these reasons, this change should be reversed.

> Pear runtime pulls in all jar files in pear lib directory, no matter if they're on the classpath or not
> -------------------------------------------------------------------------------------------------------
>
>                 Key: UIMA-1273
>                 URL: https://issues.apache.org/jira/browse/UIMA-1273
>             Project: UIMA
>          Issue Type: Bug
>          Components: Core Java Framework
>    Affects Versions: 2.2.2
>            Reporter: Thilo Goetz
>             Fix For: 2.3
>
>
> The pear runtime will not only use the classpath as defined in metadata/install.xml, it will also pick up any jar in the lib directory.  It even recurses down into subdirectories.  This is undocumented, and most unexpected.
> I chatted with Michael about this.  He thinks it may be because the same code that creates the classpath in the pear packager is used in the runtime.  The packager does collect all jar files it can find and puts them in the classpath, and the pear file.  That's fine for the packager, but not the runtime.  We should *either* have an explicit classpath, *or* use all jar files in the lib dir, but not both.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.