# Compilation failure: package com.example.util does not exist

- **ID:** `java/maven-compilation-package-not-exists`
- **Domain:** java
- **Category:** build_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

A required Java package is missing from the classpath, often due to a missing dependency or incorrect module path.

## Version Compatibility

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

## Workarounds

1. **Add the correct dependency to pom.xml** (95% success)
   ```
   <dependency><groupId>com.example</groupId><artifactId>example-utils</artifactId><version>1.0.0</version></dependency>
   ```
2. **Use mvn dependency:copy-dependencies to verify classpath** (80% success)
   ```
   mvn dependency:copy-dependencies -DoutputDirectory=target/lib
   ```

## Dead Ends

- **Adding a random dependency with similar groupId but different artifactId** — The package name is specific to the correct artifact; a different artifact may not contain it. (90% fail)
- **Manually copying the jar file to the project's lib folder without updating pom.xml** — Maven does not automatically include local jars unless configured as system scope. (85% fail)
