Quarkus does not select bean programatically

I’m trying to select the bean programatically, but quarkus does not injected the bean and throw an exception. It’s not supported ?

public enum ReportType {
    ONE,
    TWO
}
@Qualifier
@Retention(RUNTIME)
@Target({METHOD, PARAMETER, FIELD, TYPE})
@Documented
public @interface Report {

    ReportType value();

    public static final class Literal extends AnnotationLiteral<Report> implements Report {

        private final ReportType value;

        public static Literal of(ReportType value) {
            return new Literal(value);
        }

        private Literal(ReportType value) {
            this.value = value;
        }

        public ReportType value() {
            return value;
        }
    }
}
public interface CommonnInterface {
    void call();
}
@Report(value = ReportType.ONE)
public class ReportOneBusiness implements CommonnInterface {

    @Override
    public void call() {
        System.out.println("Hello");
    }
}

And when we call

        CommonnInterface commonnInterface = CDI.current()
                .select(
                        CommonnInterface.class,
                        Report.Literal.of(ReportType.ONE)
                ).get();

No bean found for required type [interface org.business.CommonnInterface] and qualifiers [[@org.cdi.Report(value=ONE)]]

Answer

You likely need to make the beans unremoveable using the @io.quarkus.arc.Unremovable annotation.

See this for more details.