> Don't have a strong opinion about failsafe vs surefire, but I will push
back on the claim that most of the new projects are based on Spring Boot.
Certainly there are many devs in the Spring Boot ecosystem who use it
routinely, but there are many who have never gone anywhere near it, myself
included. At Google, SpringBoot only came up when talking about how third
parties might want to deploy their own apps on GCP. At Meta it never came
up at all.

Google and Meta are not relevant examples, as these companies have their
own build tooling (Bazel/Blaze, Buck/Buck2, immense monorepos etc) which is
not common.

https://www.jetbrains.com/lp/devecosystem-2022/java/
https://www.jetbrains.com/lp/devecosystem-2023/java/

According to developer surveys, Spring Boot and JUnit are strongly
dominating in the Java Ecosystem, so this can be a good argument in the
default settings (especially if we are talking about removing surefire by
default; -1 here).

> Actually for me spring-boot based tests are already integration-tests as
they often start internal webservers and/or connect via Test Containers

You are right. In this case it's just a question of terms, not the tests
itself. In different contexts "integration test" can mean different things.
In maven this way we distinguish the build phase rather than the test
scenarios.

> as soon as we agree both are a single plugin then the only point is do we
run test after or before packaging IMHO. I'm all to run them after but
moving test phase rather than using integration-test one

That's a very interesting, related, but a bit different topic. I'd like to
mention this as it may affect the decision making there. I've made a custom
Maven Builder which reorders test and package phases which allows to
eagerly schedule downstream dependencies build -
https://github.com/maven-turbo-reactor/maven-turbo-builder (also now part
of Maveniverse) and it gives immense build boost (in average around 30%).
So in the long term IMO running tests (both surefire/failsafe) should be
AFTER package (now only failsafe runs the tests after package).

On Mon, Sep 8, 2025 at 12:09 PM Christoph Läubrich <m...@laeubi-soft.de>
wrote:

>
> e.g. Tycho has own surefire/failsafe-variants:
>
>
> https://tycho.eclipseprojects.io/doc/latest/tycho-surefire-plugin/plugin-info.html
>
> bnd-plugin uses junit under the cover but not surefire nor failsafe:
>
>
> https://github.com/bndtools/bnd/tree/master/maven-plugins/bnd-testing-maven-plugin
>
> Groovy at least requires special configuration with surefire, so one has
> to "enable" it to scan for non java files.
>
> Pax Exam allows running tests in container (e.g. J2EE):
>
> https://github.com/ops4j/org.ops4j.pax.exam
>
> Maven-plugins even have maven-invoker:
>
> https://maven.apache.org/plugins/maven-invoker-plugin/
>
> ... so there is a wide range of other things that might want to be "the
> default" so instead of choosing e.g surefire/failsafe as the default
> (what is only one way) it would be better to ask explicitly configure
> how to test instead of having it in the default life-cycle. With JUnit
> Platform one might even ask why surefire at all (that serves a similar
> purpose).
>
> Then a user can choose e.g. if only surefire, only failsafe, maybe both
> or something completely different should be used.
>
>
> Am 08.09.25 um 11:55 schrieb Mirko Friedenhagen:
> > Do you mean surefire or junit? What other plugin do you use to start
> tests?
> > Mit freundlichen Grüßen
> > Mirko Friedenhagen
> > —
> > Sent from my mobile
> >
> >> Am 08.09.2025 um 08:08 schrieb Christoph Läubrich <m...@laeubi-soft.de
> >:
> >>
> >> I would go the other way round and remove the surefire plugin instead
> as there are even more testing framework providers and not all can/want use
> surefire.
> >>
> >> So for me less is more and disabling it in case it is not wanted is
> always a bit cumbersome. Then everyone can simply configure in their parent
> pom whats wanted by default.
> >>
> >>> Am 05.09.25 um 07:56 schrieb Rüdiger:
> >>> Hiho!
> >>> I was wondering, what you all think about adding the failsafe plugin
> to the super pom of maven 4. I often work with young teams, and it's
> difficult to explain, why the surefire plugin works out of the box, but the
> failsafe plugin does not... and of course, it's a nuisance to have to add
> it to every project.
> >>> Maybe unit tests used to be more important than integration tests in
> the past, but my perception is that this is changing: ITs become more and
> more the primary way of testing, while unit tests become more optional and
> focus on more complex algorithms.
> >>> Kind regards
> >>> Rüdiger
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
> >>> For additional commands, e-mail: dev-h...@maven.apache.org
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
> >> For additional commands, e-mail: dev-h...@maven.apache.org
> >>
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
> > For additional commands, e-mail: dev-h...@maven.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
> For additional commands, e-mail: dev-h...@maven.apache.org
>
>

Reply via email to