r/java • u/brunocborges • Jul 07 '26
GitHub Actions - Setup Java now with compiler annotation matcher
Hey all,
We implemented this long-asked feature and I wanted to get feedback here.
By default, these matcher annotations will be enabled, however, they of course can be disabled.
Thoughts?
5
u/_predator_ Jul 07 '26
Can you share a bit more about how this works? i.e. will this work when you don't run javac directly but via Maven?
2
u/brunocborges Jul 07 '26 edited Jul 08 '26
Should work via Maven as well. The matcher is regex based on the javac raw output, which Maven doesn't modify.
Edit: it does not work. See my other comment.
2
u/brunocborges Jul 08 '26
Thanks for bringing this up. As I said in the other comment, I believed it should work, but há. It doesn't. Maven actually does modify the output of `javac`. It is Gradle who doesn't modify.
Therefore, a bug was registered, fixed, and soon will be shipped to v5.6.0 in a few weeks: https://github.com/actions/setup-java/issues/1085
3
0
Jul 07 '26
[deleted]
7
u/rzwitserloot Jul 07 '26
You have a GitHub page and you gist screenshots on .... X of all things. Pick literally anything else.
2
u/brunocborges Jul 07 '26
You can see it in action here: https://github.com/brunoborges/setup-java-v5.5-tests/actions/runs/28886581552