Skip to content
This repository has been archived by the owner on Aug 31, 2018. It is now read-only.

hk2-config missing from published maven artifacts #380

Closed
rgenna-oracle opened this issue Apr 10, 2018 · 4 comments
Closed

hk2-config missing from published maven artifacts #380

rgenna-oracle opened this issue Apr 10, 2018 · 4 comments
Assignees

Comments

@rgenna-oracle
Copy link

rgenna-oracle commented Apr 10, 2018

I was trying to use the latest version of HK2 (2.5.0-b61) but was having trouble resolving the @ConfiguredBy annotation. Turns out the hk2-config (and config-types) artifacts don't appear to exist in recent releases.

It existed in this release - https://mvnrepository.com/artifact/org.glassfish.hk2/hk2/2.5.0-b56
But is missing starting in this release and going forward - https://mvnrepository.com/artifact/org.glassfish.hk2/hk2/2.5.0-b57

@rgenna-oracle
Copy link
Author

It turns out the hk2-config jar wasn’t what I actually wanted to locate the proper @ConfiguredBy & @configured annotations. The hk2-config jar does contain classes with those names but they are in the “org.jvnet.hk2.config” package, not the “org.glassfish.hk2.configuration.api” package. The “hk2-configuration-integration” is the jar which contains the correct classes, but the high level hk2 pom doesn’t pull that in.

Note, I'm working based on this example: https://javaee.github.io/hk2/configuration-example.html

@romain-grecourt
Copy link
Member

"hk2-config" is the old config sub-system used by GlassFish. It was moved to the GF workspace some time ago.

I guess the action item is to document the required dependencies.

@rgenna-oracle
Copy link
Author

I guess the part that was confusing was that the configuration-example doesn't tell you that you need to bring in an additional dependency in order to resovle the configuration related annotations. When using an older version of the hk2 high level pom.xml it pulled in the hk2-config aritfact which contained those annotations, but they were the wrong ones which was confusing. The newer version of hk2 doesn't have that dependency, which is fine if that's intentional, but I would think either the high level hk2 pom should pull in the hk2-configuration-integration as a dependency since, according do the docs "The org.glassfish.hk2:hk2 dependency has a dependency on all of the HK2 jars.", or it should be clearer in the documenation that if you're looking to work with the configuration related annotations you'll need this additional "hk2-configuration-integration" dependency in your build and runtime.

@glassfishrobot
Copy link
Contributor

Closing this as this issue is migrated to eclipse-ee4j/glassfish-hk2#381

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants