{"record":{"id":"75491153f526d21d","repo":"quarkusio/quarkus","slug":"wildcard-exclusions-are-not-supported-here","errorCode":null,"errorMessage":"Wildcard exclusions are not supported here","messagePattern":"Wildcard exclusions are not supported here","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"independent-projects/bootstrap/maven-resolver/src/main/java/io/quarkus/bootstrap/util/DependencyUtils.java","lineNumber":36,"sourceCode":"import io.quarkus.bootstrap.resolver.maven.MavenArtifactResolver;\nimport io.quarkus.bootstrap.workspace.WorkspaceModule;\nimport io.quarkus.maven.dependency.ArtifactCoords;\nimport io.quarkus.maven.dependency.ArtifactKey;\nimport io.quarkus.maven.dependency.DependencyFlags;\nimport io.quarkus.maven.dependency.GACTV;\nimport io.quarkus.maven.dependency.ResolvedDependencyBuilder;\nimport io.quarkus.paths.PathList;\n\npublic class DependencyUtils {\n\n    public static ArtifactKey getKey(Artifact artifact) {\n        return ArtifactKey.of(artifact.getGroupId(), artifact.getArtifactId(),\n                artifact.getClassifier(), getType(artifact));\n    }\n\n    public static ArtifactKey getKey(Exclusion exclusion) {\n        if (\"*\".equals(exclusion.getGroupId()) || \"*\".equals(exclusion.getArtifactId())) {\n            throw new IllegalStateException(\"Wildcard exclusions are not supported here\");\n        }\n        return ArtifactKey.of(exclusion.getGroupId(), exclusion.getArtifactId(),\n                exclusion.getClassifier(), exclusion.getExtension());\n    }\n\n    public static ArtifactCoords getCoords(Artifact artifact) {\n        return new GACTV(artifact.getGroupId(), artifact.getArtifactId(),\n                artifact.getClassifier(), getType(artifact), artifact.getVersion());\n    }\n\n    public static Map<ArtifactKey, Dependency> toMap(List<Dependency> deps) {\n        final Map<ArtifactKey, Dependency> map = new HashMap<>(deps.size());\n        for (Dependency dep : deps) {\n            map.put(getKey(dep.getArtifact()), dep);\n        }\n        return map;\n    }\n","sourceCodeStart":18,"sourceCodeEnd":54,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/independent-projects/bootstrap/maven-resolver/src/main/java/io/quarkus/bootstrap/util/DependencyUtils.java#L18-L54","documentation":"DependencyUtils.getKey(Exclusion) converts a Maven <exclusion> into an ArtifactKey. Quarkus dependency keys are exact coordinates, so groupId or artifactId wildcards ('*') cannot be represented and trigger this IllegalStateException. The resolver needs a concrete key to filter dependencies.","triggerScenarios":"Declaring a dependency exclusion with <groupId>*</groupId> or <artifactId>*</artifactId> in a POM that Quarkus processes (e.g. application model building / dependency graph analysis in the workspace).","commonSituations":"Copy-pasted 'exclude everything' exclusions used to silence dependency convergence; migrating POMs from tooling that supports wildcard exclusions (newer Maven semantics) into Quarkus workspace analysis.","solutions":["Replace the wildcard exclusion with explicit groupId/artifactId of the transitive dependency to exclude","Use 'mvn dependency:tree' to identify the exact transitive artifacts needing exclusion","If the goal is excluding everything, exclude each known transitive artifact individually","Upgrade/align Quarkus so the problematic POM path is no longer processed with DependencyUtils.getKey, if applicable"],"exampleFix":"<!-- before -->\n<exclusion>\n  <groupId>*</groupId>\n  <artifactId>*</artifactId>\n</exclusion>\n<!-- after -->\n<exclusion>\n  <groupId>commons-logging</groupId>\n  <artifactId>commons-logging</artifactId>\n</exclusion>","handlingStrategy":"validation","validationCode":"void checkExclusions(Model pom) {\n    for (Dependency d : pom.getDependencies()) {\n        for (Exclusion x : d.getExclusions()) {\n            if (\"*\".equals(x.getGroupId()) || \"*\".equals(x.getArtifactId()))\n                throw new IllegalStateException(\"Wildcard exclusion in \" + d.getArtifactId());\n        }\n    }\n}","typeGuard":null,"tryCatchPattern":"try {\n    ArtifactKey key = DependencyUtils.getKey(exclusion);\n} catch (IllegalStateException e) {\n    log.warn(\"Replace wildcard exclusion with explicit coordinates\");\n}","preventionTips":["Never use groupId/artifactId '*' in <exclusion>","Use mvn dependency:tree to enumerate exact artifacts to exclude","Lint POMs for wildcard exclusions in CI","Keep exclusion lists minimal and specific"],"tags":["maven","dependencies","exclusions"],"backgroundTag":"wildcard-exclusion-unsupported","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}