# [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin: Compilation failure

**Code:** `Compilation failure` · **Category:** Java · **Seen on:** Java, Maven

javac reported errors during the Maven compile phase.

## Meaning

The actual errors are listed under the failure message with file and line. Release/target mismatches also appear here ("invalid target release", "release version 17 not supported").

## Common causes

- Compile errors in the source
- Java version mismatch between JDK and `maven.compiler.release`
- Missing dependency
- Annotation processor (Lombok) not configured

## Quick fix

1. Read the first `[ERROR] /path/File.java` lines
2. Align JDK and `<maven.compiler.release>`
3. Add the Lombok/annotation processor config

## Detailed fix by platform

### Maven

1. `mvn -e -X clean compile` for details; `java -version` and `mvn -v` to see the JDK Maven uses

## How to diagnose

1. **First error** — Which file/line?
2. **JDK** — mvn -v?
3. **Release** — pom setting?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/java/maven-compiler-plugin-failure)
