Lucene - Core
  1. Lucene - Core
  2. LUCENE-3172

installation problems on lucene-misc OSGI bundle

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.3, 4.0-ALPHA
    • Component/s: None
    • Labels:
      None
    • Environment:

      felix 3.2.2

      Description

      lucene-misc contrib module has two package names equals to the core version: org.apache.lucene.index and org.apache.lucene.store. For theese modules we need to configure the creation of the bundles so that the OSGI repository recognize theese packages as merged else we get a 'uses constraint violation' error in the installation.

      The solution is to mark the packages as mergeables adding a configuration in the maven-bunde-plugin:

      <configuration>
      <instructions>
      <Export-Package>*;-split-package:=merge-first</Export-Package>
      </instructions>
      </configuration>

      the * represents the package names. We could put org.apache.lucene.* too

      1. lucene_trunk.patch
        0.6 kB
        Luca Stancapiano

        Activity

        Hide
        Luca Stancapiano added a comment -

        This patch resolves the problem

        Show
        Luca Stancapiano added a comment - This patch resolves the problem
        Hide
        Steve Rowe added a comment -

        Committed:

        • r1131492: trunk
        • r1131493: branch_3x

        Thanks Luca!

        Show
        Steve Rowe added a comment - Committed: r1131492: trunk r1131493: branch_3x Thanks Luca!
        Hide
        Uwe Schindler added a comment -

        I think you should have similar problems with the analysis module!

        Show
        Uwe Schindler added a comment - I think you should have similar problems with the analysis module!
        Hide
        Luca Stancapiano added a comment -

        The problem is when you have the same package name. If you have subpackages in a different bundle there is no problem. However the patch resolves all modules in Lucene and Solr

        Show
        Luca Stancapiano added a comment - The problem is when you have the same package name. If you have subpackages in a different bundle there is no problem. However the patch resolves all modules in Lucene and Solr
        Hide
        Gunnar Wagenknecht added a comment -

        FYI, I usually also create an "umbrella" bundle which has a Require-Bundle dependency on all the Lucene bundles with such split-package headers. It does not contain any class files but just re-exports the "merged" packages without a split-package header. This allows client bundles to do a vanilla Import-Package. Otherwise, any downstream client will be forced to add the special split-package info to their Import-Package declaration.

        Show
        Gunnar Wagenknecht added a comment - FYI, I usually also create an "umbrella" bundle which has a Require-Bundle dependency on all the Lucene bundles with such split-package headers. It does not contain any class files but just re-exports the "merged" packages without a split-package header. This allows client bundles to do a vanilla Import-Package. Otherwise, any downstream client will be forced to add the special split-package info to their Import-Package declaration.
        Hide
        Robert Muir added a comment -

        bulk close for 3.3

        Show
        Robert Muir added a comment - bulk close for 3.3

          People

          • Assignee:
            Steve Rowe
            Reporter:
            Luca Stancapiano
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development