{"record":{"id":"09bb1e8a09f53e60","repo":"apache/maven","slug":"version-can-neither-be-null-empty-nor-blank","errorCode":null,"errorMessage":"version can neither be null, empty nor blank","messagePattern":"version can neither be null, empty nor blank","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"warning","filePath":"compat/maven-artifact/src/main/java/org/apache/maven/artifact/ArtifactUtils.java","lineNumber":99,"sourceCode":"\n    public static String key(String groupId, String artifactId, String version) {\n        notBlank(groupId, \"groupId can neither be null, empty nor blank\");\n        notBlank(artifactId, \"artifactId can neither be null, empty nor blank\");\n        notBlank(version, \"version can neither be null, empty nor blank\");\n\n        return groupId + \":\" + artifactId + \":\" + version;\n    }\n\n    private static void notBlank(String str, String message) {\n        final int strLen = str != null ? str.length() : 0;\n        if (strLen > 0) {\n            for (int i = 0; i < strLen; i++) {\n                if (!Character.isWhitespace(str.charAt(i))) {\n                    return;\n                }\n            }\n        }\n        throw new IllegalArgumentException(message);\n    }\n\n    public static Map<String, Artifact> artifactMapByVersionlessId(Collection<Artifact> artifacts) {\n        Map<String, Artifact> artifactMap = new LinkedHashMap<>();\n\n        if (artifacts != null) {\n            for (Artifact artifact : artifacts) {\n                artifactMap.put(versionlessKey(artifact), artifact);\n            }\n        }\n\n        return artifactMap;\n    }\n\n    public static Artifact copyArtifactSafe(Artifact artifact) {\n        return (artifact != null) ? copyArtifact(artifact) : null;\n    }\n","sourceCodeStart":81,"sourceCodeEnd":117,"githubUrl":"https://github.com/apache/maven/blob/e4093d4e120eac99d6bdce5ba67cace2f3085c97/compat/maven-artifact/src/main/java/org/apache/maven/artifact/ArtifactUtils.java#L81-L117","documentation":"Identical failure to the debug-enabled variant, printed when -X is OFF: the legacy wagon manager caught a TransferFailedException while fetching the artifact, so only the transport exception's one-line message is shown without a stack trace. The stored exception is rethrown if the file is not already present in the local repository, failing the build at that point.","triggerScenarios":"Authentication, TLS, proxy, or wagon-provider failures during artifact download, seen without debug output; the message names the artifact id, repository id, and repository URL involved.","commonSituations":"CI pipelines running default verbosity; nightly builds failing after credential rotation; users behind corporate proxies who only see the one-line warning and the later 'Unable to download the artifact from any repository' error.","solutions":["Reproduce once with mvn -X so the same warning prints with the full stack trace","Check settings.xml server credentials and proxy configuration for the repository named in the message","Verify the URL from the message with curl and confirm the protocol (http/https) is supported","If a local copy already exists, clear the forced-update flag or accept the cached artifact"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    artifactResolver.resolveArtifact(session, request);\n} catch (ArtifactTransferException e) {\n    // same condition the plain warn showed; rerun once with -X to get the full chain\n    throw new IllegalStateException(e.getRootCause());\n}","preventionTips":["Reproduce any download warning once with -X before debugging blind","Schedule a periodic online build to catch credential and TLS-certificate expiry early","Verify settings.xml proxies match the network the build runs in"],"tags":["maven","wagon","download","diagnostics","maven-compat"],"backgroundTag":"artifact-download-failed","analyzedSha":"e4093d4e120eac99d6bdce5ba67cace2f3085c97","analyzedAt":"2026-08-21T22:58:24.034Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}