After days of trying I did not find a way to let the Maven build fail if a Cucumber scenario fails. What am I missing?
Here a minimal example of that build setup. It uses Maven Wrapper to simplify things. Just have a Java 21 in your JAVA_HOME and it shall run.
It turned out that the problem was caused by the latest versions of Surefire and Failsafe. The version 3.5.3 breaks the detection of failed scenarios somehow. Everything runs fine with version 3.5.2.
I do not know who to blame for this but let's see what the future brings.