[ANN] Apache Maven PMD Plugin 3.16.0 Released
The Maven team is pleased to announce the release of the Apache Maven PMD Plugin, version 3.16.0 A Maven plugin for the PMD toolkit, that produces a report on both code rule violations and detected copy and paste fragments, as well as being able to fail the build based on these metrics. https://maven.apache.org/plugins/maven-pmd-plugin/ You should specify the version in your project's plugin configuration: org.apache.maven.plugins maven-pmd-plugin 3.16.0 Release Notes - Maven PMD Plugin - Version 3.16.0 Bug * [MPMD-325] Could not find class due to IncompatibleClassChangeError warning * [MPMD-324] Ruleset URLs have hyphen replaced with forwardslash * [MPMD-323] ResourceManager should use project base dir instead of pom location Improvement * [MPMD-328] Shared GitHub Actions Task * [MPMD-327] Upgrade to PMD 6.42.0 * [MPMD-326] Set Maven 3.1.1 as minimum version Enjoy, -The Maven team - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Run all tests (also in dependent modules), fail build at end
(FIXED TYPO) Hi Alexander, I have realized that we can move straight ahead with the following. Basically your expectations are to shift the concrete phase execution of the build lifecycle to the end of the build. I can imagine a "generic" Extension and you would configure the Extension so that the "test" phase *or* the "verify" phase to the end of the build. If you rephrase the question of this email and send it to the d...@maven.apache.org, you may receive an answer with an existing solution. I guess you are not the first person who has this requirement. Cheers Tibor On Tue, Feb 15, 2022 at 11:06 AM Tibor Digana wrote: > Hi Alexander, > > I have realized that we can move straight ahead with the following. > Basically your expectations are to shift the concrete phase execution of > the build lifecycle to the end of the build. > I can imagine a "generic" Extension and you would configure the Extension > so that the "test" phase of the "verify" phase to the end of the build. > > If you rephrase the question of this email and send it to the > d...@maven.apache.org, you may receive an answer with an existing solution. > I guess you are not the first person who has this requirement. > > Cheers > Tibor > > > On Tue, Feb 15, 2022 at 5:12 AM Alexander Kriegisch < > alexan...@kriegisch.name> wrote: > >> Hi Tibor. >> >> I waited for a week in order to see other developers want to contribute >> to the general discussion you asked to have before making any design >> decisions the Surefire team might regret later. Did you get the input >> your were looking for from somewhere off-list, or have you had enough >> time to decide how you want to handle this? I am not sure I can >> contribute more than I already have by explaining the potential >> user/business value in other parts of this thread. >> >> Kind regards >> -- >> Alexander Kriegisch >> https://scrum-master.de >> >> >> Tibor Digana schrieb am 07.02.2022 23:16 (GMT +07:00): >> >> > I can imaging to utilize afterSessionEnd() >> > >> https://maven.apache.org/ref/3.8.4/maven-core/apidocs/index.html?org/apache/maven/AbstractMavenLifecycleParticipant.html >> > Maybe this is the way to do it in a clear way via Maven Extensions, see >> > >> https://maven.apache.org/ref/3.8.4/maven-core/apidocs/index.html?org/apache/maven/eventspy/AbstractEventSpy.html >> > https://maven.apache.org/studies/extension-demo/ >> > >> > and execute the Project's Mojo as if the Mojo was executed in a >> traditional >> > way. >> > >> > T >> > >> > 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 >> >>
Re: Run all tests (also in dependent modules), fail build at end
Hi Alexander, I have realized that we can move straight ahead with the following. Basically your expectations are to shift the concrete phase execution of the build lifecycle to the end of the build. I can imagine a "generic" Extension and you would configure the Extension so that the "test" phase of the "verify" phase to the end of the build. If you rephrase the question of this email and send it to the d...@maven.apache.org, you may receive an answer with an existing solution. I guess you are not the first person who has this requirement. Cheers Tibor On Tue, Feb 15, 2022 at 5:12 AM Alexander Kriegisch < alexan...@kriegisch.name> wrote: > Hi Tibor. > > I waited for a week in order to see other developers want to contribute > to the general discussion you asked to have before making any design > decisions the Surefire team might regret later. Did you get the input > your were looking for from somewhere off-list, or have you had enough > time to decide how you want to handle this? I am not sure I can > contribute more than I already have by explaining the potential > user/business value in other parts of this thread. > > Kind regards > -- > Alexander Kriegisch > https://scrum-master.de > > > Tibor Digana schrieb am 07.02.2022 23:16 (GMT +07:00): > > > I can imaging to utilize afterSessionEnd() > > > https://maven.apache.org/ref/3.8.4/maven-core/apidocs/index.html?org/apache/maven/AbstractMavenLifecycleParticipant.html > > Maybe this is the way to do it in a clear way via Maven Extensions, see > > > https://maven.apache.org/ref/3.8.4/maven-core/apidocs/index.html?org/apache/maven/eventspy/AbstractEventSpy.html > > https://maven.apache.org/studies/extension-demo/ > > > > and execute the Project's Mojo as if the Mojo was executed in a > traditional > > way. > > > > T > > > > 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 > >
Re: Run all tests (also in dependent modules), fail build at end
Hi Alexander, Unfortunately nobody has replied to me, either in the ML. I guess the Extension API may really solve your issue. We need to have some prototype which can be developed apart of the Surefire project. I guess the prototype should confirm the whole idea. After we are fine with the result, we can contribute to Surefire. We can do the same in Surefire directly in a PR. Currently I am trying to catch up with the promises in the roadmap of M6 and so I am not idle. The way would be to ask individual contributors and committers to participate. Cheers Tibor17 On Tue, Feb 15, 2022 at 5:12 AM Alexander Kriegisch < alexan...@kriegisch.name> wrote: > Hi Tibor. > > I waited for a week in order to see other developers want to contribute > to the general discussion you asked to have before making any design > decisions the Surefire team might regret later. Did you get the input > your were looking for from somewhere off-list, or have you had enough > time to decide how you want to handle this? I am not sure I can > contribute more than I already have by explaining the potential > user/business value in other parts of this thread. > > Kind regards > -- > Alexander Kriegisch > https://scrum-master.de > > > Tibor Digana schrieb am 07.02.2022 23:16 (GMT +07:00): > > > I can imaging to utilize afterSessionEnd() > > > https://maven.apache.org/ref/3.8.4/maven-core/apidocs/index.html?org/apache/maven/AbstractMavenLifecycleParticipant.html > > Maybe this is the way to do it in a clear way via Maven Extensions, see > > > https://maven.apache.org/ref/3.8.4/maven-core/apidocs/index.html?org/apache/maven/eventspy/AbstractEventSpy.html > > https://maven.apache.org/studies/extension-demo/ > > > > and execute the Project's Mojo as if the Mojo was executed in a > traditional > > way. > > > > T > > > > 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 > >