Bob Paulin created FELIX-4958:
---------------------------------
Summary: Import-Package not finding a package in dependency in
Apache Tika
Key: FELIX-4958
URL: https://issues.apache.org/jira/browse/FELIX-4958
Project: Felix
Issue Type: Bug
Components: Maven Bundle Plugin
Reporter: Bob Paulin
The Apache Tika project has a core and a parser project. The core project
contains a package org.apache.tika.parser.external which is exported from the
bundle. The following is generated in the Export-Package statement in the
MANIFEST.MF
{code}
org.apache.tika.parser.external;uses:="org.ap
ache.tika.parser,org.apache.tika.exception,org.apache.tika.mime,org.a
pache.tika.io,org.apache.tika.metadata,org.apache.tika.sax,org.xml.sa
x,org.w3c.dom,javax.xml.parsers,org.apache.tika.config";version="1.0.
0"
{code}
The parser project contains the tika-core project as a dependency and the
following instructions for the maven-bundle-plugin:
{code}
<instructions>
<Bundle-DocURL>${project.url}</Bundle-DocURL>
<Bundle-Activator>
org.apache.tika.parser.internal.Activator
</Bundle-Activator>
<Import-Package>
org.w3c.dom,
org.apache.tika.*,
*;resolution:=optional
</Import-Package>
</instructions>.
{code}
I'm expecting this to import the classes in the org.apache.tika.parser.external
package. However I do not see any of the classes in the parser project's
Import-Package entry.
I was only able to get the classes to show up by adding an explicit
Export-Package instruction as follows:
{code}
<instructions>
<Bundle-DocURL>${project.url}</Bundle-DocURL>
<Bundle-Activator>
org.apache.tika.parser.internal.Activator
</Bundle-Activator>
<Import-Package>
org.w3c.dom,
org.apache.tika.*,
*;resolution:=optional
</Import-Package>
<Export-Package>
org.apache.tika.parser.*
</Export-Package>
</instructions>
{code}
This is not what I'd desired to do since this will re-export the core packages
from the parser project. Any thoughts on why this is happening?
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)