{"record":{"id":"e4045c0ccc4f4348","repo":"apache/maven","slug":"the-artifact-original-has-been-banned-from-resol","errorCode":null,"errorMessage":"The artifact {original} has been banned from resolution: User global ban|User project ban","messagePattern":"The artifact (.+?) has been banned from resolution: User global ban\\|User project ban","errorType":"exception","errorClass":"ArtifactDescriptorException","httpStatus":null,"severity":"error","filePath":"impl/maven-impl/src/main/java/org/apache/maven/impl/resolver/relocation/UserPropertiesArtifactRelocationSource.java","lineNumber":73,"sourceCode":"    private static final Artifact SENTINEL = new DefaultArtifact(\"org.apache.maven.banned:user-relocation:1.0\");\n\n    @Override\n    public Artifact relocatedTarget(\n            RepositorySystemSession session, ArtifactDescriptorResult artifactDescriptorResult, Model model)\n            throws ArtifactDescriptorException {\n        Relocations relocations = (Relocations) session.getData()\n                .computeIfAbsent(getClass().getName() + \".relocations\", () -> parseRelocations(session));\n        if (relocations != null) {\n            Artifact original = artifactDescriptorResult.getRequest().getArtifact();\n            Relocation relocation = relocations.getRelocation(original);\n            if (relocation != null\n                    && (isProjectContext(artifactDescriptorResult.getRequest().getRequestContext())\n                            || relocation.global)) {\n                if (relocation.target == SENTINEL) {\n                    String message = \"The artifact \" + original + \" has been banned from resolution: \"\n                            + (relocation.global ? \"User global ban\" : \"User project ban\");\n                    LOGGER.debug(message);\n                    throw new ArtifactDescriptorException(artifactDescriptorResult, message);\n                }\n                Artifact result = new RelocatedArtifact(\n                        original,\n                        isAny(relocation.target.getGroupId()) ? null : relocation.target.getGroupId(),\n                        isAny(relocation.target.getArtifactId()) ? null : relocation.target.getArtifactId(),\n                        isAny(relocation.target.getClassifier()) ? null : relocation.target.getClassifier(),\n                        isAny(relocation.target.getExtension()) ? null : relocation.target.getExtension(),\n                        isAny(relocation.target.getVersion()) ? null : relocation.target.getVersion(),\n                        relocation.global ? \"User global relocation\" : \"User project relocation\");\n                LOGGER.debug(\n                        \"The artifact {} has been relocated to {}: {}\",\n                        original,\n                        result,\n                        relocation.global ? \"User global relocation\" : \"User project relocation\");\n                return result;\n            }\n        }\n        return null;","sourceCodeStart":55,"sourceCodeEnd":91,"githubUrl":"https://github.com/apache/maven/blob/e4093d4e120eac99d6bdce5ba67cace2f3085c97/impl/maven-impl/src/main/java/org/apache/maven/impl/resolver/relocation/UserPropertiesArtifactRelocationSource.java#L55-L91","documentation":"Error \"The artifact {original} has been banned from resolution: User global ban|User project ban\" thrown in apache/maven.","triggerScenarios":"Thrown at impl/maven-impl/src/main/java/org/apache/maven/impl/resolver/relocation/UserPropertiesArtifactRelocationSource.java:73 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e4093d4e120eac99d6bdce5ba67cace2f3085c97","analyzedAt":"2026-08-21T22:58:24.034Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}