@@ -0,0 +1,2202 @@
+/**%0A * Copyright (C) 2020 Red Hat, Inc.%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *         http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage org.commonjava.indy.client.core.metric;%0A%0Aimport org.commonjava.cdi.util.weft.config.DefaultWeftConfig;%0Aimport org.commonjava.cdi.util.weft.config.WeftConfig;%0Aimport org.commonjava.o11yphant.metrics.TrafficClassifier;%0Aimport org.commonjava.o11yphant.metrics.conf.DefaultMetricsConfig;%0Aimport org.commonjava.o11yphant.metrics.conf.MetricsConfig;%0Aimport org.commonjava.o11yphant.metrics.sli.GoldenSignalsMetricSet;%0Aimport org.commonjava.o11yphant.metrics.system.StoragePathProvider;%0A%0Aimport javax.enterprise.inject.Alternative;%0Aimport javax.enterprise.inject.Produces;%0A%0A/**%0A * This producer is used to provide the missing CDI deps for indy client metrics sets. Now all%0A * produces provided alternative ones, because it will break indy metrics providers. In future the%0A * indy-client libs will be extracted to a single lib, so then we will set these providers as default.%0A */%0Apublic class ClientMetricsProducer%0A%7B%0A    @Produces%0A    @Alternative%0A    public TrafficClassifier getClientTrafficClassifier()%0A    %7B%0A        return new ClientTrafficClassifier();%0A    %7D%0A%0A    @Produces%0A    @Alternative%0A    public GoldenSignalsMetricSet getClientMetricSet()%0A    %7B%0A        return new ClientGoldenSignalsMetricSet();%0A    %7D%0A%0A    @Produces%0A    @Alternative%0A    public MetricsConfig getMetricsConfig()%0A    %7B%0A        return new DefaultMetricsConfig();%0A    %7D%0A%0A    @Produces%0A    @Alternative%0A    public WeftConfig getWeftConfig()%0A    %7B%0A        return new DefaultWeftConfig();%0A    %7D%0A%0A    @Produces%0A    @Alternative%0A    public StoragePathProvider getStoragePathProvider()%0A    %7B%0A        return () -%3E null;%0A    %7D%0A%7D%0A

add a ClientMertrircsProducer to solve CDI transistive deps missing problems