Search code examples
mavendependency-injectionwildflyweldjava-ee-8

Wildfly BOM doesn't include Weld


I'm using the Wildfly BOM (https://github.com/wildfly/boms/tree/20.x) to version my Wildfly dependencies in my Java EE project. Although the Wildlfy itself uses Weld for DI, but the BOM does not refer to any version of the same. In my view the whole point of using the BOM instead of specifying the deps one-by-one is to not have different versions at build time and at runtime, but this concept fails with Weld. I can now use a version from this dep with provided scope in my POMs, but at runtime the version included in Wildfly will be used anyway. Do I miss here something? Is there a reason why this dep is left out from the BOM?


Solution

  • The BOM includes the jakarta.enterprise:jakarta.enterprise.cdi-api API, but not the implementation. This is done in purpose as you should be relying on the API and not the implementation.