# Could not resolve dependency for project com.example:my-app:jar:1.0.0: Could not find artifact com.example:missing-lib:jar:2.0.0 in central (https://repo.maven.apache.org/maven2)

- **ID:** `java/maven-dependency-not-found`
- **Domain:** java
- **Category:** build_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

The dependency artifact is not published to the configured repositories, or the repository URL is incorrect.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 8+ | active | — | — |

## Workarounds

1. **Add the correct repository to pom.xml** (95% success)
   ```
   <repositories><repository><id>my-repo</id><url>https://my-company.com/repo</url></repository></repositories>
   ```
2. **Install the dependency manually using mvn install:install-file** (90% success)
   ```
   mvn install:install-file -Dfile=missing-lib-2.0.0.jar -DgroupId=com.example -DartifactId=missing-lib -Dversion=2.0.0 -Dpackaging=jar
   ```

## Dead Ends

- **Adding a random third-party repository without verifying its contents** — The repository may not contain the artifact, or it could be malicious. (90% fail)
- **Cleaning the local Maven repository (~/.m2/repository) without verifying the remote** — If the artifact is not in any remote repo, cleaning the local cache doesn't help. (85% fail)
