Repository: quarkusio/quarkus
Issue: Named Redis client injection not working when used in separate JAR

**Describe the bug**
We have an application scoped bean, defined in our common project and being used by other services, that utilizes `RedisClient`:
```
@ApplicationScoped
public class Service {

    @Inject
    @RedisClientName("second")
    RedisClient redisClient;
    ...
}
```
This common project is packaged as JAR and then used as a Maven dependency from other services.

We keep getting this error when starting those other services:
```
javax.enterprise.inject.spi.DeploymentException:
  javax.enterprise.inject.UnsatisfiedResolutionException: Unsatisfied dependency for type io.quarkus.redis.client.RedisClient and qualifiers [@RedisClientName(value = "second")]
```

We've defined an alternate Redis connection like this:
```
quarkus.redis.second.hosts=redis://localhost:6379
```
and made sure it's being used as expected by a Redis client defined in our service (not the common JAR!) like this:
```
    @Inject
    @RedisClientName("second")
    RedisClient redisClient;
```

Should it be possible to have a bean class contained in a dependency JAR and make it use Redis connection defined in the project that uses that JAR?

**Expected behavior**
Bean defined in a dependency JAR, which uses a Redis client annotated by `@RedisClientName`, properly using Redis connection defined in containing service.


Changed files:
extensions/redis-client/deployment/src/main/java/io/quarkus/redis/client/deployment/RedisClientProcessor.java

diff --git a/extensions/redis-client/deployment/src/main/java/io/quarkus/redis/client/deployment/RedisClientProcessor.java b/extensions/redis-client/deployment/src/main/java/io/quarkus/redis/client/deployment/RedisClientProcessor.java
index 8be65bfaef8..319d51f966a 100644
--- a/extensions/redis-client/deployment/src/main/java/io/quarkus/redis/client/deployment/RedisClientProcessor.java
+++ b/extensions/redis-client/deployment/src/main/java/io/quarkus/redis/client/deployment/RedisClientProcessor.java
@@ -16,13 +16,13 @@
 import org.jboss.jandex.IndexView;
 
 import io.quarkus.arc.deployment.AdditionalBeanBuildItem;
+import io.quarkus.arc.deployment.BeanArchiveIndexBuildItem;
 import io.quarkus.arc.deployment.SyntheticBeanBuildItem;
 import io.quarkus.deployment.Feature;
 import io.quarkus.deployment.annotations.BuildProducer;
 import io.quarkus.deployment.annotations.BuildStep;
 import io.quarkus.deployment.annotations.ExecutionTime;
 import io.quarkus.deployment.annotations.Record;
-import io.quarkus.deployment.builditem.ApplicationArchivesBuildItem;
 import io.quarkus.deployment.builditem.ExtensionSslNativeSupportBuildItem;
 import io.quarkus.deployment.builditem.FeatureBuildItem;
 import io.quarkus.deployment.builditem.nativeimage.RuntimeInitializedClassBuildItem;
@@ -80,13 +80,13 @@ RuntimeInitializedClassBuildItem initializeBulkTypeDuringRuntime() {
 
     @BuildStep
     @Record(ExecutionTime.RUNTIME_INIT)
-    public void produceRedisClient(RedisClientRecorder recorder, ApplicationArchivesBuildItem applicationArchives,
+    public void produceRedisClient(RedisClientRecorder recorder, BeanArchiveIndexBuildItem indexBuildItem,
             BuildProducer<SyntheticBeanBuildItem> syntheticBeans,
             VertxBuildItem vertxBuildItem) {
         Set<String> clientNames = new HashSet<>();
         clientNames.add(RedisClientUtil.DEFAULT_CLIENT);
 
-        IndexView indexView = applicationArchives.getRootArchive().getIndex();
+        IndexView indexView = indexBuildItem.getIndex();
         Collection<AnnotationInstance> clientAnnotations = indexView.getAnnotations(REDIS_CLIENT_ANNOTATION);
         for (AnnotationInstance annotation : clientAnnotations) {
             clientNames.add(annotation.value().asString());