When trying this out, I tried to provoke a failure of the authorization profile build by adding the Maven enforcer plugin and let it always fail. It fails the build before surefire runs.
In my tests, the following authorization stages were then all executed. The cause was that the authorization stage type was not added to the list of failed stage types. This in turn was, because we do this as a postFailure action and this particular action did not execute, because a previous postFailure action had failed. The failing postFailure action was the publishing of JUnit results, because there were not JUnit results (surefire never executed).
As it can be a regular expected case that there are no JUnit results on a failure (e.g. any Maven build problems that occur before surefire executes), I'm trying to change the publishing of JUnit results so that it doesn't fail when it publishes no test results and instead logs the numbers of executed tests.
When trying this out, I tried to provoke a failure of the authorization profile build by adding the Maven enforcer plugin and let it always fail. It fails the build before surefire runs.
In my tests, the following authorization stages were then all executed. The cause was that the authorization stage type was not added to the list of failed stage types. This in turn was, because we do this as a postFailure action and this particular action did not execute, because a previous postFailure action had failed. The failing postFailure action was the publishing of JUnit results, because there were not JUnit results (surefire never executed).
As it can be a regular expected case that there are no JUnit results on a failure (e.g. any Maven build problems that occur before surefire executes), I'm trying to change the publishing of JUnit results so that it doesn't fail when it publishes no test results and instead logs the numbers of executed tests.