{"record":{"id":"25b219cba436d4ff","repo":"apache/maven","slug":"the-groupid-cannot-be-empty","errorCode":null,"errorMessage":"The groupId cannot be empty.","messagePattern":"The groupId cannot be empty\\.","errorType":"validation","errorClass":"InvalidArtifactRTException","httpStatus":null,"severity":"warning","filePath":"compat/maven-artifact/src/main/java/org/apache/maven/artifact/DefaultArtifact.java","lineNumber":167,"sourceCode":"\n        this.scope = scope;\n\n        this.type = type;\n\n        if (classifier == null) {\n            classifier = artifactHandler.getClassifier();\n        }\n\n        this.classifier = classifier;\n\n        this.optional = optional;\n\n        validateIdentity();\n    }\n\n    private void validateIdentity() {\n        if (empty(groupId)) {\n            throw new InvalidArtifactRTException(\n                    groupId, artifactId, getVersion(), type, \"The groupId cannot be empty.\");\n        }\n\n        if (empty(artifactId)) {\n            throw new InvalidArtifactRTException(\n                    groupId, artifactId, getVersion(), type, \"The artifactId cannot be empty.\");\n        }\n\n        if (empty(type)) {\n            throw new InvalidArtifactRTException(groupId, artifactId, getVersion(), type, \"The type cannot be empty.\");\n        }\n\n        if ((empty(version)) && (versionRange == null)) {\n            throw new InvalidArtifactRTException(\n                    groupId, artifactId, getVersion(), type, \"The version cannot be empty.\");\n        }\n    }\n","sourceCodeStart":149,"sourceCodeEnd":185,"githubUrl":"https://github.com/apache/maven/blob/e4093d4e120eac99d6bdce5ba67cace2f3085c97/compat/maven-artifact/src/main/java/org/apache/maven/artifact/DefaultArtifact.java#L149-L185","documentation":"After a download completes, DefaultWagonManager verifies the SHA-1 checksum. On the FIRST failure it assumes a transient server problem (the classic mirror bug: an HTTP-200 error page delivered instead of the file) and logs this warning, then re-downloads the artifact. On the second consecutive failure the repository's checksum policy (fail/warn/ignore) decides the outcome.","triggerScenarios":"SHA-1 mismatch on the first verification: truncated or corrupted transfer, a mirror serving stale or wrong .sha1 files, or middleboxes rewriting response bodies.","commonSituations":"Third-party mirrors of Central lagging behind; flaky corporate proxies; interrupted network links during CI artifact fetches.","solutions":["Let the automatic retry run; if the second attempt also fails, address the serving repository itself","Point mirrors at canonical Central (https://repo.maven.apache.org/maven2) instead of unmaintained intermediates","Delete the artifact from the local repository and rebuild with -U to force a clean fetch","Compare manually: curl the artifact and its .sha1 and check sha1sum to see which side is wrong"],"exampleFix":"<!-- before -->\n<mirror>\n  <id>flaky-mirror</id>\n  <url>http://mymirror.example.com/maven2</url>\n  <mirrorOf>central</mirrorOf>\n</mirror>\n<!-- after: canonical Central -->\n<mirror>\n  <id>central-fast</id>\n  <url>https://repo.maven.apache.org/maven2</url>\n  <mirrorOf>central</mirrorOf>\n</mirror>","handlingStrategy":"retry","validationCode":"url=https://repo.maven.apache.org/maven2/path/to/artifact-1.0.jar\ncurl -fsS $url -o /tmp/a.jar && curl -fsS $url.sha1 -o /tmp/a.sha1\n[ \"$(sha1sum /tmp/a.jar | cut -d' ' -f1)\" = \"$(cat /tmp/a.sha1)\" ] \\\n  || echo 'repo checksum broken; pick another mirror'","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Mirror Central from repo.maven.apache.org/maven2, not unmaintained third-party mirrors","Delete local copies of any artifact that failed checksum verification twice","Use checksumPolicy=fail in CI so persistent corruption is visible immediately"],"tags":["maven","checksum","download","integrity","maven-compat"],"backgroundTag":"checksum-mismatch","analyzedSha":"e4093d4e120eac99d6bdce5ba67cace2f3085c97","analyzedAt":"2026-08-21T22:58:24.034Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}