Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hk2-config missing from published maven artifacts #381

Open
glassfishrobot opened this issue Apr 10, 2018 · 4 comments
Open

hk2-config missing from published maven artifacts #381

glassfishrobot opened this issue Apr 10, 2018 · 4 comments

Comments

@glassfishrobot
Copy link

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

@glassfishrobot
Copy link
Author

@rgenna-oracle Commented
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

@glassfishrobot
Copy link
Author

@romain-grecourt Commented
"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.

@glassfishrobot
Copy link
Author

@rgenna-oracle Commented
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
Author

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

No branches or pull requests

1 participant