# Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.10.1:compile (default-compile) on project my-app: Compilation failure: module not found: com.example.util

- **ID:** `java/maven-plugin-execution-error`
- **Domain:** java
- **Category:** build_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

The Java module system requires explicit module declarations, and a required module is missing or not declared in module-info.java.

## Version Compatibility

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

## Workarounds

1. **Add the required module to module-info.java** (95% success)
   ```
   module my.app { requires com.example.util; }
   ```
2. **Use --add-modules compiler argument if module is on classpath** (80% success)
   ```
   <plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-compiler-plugin</artifactId><configuration><compilerArgs><arg>--add-modules</arg><arg>com.example.util</arg></compilerArgs></configuration></plugin>
   ```

## Dead Ends

- **Removing module-info.java entirely** — The project may be designed for Java 9+, and removing module-info can break encapsulation. (70% fail)
- **Adding the module to the classpath instead of module path** — Maven compiler plugin may still enforce module path for Java 9+. (80% fail)
