| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
The javac problem matcher only recognized javac's native diagnostic format (File.java:12: warning: msg), which works for plain javac and Gradle but not Maven. The maven-compiler-plugin reformats diagnostics to [WARNING] /path/File.java:[12,5] msg, so Maven builds produced zero annotations. Add a new maven-javac matcher owner that recognizes the Maven format, capturing severity, file, line, column, and message. Maven builds now annotate consistently with Gradle and plain javac. Fixes: actions#1085 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Adds Maven-specific javac diagnostic matching to actions/setup-java’s existing Java problem matcher so Maven compiler warnings/errors produce GitHub annotations (consistent with plain javac and Gradle).
Changes:
| File | Description |
|---|---|
| .github/java.json | Adds a maven-javac matcher pattern to recognize Maven compiler plugin diagnostics and enable annotations. |
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Description:
The javac problem matcher registered by setup-java only recognizes javac's native diagnostic format (File.java:12: warning: msg). That works for plain javac and for Gradle (which passes diagnostics through unchanged), but not for Maven. The maven-compiler-plugin reformats every diagnostic to [WARNING] /path/File.java:[12,5] msg, so the existing regex never matches and Maven builds produce zero GitHub annotations even though the warnings/errors appear in the log.
This adds a new maven-javac problem matcher owner to .github/java.json that recognizes the Maven format and captures severity, file, line, column, and message. A separate owner is used because multiple patterns under one owner are treated as a multiline sequence, not as alternatives. Both owners are registered by the same existing ##[add-matcher] call, so no source change is needed. Maven builds now annotate consistently with Gradle and plain javac.
Notes:
Related issue:
Fixes: #1085
Check list: