Repository: quarkusio/quarkus
Issue: Adding @IfBuildProfile("prod") annotation to one grpc service throws away all other services

**Describe the bug**
I have multiple grpc services defined in my proto file and corresponding implementations in java code. If I mark one implementation with annotation `@IfBuildProfile("prod")` and run application with prod profile, all other services disappear, grpcurl shows only one single service which I marked with annotation.

**Expected behavior**
All defined services should still be available in application including annotated service and all unannotated ones.

**Actual behavior**
Application starts with just one grpc service, the one I marked with `@IfBuildProfile("prod")` annotation


**To Reproduce**
Steps to reproduce the behavior:
1. Create two services in your proto file. Implement them In application. Run and check that both services are available (by calling them or by listing with `./grpcurl -plaintext localhost:9000 list`
2. Mark one service with `@IfBuildProfile("prod")` annotation
3. Run application with prod profile and try to call unmarked service. It will fail. Or try listing with `./grpcurl -plaintext localhost:9000 list` and you will see only one service (don't forget about `quarkus.grpc.server.enable-reflection-service = true`)

**Configuration**
```properties
# Add your application.properties here, if applicable.
quarkus.grpc.server.port = 9000
quarkus.grpc.server.enable-reflection-service = true
```

**Environment (please complete the following information):**
 - Quarkus version or git rev: 
1.7.1.Final

**Additional context**
My digging shows that `io.quarkus.grpc.runtime.GrpcContainer` injects services as `Instance<BindableService> services;` If any of the BindableService beans have some priority set it is prioritized over other BindableServices and all other services are thrown away. IfBuildProfile annotation is counted as "alternative priority" and it survives filtering in `ArcContainerImpl.resolve(Set<Bean<? extends X>> beans)` method

Changed files:
extensions/arc/deployment/src/main/java/io/quarkus/arc/deployment/BuildTimeEnabledProcessor.java

diff --git a/extensions/arc/deployment/src/main/java/io/quarkus/arc/deployment/BuildTimeEnabledProcessor.java b/extensions/arc/deployment/src/main/java/io/quarkus/arc/deployment/BuildTimeEnabledProcessor.java
index d93b1788df7..596f1437b7a 100644
--- a/extensions/arc/deployment/src/main/java/io/quarkus/arc/deployment/BuildTimeEnabledProcessor.java
+++ b/extensions/arc/deployment/src/main/java/io/quarkus/arc/deployment/BuildTimeEnabledProcessor.java
@@ -18,6 +18,7 @@
 import org.jboss.logging.Logger;
 
 import io.quarkus.arc.processor.AnnotationsTransformer;
+import io.quarkus.arc.processor.AnnotationsTransformer.TransformationContext;
 import io.quarkus.arc.processor.DotNames;
 import io.quarkus.arc.processor.Transformation;
 import io.quarkus.arc.profile.IfBuildProfile;
@@ -146,18 +147,18 @@ public void transform(TransformationContext ctx) {
                 if (ctx.isClass()) {
                     DotName classDotName = target.asClass().name();
                     if (classTargets.containsKey(classDotName)) {
-                        transformBean(target, ctx.transform(), classTargets.get(classDotName));
+                        transformBean(target, ctx, classTargets.get(classDotName));
                     }
                 } else if (ctx.isMethod()) {
                     MethodInfo method = target.asMethod();
                     if (methodTargets.containsKey(method)) {
-                        transformBean(target, ctx.transform(), methodTargets.get(method));
+                        transformBean(target, ctx, methodTargets.get(method));
                     }
                 } else if (ctx.isField()) {
                     FieldInfo field = target.asField();
                     String uniqueFieldName = toUniqueString(field);
                     if (fieldTargets.containsKey(uniqueFieldName)) {
-                        transformBean(target, ctx.transform(), fieldTargets.get(uniqueFieldName));
+                        transformBean(target, ctx, fieldTargets.get(uniqueFieldName));
                     }
                 }
             }
@@ -168,32 +169,18 @@ private String toUniqueString(FieldInfo field) {
         return field.declaringClass().name().toString() + "." + field.name();
     }
 
-    private void transformBean(AnnotationTarget target, Transformation transform, boolean enable) {
-        if (enable) {
-            enableBean(transform);
-        } else {
-            disableBean(target, transform);
+    private void transformBean(AnnotationTarget target, TransformationContext ctx, boolean enabled) {
+        if (!enabled) {
+            Transformation transform = ctx.transform();
+            if (target.kind() == Kind.CLASS) {
+                // Veto the class
+                transform.add(DotNames.VETOED);
+            } else {
+                // Add @Alternative to the producer
+                transform.add(DotNames.ALTERNATIVE);
+            }
+            transform.done();
         }
-        transform.done();
-    }
-
-    private void enableBean(Transformation transform) {
-        transform.add(DotNames.ALTERNATIVE_PRIORITY,
-                createAlternativePriority());
     }
 
-    private AnnotationValue createAlternativePriority() {
-        // use Integer.MAX_VALUE - 1 to avoid having conflicts with enabling beans via config
-        return AnnotationValue.createIntegerValue("value", Integer.MAX_VALUE - 1);
-    }
-
-    private void disableBean(AnnotationTarget target, Transformation transform) {
-        if (target.kind() == Kind.CLASS) {
-            // Veto the class
-            transform.add(DotNames.VETOED);
-        } else {
-            // Add @Alternative to the producer
-            transform.add(DotNames.ALTERNATIVE);
-        }
-    }
 }