hk2
  1. hk2
  2. HK2-173

HK2 can not be Relocated/Privatized

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.2.0
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:

      JDK 1.7.0_25
      HK2 2.2.0-b26
      Linux Mint 14 32bit

      Description

      Relocating HK2 so that it can be used privately in an uber jar does not work. I have created a test case for this issue:

      https://github.com/saden1/hk2-spi

      Notes:

      1. The resources module contains alterned versions of hk2's meta-info files
      2. The spi module contains a simple contract interface
      3. The impl module generated an uber jar that relocated hk2 and its resources
      and it also contains an implementation of the contract in the spi module.
      4. The demo module has a test class that tries to use the relocated version of
      ServiceLocatorUtilities to try and load the contract.

      When you try to execute DemoTest case createAndPopulateServiceLocator method throws a NPE because it can not find DynamicConfigurationService.

        Activity

        Hide
        saden added a comment -

        Any update on this issue would be appreciated.

        Show
        saden added a comment - Any update on this issue would be appreciated.

          People

          • Assignee:
            jwells
            Reporter:
            saden
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: