{
  "id": "java/maven-invalid-version-format",
  "signature": "Invalid version format: '1.0.0-SNAPSHOT ' (trailing whitespace) in dependency com.example:lib:1.0.0-SNAPSHOT ",
  "signature_zh": "无效的版本格式：依赖 com.example:lib:1.0.0-SNAPSHOT 中的 '1.0.0-SNAPSHOT '（尾部空格）。",
  "regex": "Invalid\\ version\\ format:\\ '1\\.0\\.0\\-SNAPSHOT\\ '\\ \\(trailing\\ whitespace\\)\\ in\\ dependency\\ com\\.example:lib:1\\.0\\.0\\-SNAPSHOT\\ ",
  "domain": "java",
  "category": "build_error",
  "subcategory": null,
  "root_cause": "The version string contains leading or trailing whitespace, which is not allowed by Maven's version parser.",
  "root_cause_type": "generic",
  "root_cause_zh": "版本字符串包含前导或尾部空格，Maven 版本解析器不允许。",
  "versions": [
    {
      "version": "8+",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Using a different version without whitespace but not the intended one",
      "why_fails": "The dependency may not exist at that version, causing a resolution error.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "Ignoring the error and hoping it works",
      "why_fails": "Maven will fail to parse the version and abort the build.",
      "fail_rate": 0.99,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Trim whitespace from the version string in pom.xml",
      "success_rate": 1.0,
      "how": "<version>1.0.0-SNAPSHOT</version> (no trailing spaces)",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use a properties file to define the version without whitespace",
      "success_rate": 0.95,
      "how": "<properties><lib.version>1.0.0-SNAPSHOT</lib.version></properties> and reference ${lib.version}",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": null,
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.85,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-12-01",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}