Alexander, all I wanted to say is to discuss the xxxAtEnd as a Maven pattern. Is it what we really want to have in Maven? Last time we discussed it we said that it was a workaround. It should not be a problem to implement in Surefire but it might be an internal issue and we should avoid it. So let's discuss this pattern in general on the ML apart of the target in a concrete plugin.
On Sun, Feb 6, 2022 at 7:46 AM Alexander Kriegisch <alexan...@kriegisch.name> wrote: > Actually, I am not sure I want to compare with Install and Deploy > plugin, but because you were mentioning them: 'installAtEnd' and > 'deployAtEnd' are blessings IMO, and they are cornerstones of my work, > because they help to avoid half-installed and - even worse - > half-deployed multi-module projects which would lead to inconsistencies > in repositories and might be hard to rectify in remote repositories, > "burning" release numbers unnecessarily. > > Back to the topic at hand: Having a way to run all tests for a > multi-module project which would build and package perfectly fine when > skipping tests, i.e. not either forcing testing to stop for dependent > projects (skipping tests there) or making the build falsely report > success in the end, is a perfectly valid use case. Who would not like to > have that? Creating a report for all failing tests without cheating the > build result to be successful would simply be useful. > > -- > Alexander Kriegisch > https://scrum-master.de > > > Tibor Digana schrieb am 06.02.2022 01:45 (GMT +07:00): > > > It is basically the same feature known in the maven-deploy-plugin > > > https://maven.apache.org/plugins/maven-deploy-plugin/deploy-mojo.html#deployAtEnd > > > > Not sure if the command > > mvn deploy -DdeployAtEnd > > would fail to deploy dependent modules if the first module fails. > > > > We discussed this feature some time and we said that these features > > xxxAtEnd are a hack. > > The question is regarding Maven 4 and Maven 5. > > > > > > > > > > > > On Sat, Feb 5, 2022 at 5:27 AM Alexander Kriegisch < > alexan...@kriegisch.name> > > wrote: > > > >> I know that this probably is a classic question, because there suggested > >> answers on Stack Overflow (and maybe also somewhere here in this mailing > >> list), but I did not found anything satisfying the following criteria: > >> > >> 1. Run all Surefire tests, if compilation succeeds, also those of > >> dependent modules, even if there are tests with failurer or errors. > >> (We leave Failsafe out of the picture for now for simplicity's > >> sake, but basically the same would apply to Failsafe tests for > >> modules which can be compiled and packaged, despite failing > >> Surefire tests.) > >> > >> 2. Fail the multi-module build in the end for all modules with failing > >> tests. > >> > >> I know there is '-fae', but it skips modules depending on ones with test > >> failures. > >> > >> I know there is '-fn', but it falsely makes the whole build pass. > >> > >> I know that the Maven build lifecycle is based on module dependencies > >> and that dependent modules usually should not be built, if a dependency > >> fails to build. But OTOH, the same build would pass with '-DskipTests', > >> and the requirement that artifacts be compiled and packaged and > >> dependent modules built, because those artifacts can in fact be compiled > >> and packaged, makes practical sense. Basically, the user wants test > >> failures reported correctly, but still make sure that as many tests as > >> possible are being run. > >> > >> Is there any way to achieve that? > >> -- > >> Alexander Kriegisch > >> https://scrum-master.de > >> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > >> For additional commands, e-mail: users-h...@maven.apache.org > >> > >> > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > >