Hang in build when upgrading to 1.8.0 when library class' superclass is not present on classpath
**Describe the bug**
My application builds with 1.7.3, but with 1.8.0 the quarkus:build step hangs after printing out a warning:
[WARNING] [io.quarkus.arc.processor.BeanArchives] Failed to index org.apache.cxf.phase.AbstractPhaseInterceptor: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader


One of the libraries we depend on has an optional dependency on CXF. We do not use the XML parts of that library, so the AbstractPhaseInterceptor subclass the library defines is never loaded, and do not have CXF on the app classpath.


Stopping it in a debugger, the problem appears to be in the loop at https://github.com/quarkusio/quarkus/blob/master/extensions/arc/deployment/src/main/java/io/quarkus/arc/deployment/AutoAddScopeProcessor.java#L102

superName is "org.apache.cxf.phase.AbstractPhaseInterceptor", and superClass = index.getClassByName() return null. Since it is null, it skips the if block, and loops around again without changing superName, so the the same thing repeats. If getClassByName() it probably needs to break out of the loop, maybe returning false?


I can work around this by adding that library  (and the other couple of similar ones) as optional dependencies to my app as well, so they are on the build classpath.

**Expected behavior**
Build does not hang

**Actual behavior**
Build hangs


**To Reproduce**
I haven't manage to get it down to a simple reproducer yet

**Environment (please complete the following information):**
Quarkus 1.8.0.

diff --git a/extensions/arc/deployment/src/main/java/io/quarkus/arc/deployment/AutoAddScopeProcessor.java b/extensions/arc/deployment/src/main/java/io/quarkus/arc/deployment/AutoAddScopeProcessor.java
index ad84d645737..eb6eaf51c25 100644
--- a/extensions/arc/deployment/src/main/java/io/quarkus/arc/deployment/AutoAddScopeProcessor.java
+++ b/extensions/arc/deployment/src/main/java/io/quarkus/arc/deployment/AutoAddScopeProcessor.java
@@ -98,12 +98,14 @@ private boolean requiresContainerServices(ClassInfo clazz, Set<DotName> containe
         if (index != null) {
             DotName superName = clazz.superName();
             while (superName != null && !superName.equals(DotNames.OBJECT)) {
-                ClassInfo superClass = index.getClassByName(superName);
+                final ClassInfo superClass = index.getClassByName(superName);
                 if (superClass != null) {
-                    if (hasContainerAnnotation(clazz, containerAnnotationNames)) {
+                    if (hasContainerAnnotation(superClass, containerAnnotationNames)) {
                         return true;
                     }
                     superName = superClass.superName();
+                } else {
+                    superName = null;
                 }
             }
         }
['extensions/arc/deployment/src/main/java/io/quarkus/arc/deployment/AutoAddScopeProcessor.java']