eclipse / microprofile-metrics

microprofile-metrics
Apache License 2.0
100 stars 66 forks source link

Update to include beans.xml with bean-discovery-mode to all for tck tests #743

Closed Channyboy closed 2 years ago

Channyboy commented 2 years ago

MicroProfile Metrics 5.0 as part of MicroProfile 6 is to run solely with Jakarta EE 10 technologies.

CDI 4.0 has included the following change:

Removals, deprecations or backwards incompatible changes
The bean-discovery-mode attribute default to annotated and to use annotated as the default when an empty beans.xml is seen in a deployment

The TCK tests use to rely on the default behaviour where empty beans.xml resulted in a bean-discovery-mode of all. This PR is to use a beans.xml explicitly for the test applications where the discovery mode is all.

Emily-Jiang commented 2 years ago

@Channyboy I suggest you don't use bean-discovery-node=all as it will throw an error in CDI Lite, which would be used by MP 6.0. You should add bean defining annotations to the bean classes.