# Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.12.0:site (default-site) on project my-app: Error generating site: java.io.IOException: Unable to create directory /path/to/target/site

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

## Root Cause

The target directory is not writable or the filesystem is full, preventing the site plugin from creating output directories.

## Version Compatibility

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

## Workarounds

1. **Ensure the target directory exists and is writable** (95% success)
   ```
   mkdir -p /path/to/target && chmod 755 /path/to/target
   ```
2. **Free up disk space or use a different output directory** (90% success)
   ```
   mvn site -Dsite.outputDirectory=/tmp/site
   ```

## Dead Ends

- **Changing the site output directory to a random path** — The new path may also have permission issues or be non-existent. (70% fail)
- **Running Maven as root** — This is a security risk and may not solve filesystem full issues. (60% fail)
