diff --git a/extensions/arc/deployment/src/main/java/io/quarkus/arc/deployment/BeanArchiveProcessor.java b/extensions/arc/deployment/src/main/java/io/quarkus/arc/deployment/BeanArchiveProcessor.java index 21bb7fa92bb52..7f0b09a4b42ad 100644 --- a/extensions/arc/deployment/src/main/java/io/quarkus/arc/deployment/BeanArchiveProcessor.java +++ b/extensions/arc/deployment/src/main/java/io/quarkus/arc/deployment/BeanArchiveProcessor.java @@ -271,7 +271,7 @@ private boolean isApplicationArchiveExcluded(ArcConfig config, List artifactId, Optional classifier) { if (Objects.equals(key.getGroupId(), groupId) - && artifactId.isEmpty() || Objects.equals(key.getArtifactId(), artifactId.get())) { + && (artifactId.isEmpty() || Objects.equals(key.getArtifactId(), artifactId.get()))) { if (classifier.isPresent() && Objects.equals(key.getClassifier(), classifier.get())) { return true; } else if (!classifier.isPresent() && ArtifactCoords.DEFAULT_CLASSIFIER.equals(key.getClassifier())) { diff --git a/extensions/arc/deployment/src/test/java/io/quarkus/arc/test/deployment/TestArchiveMatching.java b/extensions/arc/deployment/src/test/java/io/quarkus/arc/test/deployment/TestArchiveMatching.java index 59f5e95180775..715bb7736da80 100644 --- a/extensions/arc/deployment/src/test/java/io/quarkus/arc/test/deployment/TestArchiveMatching.java +++ b/extensions/arc/deployment/src/test/java/io/quarkus/arc/test/deployment/TestArchiveMatching.java @@ -22,6 +22,8 @@ public void testMatch() { ArtifactKey key = GACT.fromString(GROUP_ID + ":" + ARTIFACT_ID); ArtifactKey keyWithClassifier = GACT.fromString(GROUP_ID + ":" + ARTIFACT_ID + ":" + CLASSIFIER); + assertFalse(archiveMatches(key, GROUP_ID + ".different", Optional.empty(), Optional.empty())); + assertTrue(archiveMatches(key, GROUP_ID, Optional.empty(), Optional.empty())); assertTrue(archiveMatches(key, GROUP_ID, Optional.of(ARTIFACT_ID), Optional.empty())); assertFalse(archiveMatches(key, GROUP_ID, Optional.of(ARTIFACT_ID), Optional.of(CLASSIFIER))); assertFalse(archiveMatches(key, GROUP_ID, Optional.of("test1"), Optional.empty()));