apache/maven · warning · IllegalArgumentException
version can neither be null, empty nor blank
Error message
version can neither be null, empty nor blank
What it means
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.
Source
Thrown at compat/maven-artifact/src/main/java/org/apache/maven/artifact/ArtifactUtils.java:99
public static String key(String groupId, String artifactId, String version) {
notBlank(groupId, "groupId can neither be null, empty nor blank");
notBlank(artifactId, "artifactId can neither be null, empty nor blank");
notBlank(version, "version can neither be null, empty nor blank");
return groupId + ":" + artifactId + ":" + version;
}
private static void notBlank(String str, String message) {
final int strLen = str != null ? str.length() : 0;
if (strLen > 0) {
for (int i = 0; i < strLen; i++) {
if (!Character.isWhitespace(str.charAt(i))) {
return;
}
}
}
throw new IllegalArgumentException(message);
}
public static Map<String, Artifact> artifactMapByVersionlessId(Collection<Artifact> artifacts) {
Map<String, Artifact> artifactMap = new LinkedHashMap<>();
if (artifacts != null) {
for (Artifact artifact : artifacts) {
artifactMap.put(versionlessKey(artifact), artifact);
}
}
return artifactMap;
}
public static Artifact copyArtifactSafe(Artifact artifact) {
return (artifact != null) ? copyArtifact(artifact) : null;
}
View on GitHub (pinned to e4093d4e12)
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
Defensive patterns
Strategy: retry
Try / catch
try {
artifactResolver.resolveArtifact(session, request);
} catch (ArtifactTransferException e) {
// same condition the plain warn showed; rerun once with -X to get the full chain
throw new IllegalStateException(e.getRootCause());
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- artifactId can neither be null, empty nor blank
- The groupId cannot be empty.
- Repository list contains duplicate entries. Each repository
- Repository list contains null entries. All repository entrie
- groupId can neither be null, empty nor blank
AI-assisted analysis of apache/maven@e4093d4e12 (2026-08-21).
Data as JSON: /api/errors/09bb1e8a09f53e60.
Report an issue: GitHub.