Re: maven-surefire-plugin add artifact as additionalClasspathElement
thanks, I gave a second try to extensions and it seems works now. stephane Le 2023-02-23 à 09:52, Alexander Kriegisch a écrit : Would you not rather write a Maven plugin or extension for something like that and hook it into the build process globally, so you can use it when specifying `repository` or `pluginReporitory` entries in the POM needing it? This does not seem to be something limited to certain plugins, if I understand correctly. Alexander Kriegisch https://scrum-master.de Stephane Passignat schrieb am 22.02.2023 um 11:27: Hello, thank you everyone for these suggestions. Let's go back to my original issue. I need to add a library to maven classpath. The library I need is another RepositoryLayoutFactory, to download artifact located is a repository which is not yet supported by Maven. Actually it's a basic HTTP server. (It could be an FTP server or a database accessed is JDBC...) The library is made, it works (as well as I need), but to use it I need to add it to maven/lib/ext which is not portable to other computer. So I'm looking at alternatives. Surefire could be a candidate, or not... I hope this helps to understand. regards, Stephane Le 2023-02-16 à 11:58, Olivier Lamy a écrit : On Thu, 16 Feb 2023 at 20:52, Olivier Lamy wrote: On Thu, 16 Feb 2023 at 20:07, Delany wrote: Hi Stephane, You can do like this maven-surefire-plugin 3.0.0-M9 org.apache.commons commons-email 1.5 this will add dependencies to the surefire plugin itself. I guess Stephane wants to add to the jvm running the tests? additionalClasspathElement expect a full path to a directory or a file to be added to the classpath should work with something such but you need to assume commons-email has been resolved locally as a dependency. ${settings.localRepository}/org/apache/commons/commons-email/1.5/commons-email-1.5.jar another solution is to use dependency:copy to copy the commons-email dependency somewhere in ./target and use this path (see https://maven.apache.org/plugins/maven-dependency-plugin/examples/copying-artifacts.html) a real example here :) https://github.com/apache/maven-surefire/blob/master/surefire-providers/common-junit48/pom.xml hth Olivier On Thu, 16 Feb 2023 at 11:25, Stephane Passignat wrote: Hello, Is it possible to add a maven artifact as an additionalClasspathElement ? I tried this syntax, inspired by the exclusion mechanism, but it's not working. org.apache.maven.plugins maven-surefire-plugin 3.0.0-M9 org.apache.commons:commons-email:1.5 thank you Stéphane - 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 -- *Stéphane Passignat* ✆ +33 6 62 57 47 86 ✉ passig...@hotmail.com 3 place Jacques Marette, 75015 PARIS <https://goo.gl/maps/LuevHLq14baW8xNP6>
Re: maven-surefire-plugin add artifact as additionalClasspathElement
Stephane, "I need to add a library to maven classpath" -> you declare it as a dependency, or I don't get quite the problem (looking at your last but also first mail) You can declare the artifact as project dependency (POM/dependencies) or as plugin dependency (surefire/dependency), which one is the one you want? To make maven able to use your new layout, did you try ,mvn/extensions.xml ? https://maven.apache.org/guides/mini/guide-using-extensions.html HTH Tamas On Wed, Feb 22, 2023 at 11:12 PM Stephane Passignat wrote: > Hello, > > thank you everyone for these suggestions. Let's go back to my original > issue. > > I need to add a library to maven classpath. The library I need is > another RepositoryLayoutFactory, to download artifact located is a > repository which is not yet supported by Maven. Actually it's a basic > HTTP server. (It could be an FTP server or a database accessed is JDBC...) > > The library is made, it works (as well as I need), but to use it I need > to add it to maven/lib/ext which is not portable to other computer. So > I'm looking at alternatives. Surefire could be a candidate, or not... > > > I hope this helps to understand. > > regards, > > > Stephane > > > Le 2023-02-16 à 11:58, Olivier Lamy a écrit : > > On Thu, 16 Feb 2023 at 20:52, Olivier Lamy wrote: > >> On Thu, 16 Feb 2023 at 20:07, Delany > wrote: > >>> Hi Stephane, > >>> > >>> You can do like this > >>> > >>> > >>>maven-surefire-plugin > >>>3.0.0-M9 > >>> > >>> > >>>org.apache.commons > >>>commons-email > >>>1.5 > >>> > >>> > >>> > >> this will add dependencies to the surefire plugin itself. > >> I guess Stephane wants to add to the jvm running the tests? > >> > >> additionalClasspathElement expect a full path to a directory or a file > >> to be added to the classpath > >> > >> should work with something such but you need to assume commons-email > >> has been resolved locally as a dependency. > >> > ${settings.localRepository}/org/apache/commons/commons-email/1.5/commons-email-1.5.jar > >> > >> another solution is to use dependency:copy to copy the commons-email > >> dependency somewhere in ./target and use this path (see > >> > https://maven.apache.org/plugins/maven-dependency-plugin/examples/copying-artifacts.html > ) > >> > > a real example here :) > > > https://github.com/apache/maven-surefire/blob/master/surefire-providers/common-junit48/pom.xml > > > >> hth > >> Olivier > >> > >>> On Thu, 16 Feb 2023 at 11:25, Stephane Passignat > > >>> wrote: > >>> > >>>> Hello, > >>>> > >>>> Is it possible to add a maven artifact as an > additionalClasspathElement ? > >>>> > >>>> I tried this syntax, inspired by the exclusion mechanism, but it's not > >>>> working. > >>>> > >>>> > >>>> > >>>> > >>>>org.apache.maven.plugins > >>>>maven-surefire-plugin > >>>>3.0.0-M9 > >>>> > >>>> > >>>> > >>>> > org.apache.commons:commons-email:1.5 > >>>> > >>>> > >>>> > >>>> > >>>> > >>>> > >>>> > >>>> thank you > >>>> > >>>> Stéphane > >>>> > > - > > To unsubscribe, e-mail:users-unsubscr...@maven.apache.org > > For additional commands, e-mail:users-h...@maven.apache.org > > > -- > *Stéphane Passignat* > ✆ +33 6 62 57 47 86 > ✉ passig...@hotmail.com > 3 place Jacques Marette, 75015 PARIS > <https://goo.gl/maps/LuevHLq14baW8xNP6>
Re: maven-surefire-plugin add artifact as additionalClasspathElement
Would you not rather write a Maven plugin or extension for something like that and hook it into the build process globally, so you can use it when specifying `repository` or `pluginReporitory` entries in the POM needing it? This does not seem to be something limited to certain plugins, if I understand correctly. Alexander Kriegisch https://scrum-master.de Stephane Passignat schrieb am 22.02.2023 um 11:27: > Hello, > > thank you everyone for these suggestions. Let's go back to my original > issue. > > I need to add a library to maven classpath. The library I need is > another RepositoryLayoutFactory, to download artifact located is a > repository which is not yet supported by Maven. Actually it's a basic > HTTP server. (It could be an FTP server or a database accessed is JDBC...) > > The library is made, it works (as well as I need), but to use it I need > to add it to maven/lib/ext which is not portable to other computer. So > I'm looking at alternatives. Surefire could be a candidate, or not... > > > I hope this helps to understand. > > regards, > > > Stephane > > > Le 2023-02-16 à 11:58, Olivier Lamy a écrit : >> On Thu, 16 Feb 2023 at 20:52, Olivier Lamy wrote: >>> On Thu, 16 Feb 2023 at 20:07, Delany wrote: >>>> Hi Stephane, >>>> >>>> You can do like this >>>> >>>> >>>>maven-surefire-plugin >>>>3.0.0-M9 >>>> >>>> >>>>org.apache.commons >>>>commons-email >>>>1.5 >>>> >>>> >>>> >>> this will add dependencies to the surefire plugin itself. >>> I guess Stephane wants to add to the jvm running the tests? >>> >>> additionalClasspathElement expect a full path to a directory or a file >>> to be added to the classpath >>> >>> should work with something such but you need to assume commons-email >>> has been resolved locally as a dependency. >>> ${settings.localRepository}/org/apache/commons/commons-email/1.5/commons-email-1.5.jar >>> >>> another solution is to use dependency:copy to copy the commons-email >>> dependency somewhere in ./target and use this path (see >>> https://maven.apache.org/plugins/maven-dependency-plugin/examples/copying-artifacts.html) >>> >> a real example here :) >> https://github.com/apache/maven-surefire/blob/master/surefire-providers/common-junit48/pom.xml >> >>> hth >>> Olivier >>> >>>> On Thu, 16 Feb 2023 at 11:25, Stephane Passignat >>>> wrote: >>>> >>>>> Hello, >>>>> >>>>> Is it possible to add a maven artifact as an additionalClasspathElement ? >>>>> >>>>> I tried this syntax, inspired by the exclusion mechanism, but it's not >>>>> working. >>>>> >>>>> >>>>> >>>>> >>>>>org.apache.maven.plugins >>>>>maven-surefire-plugin >>>>>3.0.0-M9 >>>>> >>>>> >>>>> >>>>> org.apache.commons:commons-email:1.5 >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> thank you >>>>> >>>>> Stéphane >>>>> >> - >> 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: maven-surefire-plugin add artifact as additionalClasspathElement
Hello, thank you everyone for these suggestions. Let's go back to my original issue. I need to add a library to maven classpath. The library I need is another RepositoryLayoutFactory, to download artifact located is a repository which is not yet supported by Maven. Actually it's a basic HTTP server. (It could be an FTP server or a database accessed is JDBC...) The library is made, it works (as well as I need), but to use it I need to add it to maven/lib/ext which is not portable to other computer. So I'm looking at alternatives. Surefire could be a candidate, or not... I hope this helps to understand. regards, Stephane Le 2023-02-16 à 11:58, Olivier Lamy a écrit : On Thu, 16 Feb 2023 at 20:52, Olivier Lamy wrote: On Thu, 16 Feb 2023 at 20:07, Delany wrote: Hi Stephane, You can do like this maven-surefire-plugin 3.0.0-M9 org.apache.commons commons-email 1.5 this will add dependencies to the surefire plugin itself. I guess Stephane wants to add to the jvm running the tests? additionalClasspathElement expect a full path to a directory or a file to be added to the classpath should work with something such but you need to assume commons-email has been resolved locally as a dependency. ${settings.localRepository}/org/apache/commons/commons-email/1.5/commons-email-1.5.jar another solution is to use dependency:copy to copy the commons-email dependency somewhere in ./target and use this path (see https://maven.apache.org/plugins/maven-dependency-plugin/examples/copying-artifacts.html) a real example here :) https://github.com/apache/maven-surefire/blob/master/surefire-providers/common-junit48/pom.xml hth Olivier On Thu, 16 Feb 2023 at 11:25, Stephane Passignat wrote: Hello, Is it possible to add a maven artifact as an additionalClasspathElement ? I tried this syntax, inspired by the exclusion mechanism, but it's not working. org.apache.maven.plugins maven-surefire-plugin 3.0.0-M9 org.apache.commons:commons-email:1.5 thank you Stéphane - To unsubscribe, e-mail:users-unsubscr...@maven.apache.org For additional commands, e-mail:users-h...@maven.apache.org -- *Stéphane Passignat* ✆ +33 6 62 57 47 86 ✉ passig...@hotmail.com 3 place Jacques Marette, 75015 PARIS <https://goo.gl/maps/LuevHLq14baW8xNP6>
Re: maven-surefire-plugin add artifact as additionalClasspathElement
Oh right, I thought he was going to fix something in surefire There's also https://maven.apache.org/guides/mini/guide-attached-tests.html - - org.apache.maven.plugins - maven-surefire-plugin - ${surefire.version} - - - com.myco.app:foo-core:test-jar:tests - - Delany On Thu, 16 Feb 2023 at 12:53, Olivier Lamy wrote: > On Thu, 16 Feb 2023 at 20:07, Delany wrote: > > > > Hi Stephane, > > > > You can do like this > > > > > > maven-surefire-plugin > > 3.0.0-M9 > > > > > > org.apache.commons > > commons-email > > 1.5 > > > > > > > > this will add dependencies to the surefire plugin itself. > I guess Stephane wants to add to the jvm running the tests? > > additionalClasspathElement expect a full path to a directory or a file > to be added to the classpath > > should work with something such but you need to assume commons-email > has been resolved locally as a dependency. > > ${settings.localRepository}/org/apache/commons/commons-email/1.5/commons-email-1.5.jar > > another solution is to use dependency:copy to copy the commons-email > dependency somewhere in ./target and use this path (see > > https://maven.apache.org/plugins/maven-dependency-plugin/examples/copying-artifacts.html > ) > > hth > Olivier > > > > > On Thu, 16 Feb 2023 at 11:25, Stephane Passignat > > wrote: > > > > > Hello, > > > > > > Is it possible to add a maven artifact as an > additionalClasspathElement ? > > > > > > I tried this syntax, inspired by the exclusion mechanism, but it's not > > > working. > > > > > > > > > > > > > > > org.apache.maven.plugins > > > maven-surefire-plugin > > > 3.0.0-M9 > > > > > > > > > > > > > org.apache.commons:commons-email:1.5 > > > > > > > > > > > > > > > > > > > > > > > > thank you > > > > > > Stéphane > > > > > - > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > >
Re: maven-surefire-plugin add artifact as additionalClasspathElement
I agree that the current syntax for adding to stuff to test runtime is clunky and I wouldn't personally use it unless I needed to. On Thu, Feb 16, 2023 at 1:07 PM Alexander Kriegisch wrote: > > Which is exactly why I was asking. I want to learn about real-world use > cases which would require such a thing, not be just nice to have. > Over-engineering POMs does not make them more readable or maintainable. > > Alexander Kriegisch > https://scrum-master.de > > > Mikael Åsberg schrieb am 16.02.2023 um 13:03: > > I use runtime scope a lot, but personally can't recall having needed > > the equivalent of a test-runtime scope myself (or, more likely, I > > could get away with test compile scope even though the dependency was > > only needed at test runtime). But just because I haven't needed it > > doesn't mean there are no legit circumstances. > > > > On Thu, Feb 16, 2023 at 12:57 PM Alexander Kriegisch > > wrote: > >> > >> For a test, does it really matter to make the dependency test-scoped? > >> > >> Mikael Åsberg schrieb am 16.02.2023 um 12:35: > >>> Because there exists runtime, but no test only runtime > >>> scope > >>> > >>> On Thu, Feb 16, 2023 at 12:22 PM Alexander Kriegisch > >>> wrote: > >>>> > >>>> I would be more interested first in why this should be necessary at all. > >>>> What is the use case that would not be covered by declaring a regular > >>>> test-scoped dependency in the module? > >>>> -- > >>>> Alexander Kriegisch > >>>> https://scrum-master.de > >>>> > >>>> > >>>> Olivier Lamy schrieb am 16.02.2023 um 11:58: > >>>>> On Thu, 16 Feb 2023 at 20:52, Olivier Lamy wrote: > >>>>>> > >>>>>> On Thu, 16 Feb 2023 at 20:07, Delany > >>>>>> wrote: > >>>>>>> > >>>>>>> Hi Stephane, > >>>>>>> > >>>>>>> You can do like this > >>>>>>> > >>>>>>> > >>>>>>> maven-surefire-plugin > >>>>>>> 3.0.0-M9 > >>>>>>> > >>>>>>> > >>>>>>> org.apache.commons > >>>>>>> commons-email > >>>>>>> 1.5 > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>> > >>>>>> this will add dependencies to the surefire plugin itself. > >>>>>> I guess Stephane wants to add to the jvm running the tests? > >>>>>> > >>>>>> additionalClasspathElement expect a full path to a directory or a file > >>>>>> to be added to the classpath > >>>>>> > >>>>>> should work with something such but you need to assume commons-email > >>>>>> has been resolved locally as a dependency. > >>>>>> ${settings.localRepository}/org/apache/commons/commons-email/1.5/commons-email-1.5.jar > >>>>>> > >>>>>> another solution is to use dependency:copy to copy the commons-email > >>>>>> dependency somewhere in ./target and use this path (see > >>>>>> https://maven.apache.org/plugins/maven-dependency-plugin/examples/copying-artifacts.html) > >>>>>> > >>>>> > >>>>> a real example here :) > >>>>> https://github.com/apache/maven-surefire/blob/master/surefire-providers/common-junit48/pom.xml > >>>>> > >>>>>> hth > >>>>>> Olivier > >>>>>> > >>>>>>> > >>>>>>> On Thu, 16 Feb 2023 at 11:25, Stephane Passignat > >>>>>>> > >>>>>>> wrote: > >>>>>>> > >>>>>>>> Hello, > >>>>>>>> > >>>>>>>> Is it possible to add a maven artifact as an > >>>>>>>> additionalClasspathElement ? > >>>>>>>> > >>>>>>>> I tried this syntax, inspired by the exclusion mechanism, but it's > >>>>>>>> not > >>>>>>
Re: maven-surefire-plugin add artifact as additionalClasspathElement
Which is exactly why I was asking. I want to learn about real-world use cases which would require such a thing, not be just nice to have. Over-engineering POMs does not make them more readable or maintainable. Alexander Kriegisch https://scrum-master.de Mikael Åsberg schrieb am 16.02.2023 um 13:03: > I use runtime scope a lot, but personally can't recall having needed > the equivalent of a test-runtime scope myself (or, more likely, I > could get away with test compile scope even though the dependency was > only needed at test runtime). But just because I haven't needed it > doesn't mean there are no legit circumstances. > > On Thu, Feb 16, 2023 at 12:57 PM Alexander Kriegisch > wrote: >> >> For a test, does it really matter to make the dependency test-scoped? >> >> Mikael Åsberg schrieb am 16.02.2023 um 12:35: >>> Because there exists runtime, but no test only runtime scope >>> >>> On Thu, Feb 16, 2023 at 12:22 PM Alexander Kriegisch >>> wrote: >>>> >>>> I would be more interested first in why this should be necessary at all. >>>> What is the use case that would not be covered by declaring a regular >>>> test-scoped dependency in the module? >>>> -- >>>> Alexander Kriegisch >>>> https://scrum-master.de >>>> >>>> >>>> Olivier Lamy schrieb am 16.02.2023 um 11:58: >>>>> On Thu, 16 Feb 2023 at 20:52, Olivier Lamy wrote: >>>>>> >>>>>> On Thu, 16 Feb 2023 at 20:07, Delany wrote: >>>>>>> >>>>>>> Hi Stephane, >>>>>>> >>>>>>> You can do like this >>>>>>> >>>>>>> >>>>>>> maven-surefire-plugin >>>>>>> 3.0.0-M9 >>>>>>> >>>>>>> >>>>>>> org.apache.commons >>>>>>> commons-email >>>>>>> 1.5 >>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>>> this will add dependencies to the surefire plugin itself. >>>>>> I guess Stephane wants to add to the jvm running the tests? >>>>>> >>>>>> additionalClasspathElement expect a full path to a directory or a file >>>>>> to be added to the classpath >>>>>> >>>>>> should work with something such but you need to assume commons-email >>>>>> has been resolved locally as a dependency. >>>>>> ${settings.localRepository}/org/apache/commons/commons-email/1.5/commons-email-1.5.jar >>>>>> >>>>>> another solution is to use dependency:copy to copy the commons-email >>>>>> dependency somewhere in ./target and use this path (see >>>>>> https://maven.apache.org/plugins/maven-dependency-plugin/examples/copying-artifacts.html) >>>>>> >>>>> >>>>> a real example here :) >>>>> https://github.com/apache/maven-surefire/blob/master/surefire-providers/common-junit48/pom.xml >>>>> >>>>>> hth >>>>>> Olivier >>>>>> >>>>>>> >>>>>>> On Thu, 16 Feb 2023 at 11:25, Stephane Passignat >>>>>>> wrote: >>>>>>> >>>>>>>> Hello, >>>>>>>> >>>>>>>> Is it possible to add a maven artifact as an >>>>>>>> additionalClasspathElement ? >>>>>>>> >>>>>>>> I tried this syntax, inspired by the exclusion mechanism, but it's not >>>>>>>> working. >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> org.apache.maven.plugins >>>>>>>> maven-surefire-plugin >>>>>>>> 3.0.0-M9 >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> org.apache.commons:commons-email:1.5 >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> thank you >>>>>>>> >>>>>>>> Stéphane >>>>>>>> >>>>> >>>>> - >>>>> 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 >>>> >>> >>> - >>> 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 >> > > - > 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: maven-surefire-plugin add artifact as additionalClasspathElement
I use runtime scope a lot, but personally can't recall having needed the equivalent of a test-runtime scope myself (or, more likely, I could get away with test compile scope even though the dependency was only needed at test runtime). But just because I haven't needed it doesn't mean there are no legit circumstances. On Thu, Feb 16, 2023 at 12:57 PM Alexander Kriegisch wrote: > > For a test, does it really matter to make the dependency test-scoped? > > Mikael Åsberg schrieb am 16.02.2023 um 12:35: > > Because there exists runtime, but no test only runtime scope > > > > On Thu, Feb 16, 2023 at 12:22 PM Alexander Kriegisch > > wrote: > >> > >> I would be more interested first in why this should be necessary at all. > >> What is the use case that would not be covered by declaring a regular > >> test-scoped dependency in the module? > >> -- > >> Alexander Kriegisch > >> https://scrum-master.de > >> > >> > >> Olivier Lamy schrieb am 16.02.2023 um 11:58: > >>> On Thu, 16 Feb 2023 at 20:52, Olivier Lamy wrote: > >>>> > >>>> On Thu, 16 Feb 2023 at 20:07, Delany wrote: > >>>>> > >>>>> Hi Stephane, > >>>>> > >>>>> You can do like this > >>>>> > >>>>> > >>>>> maven-surefire-plugin > >>>>> 3.0.0-M9 > >>>>> > >>>>> > >>>>> org.apache.commons > >>>>> commons-email > >>>>> 1.5 > >>>>> > >>>>> > >>>>> > >>>> > >>>> this will add dependencies to the surefire plugin itself. > >>>> I guess Stephane wants to add to the jvm running the tests? > >>>> > >>>> additionalClasspathElement expect a full path to a directory or a file > >>>> to be added to the classpath > >>>> > >>>> should work with something such but you need to assume commons-email > >>>> has been resolved locally as a dependency. > >>>> ${settings.localRepository}/org/apache/commons/commons-email/1.5/commons-email-1.5.jar > >>>> > >>>> another solution is to use dependency:copy to copy the commons-email > >>>> dependency somewhere in ./target and use this path (see > >>>> https://maven.apache.org/plugins/maven-dependency-plugin/examples/copying-artifacts.html) > >>>> > >>> > >>> a real example here :) > >>> https://github.com/apache/maven-surefire/blob/master/surefire-providers/common-junit48/pom.xml > >>> > >>>> hth > >>>> Olivier > >>>> > >>>>> > >>>>> On Thu, 16 Feb 2023 at 11:25, Stephane Passignat > >>>>> wrote: > >>>>> > >>>>>> Hello, > >>>>>> > >>>>>> Is it possible to add a maven artifact as an > >>>>>> additionalClasspathElement ? > >>>>>> > >>>>>> I tried this syntax, inspired by the exclusion mechanism, but it's not > >>>>>> working. > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> org.apache.maven.plugins > >>>>>> maven-surefire-plugin > >>>>>> 3.0.0-M9 > >>>>>> > >>>>>> > >>>>>> > >>>>>> org.apache.commons:commons-email:1.5 > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> thank you > >>>>>> > >>>>>> Stéphane > >>>>>> > >>> > >>> - > >>> 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 > >> > > > > - > > 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 > - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: maven-surefire-plugin add artifact as additionalClasspathElement
For a test, does it really matter to make the dependency test-scoped? Mikael Åsberg schrieb am 16.02.2023 um 12:35: > Because there exists runtime, but no test only runtime scope > > On Thu, Feb 16, 2023 at 12:22 PM Alexander Kriegisch > wrote: >> >> I would be more interested first in why this should be necessary at all. >> What is the use case that would not be covered by declaring a regular >> test-scoped dependency in the module? >> -- >> Alexander Kriegisch >> https://scrum-master.de >> >> >> Olivier Lamy schrieb am 16.02.2023 um 11:58: >>> On Thu, 16 Feb 2023 at 20:52, Olivier Lamy wrote: >>>> >>>> On Thu, 16 Feb 2023 at 20:07, Delany wrote: >>>>> >>>>> Hi Stephane, >>>>> >>>>> You can do like this >>>>> >>>>> >>>>> maven-surefire-plugin >>>>> 3.0.0-M9 >>>>> >>>>> >>>>> org.apache.commons >>>>> commons-email >>>>> 1.5 >>>>> >>>>> >>>>> >>>> >>>> this will add dependencies to the surefire plugin itself. >>>> I guess Stephane wants to add to the jvm running the tests? >>>> >>>> additionalClasspathElement expect a full path to a directory or a file >>>> to be added to the classpath >>>> >>>> should work with something such but you need to assume commons-email >>>> has been resolved locally as a dependency. >>>> ${settings.localRepository}/org/apache/commons/commons-email/1.5/commons-email-1.5.jar >>>> >>>> another solution is to use dependency:copy to copy the commons-email >>>> dependency somewhere in ./target and use this path (see >>>> https://maven.apache.org/plugins/maven-dependency-plugin/examples/copying-artifacts.html) >>>> >>> >>> a real example here :) >>> https://github.com/apache/maven-surefire/blob/master/surefire-providers/common-junit48/pom.xml >>> >>>> hth >>>> Olivier >>>> >>>>> >>>>> On Thu, 16 Feb 2023 at 11:25, Stephane Passignat >>>>> wrote: >>>>> >>>>>> Hello, >>>>>> >>>>>> Is it possible to add a maven artifact as an additionalClasspathElement ? >>>>>> >>>>>> I tried this syntax, inspired by the exclusion mechanism, but it's not >>>>>> working. >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> org.apache.maven.plugins >>>>>> maven-surefire-plugin >>>>>> 3.0.0-M9 >>>>>> >>>>>> >>>>>> >>>>>> org.apache.commons:commons-email:1.5 >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> thank you >>>>>> >>>>>> Stéphane >>>>>> >>> >>> - >>> 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 >> > > - > 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: maven-surefire-plugin add artifact as additionalClasspathElement
Because there exists runtime, but no test only runtime scope On Thu, Feb 16, 2023 at 12:22 PM Alexander Kriegisch wrote: > > I would be more interested first in why this should be necessary at all. > What is the use case that would not be covered by declaring a regular > test-scoped dependency in the module? > -- > Alexander Kriegisch > https://scrum-master.de > > > Olivier Lamy schrieb am 16.02.2023 um 11:58: > > On Thu, 16 Feb 2023 at 20:52, Olivier Lamy wrote: > >> > >> On Thu, 16 Feb 2023 at 20:07, Delany wrote: > >>> > >>> Hi Stephane, > >>> > >>> You can do like this > >>> > >>> > >>> maven-surefire-plugin > >>> 3.0.0-M9 > >>> > >>> > >>> org.apache.commons > >>> commons-email > >>> 1.5 > >>> > >>> > >>> > >> > >> this will add dependencies to the surefire plugin itself. > >> I guess Stephane wants to add to the jvm running the tests? > >> > >> additionalClasspathElement expect a full path to a directory or a file > >> to be added to the classpath > >> > >> should work with something such but you need to assume commons-email > >> has been resolved locally as a dependency. > >> ${settings.localRepository}/org/apache/commons/commons-email/1.5/commons-email-1.5.jar > >> > >> another solution is to use dependency:copy to copy the commons-email > >> dependency somewhere in ./target and use this path (see > >> https://maven.apache.org/plugins/maven-dependency-plugin/examples/copying-artifacts.html) > >> > > > > a real example here :) > > https://github.com/apache/maven-surefire/blob/master/surefire-providers/common-junit48/pom.xml > > > >> hth > >> Olivier > >> > >>> > >>> On Thu, 16 Feb 2023 at 11:25, Stephane Passignat > >>> wrote: > >>> > >>>> Hello, > >>>> > >>>> Is it possible to add a maven artifact as an additionalClasspathElement ? > >>>> > >>>> I tried this syntax, inspired by the exclusion mechanism, but it's not > >>>> working. > >>>> > >>>> > >>>> > >>>> > >>>> org.apache.maven.plugins > >>>> maven-surefire-plugin > >>>> 3.0.0-M9 > >>>> > >>>> > >>>> > >>>> org.apache.commons:commons-email:1.5 > >>>> > >>>> > >>>> > >>>> > >>>> > >>>> > >>>> > >>>> thank you > >>>> > >>>> Stéphane > >>>> > > > > - > > 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 > - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: maven-surefire-plugin add artifact as additionalClasspathElement
I would be more interested first in why this should be necessary at all. What is the use case that would not be covered by declaring a regular test-scoped dependency in the module? -- Alexander Kriegisch https://scrum-master.de Olivier Lamy schrieb am 16.02.2023 um 11:58: > On Thu, 16 Feb 2023 at 20:52, Olivier Lamy wrote: >> >> On Thu, 16 Feb 2023 at 20:07, Delany wrote: >>> >>> Hi Stephane, >>> >>> You can do like this >>> >>> >>> maven-surefire-plugin >>> 3.0.0-M9 >>> >>> >>> org.apache.commons >>> commons-email >>> 1.5 >>> >>> >>> >> >> this will add dependencies to the surefire plugin itself. >> I guess Stephane wants to add to the jvm running the tests? >> >> additionalClasspathElement expect a full path to a directory or a file >> to be added to the classpath >> >> should work with something such but you need to assume commons-email >> has been resolved locally as a dependency. >> ${settings.localRepository}/org/apache/commons/commons-email/1.5/commons-email-1.5.jar >> >> another solution is to use dependency:copy to copy the commons-email >> dependency somewhere in ./target and use this path (see >> https://maven.apache.org/plugins/maven-dependency-plugin/examples/copying-artifacts.html) >> > > a real example here :) > https://github.com/apache/maven-surefire/blob/master/surefire-providers/common-junit48/pom.xml > >> hth >> Olivier >> >>> >>> On Thu, 16 Feb 2023 at 11:25, Stephane Passignat >>> wrote: >>> >>>> Hello, >>>> >>>> Is it possible to add a maven artifact as an additionalClasspathElement ? >>>> >>>> I tried this syntax, inspired by the exclusion mechanism, but it's not >>>> working. >>>> >>>> >>>> >>>> >>>> org.apache.maven.plugins >>>> maven-surefire-plugin >>>> 3.0.0-M9 >>>> >>>> >>>> >>>> org.apache.commons:commons-email:1.5 >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> thank you >>>> >>>> Stéphane >>>> > > - > 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: maven-surefire-plugin add artifact as additionalClasspathElement
On Thu, 16 Feb 2023 at 20:52, Olivier Lamy wrote: > > On Thu, 16 Feb 2023 at 20:07, Delany wrote: > > > > Hi Stephane, > > > > You can do like this > > > > > > maven-surefire-plugin > > 3.0.0-M9 > > > > > > org.apache.commons > > commons-email > > 1.5 > > > > > > > > this will add dependencies to the surefire plugin itself. > I guess Stephane wants to add to the jvm running the tests? > > additionalClasspathElement expect a full path to a directory or a file > to be added to the classpath > > should work with something such but you need to assume commons-email > has been resolved locally as a dependency. > ${settings.localRepository}/org/apache/commons/commons-email/1.5/commons-email-1.5.jar > > another solution is to use dependency:copy to copy the commons-email > dependency somewhere in ./target and use this path (see > https://maven.apache.org/plugins/maven-dependency-plugin/examples/copying-artifacts.html) > a real example here :) https://github.com/apache/maven-surefire/blob/master/surefire-providers/common-junit48/pom.xml > hth > Olivier > > > > > On Thu, 16 Feb 2023 at 11:25, Stephane Passignat > > wrote: > > > > > Hello, > > > > > > Is it possible to add a maven artifact as an additionalClasspathElement ? > > > > > > I tried this syntax, inspired by the exclusion mechanism, but it's not > > > working. > > > > > > > > > > > > > > > org.apache.maven.plugins > > > maven-surefire-plugin > > > 3.0.0-M9 > > > > > > > > > > > > org.apache.commons:commons-email:1.5 > > > > > > > > > > > > > > > > > > > > > > > > thank you > > > > > > Stéphane > > > - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: maven-surefire-plugin add artifact as additionalClasspathElement
On Thu, 16 Feb 2023 at 20:07, Delany wrote: > > Hi Stephane, > > You can do like this > > > maven-surefire-plugin > 3.0.0-M9 > > > org.apache.commons > commons-email > 1.5 > > > this will add dependencies to the surefire plugin itself. I guess Stephane wants to add to the jvm running the tests? additionalClasspathElement expect a full path to a directory or a file to be added to the classpath should work with something such but you need to assume commons-email has been resolved locally as a dependency. ${settings.localRepository}/org/apache/commons/commons-email/1.5/commons-email-1.5.jar another solution is to use dependency:copy to copy the commons-email dependency somewhere in ./target and use this path (see https://maven.apache.org/plugins/maven-dependency-plugin/examples/copying-artifacts.html) hth Olivier > > On Thu, 16 Feb 2023 at 11:25, Stephane Passignat > wrote: > > > Hello, > > > > Is it possible to add a maven artifact as an additionalClasspathElement ? > > > > I tried this syntax, inspired by the exclusion mechanism, but it's not > > working. > > > > > > > > > > org.apache.maven.plugins > > maven-surefire-plugin > > 3.0.0-M9 > > > > > > > > org.apache.commons:commons-email:1.5 > > > > > > > > > > > > > > > > thank you > > > > Stéphane > > - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: maven-surefire-plugin add artifact as additionalClasspathElement
Hi Stephane, You can do like this maven-surefire-plugin 3.0.0-M9 org.apache.commons commons-email 1.5 On Thu, 16 Feb 2023 at 11:25, Stephane Passignat wrote: > Hello, > > Is it possible to add a maven artifact as an additionalClasspathElement ? > > I tried this syntax, inspired by the exclusion mechanism, but it's not > working. > > > > > org.apache.maven.plugins > maven-surefire-plugin > 3.0.0-M9 > > > > org.apache.commons:commons-email:1.5 > > > > > > > > thank you > > Stéphane >
maven-surefire-plugin add artifact as additionalClasspathElement
Hello, Is it possible to add a maven artifact as an additionalClasspathElement ? I tried this syntax, inspired by the exclusion mechanism, but it's not working. org.apache.maven.plugins maven-surefire-plugin 3.0.0-M9 org.apache.commons:commons-email:1.5 thank you Stéphane
Injecting JUnit-4 Parallel Execution Parameters in Surefire Plugin
Hi Everyone, I'm currently creating a package from where I would want to set JUnit parallel execution parameters like below : *classesAndMethods 1 1 false* I'm planning to use Instrumentation API to inject these parameters. I tried to find the correct place where I can do so, but failed to find one. Please point me to a class from where these values are being honoured So that I could inject these parameters there. You could also suggest a way to set these values apart from adding them to the element. I tried intercepting different surefire classes like ForkedBooter, JUnit4Provider, JUnitCoreProvider but after that the execution didn't happen according to specified parameters. -- Thanks & Regards Kamalpreet Kaur
Re: Are "M" versions of Surefire plugin pre-release?
Those M version schemes are quite annoying, but the download site lists M7 as „current stable“ and since ASF projects are not supposed to provide pre-release archives anyway I would say go for it. Especially if you need 3.x.x API/Format/Features. However, the version Progression on this page suggests otherwise: https://maven.apache.org/surefire/maven-surefire-plugin/history.html - maybe it should give an ETA or the number of upcoming milestones… BTW the release notes link on the m-s-p subsite is broken. BTW in maven numbing the -M qualifiers will sort before the unqualified 3.0.0 version. Gruss Bernd -- http://bernd.eckenfels.net Von: Олег АндреичЪ Gesendet: Tuesday, September 6, 2022 7:54:40 AM An: users@maven.apache.org Betreff: Are "M" versions of Surefire plugin pre-release? Hello Are "M" versions of the Surefire plugin (like 3.0.0-M7) pre-release? Should one use "M" versions or the latest version without "M" (2.22.2)? Usually, I see "M" as a "Milestone," which is pre-release, but I want to be sure this time. Unfortunately, I haven't found info about my question in docs and mailing list. In case there is a prior discussion about this, please point me to it.
Are "M" versions of Surefire plugin pre-release?
Hello Are "M" versions of the Surefire plugin (like 3.0.0-M7) pre-release? Should one use "M" versions or the latest version without "M" (2.22.2)? Usually, I see "M" as a "Milestone," which is pre-release, but I want to be sure this time. Unfortunately, I haven't found info about my question in docs and mailing list. In case there is a prior discussion about this, please point me to it.
[ANN] Apache Maven Surefire Plugin 3.0.0-M6 Released
The Apache Maven team is pleased to announce the release of the Apache Maven Surefire Plugin, version 3.0.0-M6. The release contains 111 bug fixes. Again we received contributions from the community in the form of bug reports and bug fixes. Thank you and keep them coming! https://maven.apache.org/surefire/index.html You should specify the version in your project's plugin configuration: org.apache.maven.plugins maven-surefire-plugin 3.0.0-M6 or for failsafe: org.apache.maven.plugins maven-failsafe-plugin 3.0.0-M6 or for surefire-report: org.apache.maven.plugins maven-surefire-report-plugin 3.0.0-M6 You can download the appropriate sources etc. from the download page: https://maven.apache.org/surefire/download.cgi Release Notes - Maven Surefire - Version 3.0.0-M6 Bug - [SUREFIRE-1398 <https://issues.apache.org/jira/browse/SUREFIRE-1398>] - TestNG test fails when both JUnitCore provider and TestNG provider are on classpath - [SUREFIRE-1426 <https://issues.apache.org/jira/browse/SUREFIRE-1426>] - Fork crash doesn't fail build with -Dmaven.test.failure.ignore=true - [SUREFIRE-1432 <https://issues.apache.org/jira/browse/SUREFIRE-1432>] - trimStackTrace = false by default - [SUREFIRE-1556 <https://issues.apache.org/jira/browse/SUREFIRE-1556>] - Test XML file is not valid when rerun "fails" with an assumption - [SUREFIRE-1659 <https://issues.apache.org/jira/browse/SUREFIRE-1659>] - Log4j logger in TestExecutionListener corrupts Surefire's STDOUT. - [SUREFIRE-1800 <https://issues.apache.org/jira/browse/SUREFIRE-1800>] - SurefireForkChannel binds to wrong IP - [SUREFIRE-1806 <https://issues.apache.org/jira/browse/SUREFIRE-1806>] - Site: Link to "TCP/IP Communication between Forks" is broken - [SUREFIRE-1809 <https://issues.apache.org/jira/browse/SUREFIRE-1809>] - Differences between Oracle JDK and AdoptOpenJDK caused by JPMS - [SUREFIRE-1815 <https://issues.apache.org/jira/browse/SUREFIRE-1815>] - Thread interrupted state cleared on any console output - [SUREFIRE-1820 <https://issues.apache.org/jira/browse/SUREFIRE-1820>] - Using SurefireForkNodeFactory with JDK8 results in NoSuchMethodError - [SUREFIRE-1840 <https://issues.apache.org/jira/browse/SUREFIRE-1840>] - Why sudo docker? - [SUREFIRE-1842 <https://issues.apache.org/jira/browse/SUREFIRE-1842>] - Surefire - NPE at end of successful test run - [SUREFIRE-1844 <https://issues.apache.org/jira/browse/SUREFIRE-1844>] - Trademarks / privacy policy footer displays broken - [SUREFIRE-1851 <https://issues.apache.org/jira/browse/SUREFIRE-1851>] - NPE in SmartStackTraceParser causes false positive test results - [SUREFIRE-1857 <https://issues.apache.org/jira/browse/SUREFIRE-1857>] - JUnit 5 report does not contain assertion failure message - [SUREFIRE-1865 <https://issues.apache.org/jira/browse/SUREFIRE-1865>] - ChecksumCalculator getSha1 does not compute checksums correctly - [SUREFIRE-1869 <https://issues.apache.org/jira/browse/SUREFIRE-1869>] - Classloader.getResource() doesn't encode blanks with forkCount=0 - [SUREFIRE-1881 <https://issues.apache.org/jira/browse/SUREFIRE-1881>] - Java agent printing to native console makes build block when using SurefireForkNodeFactory - [SUREFIRE-1882 <https://issues.apache.org/jira/browse/SUREFIRE-1882>] - Fix failures when compiled on Java 9+ and run on Java 8 - [SUREFIRE-1890 <https://issues.apache.org/jira/browse/SUREFIRE-1890>] - Not compatible with TestNG 7.4.0 - [SUREFIRE-1894 <https://issues.apache.org/jira/browse/SUREFIRE-1894>] - Surefire report XML schema is incomplete (attribute version not allowed in testsuite) - [SUREFIRE-1909 <https://issues.apache.org/jira/browse/SUREFIRE-1909>] - Support JUnit 5 reflection access by changing add-exports to add-opens - [SUREFIRE-1910 <https://issues.apache.org/jira/browse/SUREFIRE-1910>] - Misleading error message when using -Dtest= - [SUREFIRE-1912 <https://issues.apache.org/jira/browse/SUREFIRE-1912>] - user.dir should not be set lazily within the surefire fork JVM - [SUREFIRE-1913 <https://issues.apache.org/jira/browse/SUREFIRE-1913>] - system properties should be restored after the in-process tests have been executed - [SUREFIRE-1914 <https://issues.apache.org/jira/browse/SUREFIRE-1914>] - XML report omits method signature / display name of Junit 5 parameterized tests if testset reporter is configured to use phrased naming - [SUREFIRE-1926 <https://issues.apache.org/jira/browse/SUREFIRE-1926>] - Console logs should be synchronized - [SUREFIRE-1935 <https://issues.apache.org/jira/browse/SUREFIRE-1935>] - Upgrade to JUnit Platform 1.8, start Launcher via LauncherSes
Re: maven-surefire-plugin jdkToolchain meets forkCount
Yes it looks that way. I changed the system jdk to 16 and now I can pick a jdk with the toolchains plugin and without any surefire config. Its basically https://issues.apache.org/jira/browse/MTOOLCHAINS-28 all over again but with surefire-plugin Want a ticket? Delany On Thu, 26 Aug 2021 at 17:50, Thomas Broyer wrote: > IIUC, with forkCount=0, you're disabling forking, so everything happens in > the Maven process itself and won't use the configured toolchain. If you're > running Maven with a JDK < 9 then you'd have that > UnsupportedClassVersionError. > > For the first case, with forkCount being its default value (forkCount=1) I > suppose, can you share the stacktrace? > It might be (I haven't checked) that the plugin looks at (loads) the > compiled classes to determine how to actually fork/run the tests (e.g. > determine if a given class is a test class, by looking at the @Test > annotations with JUnit 4 for instance). If that's the case then it means > you have to run Maven with a JDK version greater than the one you'd want to > use as a toolchain. In other words you can run Maven with JDK 11 to run > your tests with JDK 8, but not run Maven with JDK 8 to run tests with JDK > 11. > > On Thu, Aug 26, 2021 at 3:32 PM Delany wrote: > > > Hi. Im having trouble with the jdkToolchain feature of > > maven-surefire-plugin > > > > > https://maven.apache.org/surefire/maven-surefire-plugin/examples/toolchains.html > > This is my working build tag > > > > > > > > > > > > maven-compiler-plugin > > > > 8 > > 8 > > > > > > > > maven-surefire-plugin > > > > > > 9 > > > > > > > > > > > > > > > > maven-toolchains-plugin > > > > > > > > > > > > 9 > > > > > > > > > > > > > > > > > > > > I can build with the above config no problem, but if I configure the > > compile plugin with 9, surefire throws > > > > > Execution default-test of goal > > org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M5:test failed: > > java.lang.UnsupportedClassVersionError: > > com/etc/common/crypto/clientreference/TestClientToken has been compiled > by > > a more recent version of the Java Runtime (class file version 53.0), this > > version of the Java Runtime only recognizes class file versions up to > 52.0 > > > > In either case I can see the toolchain being configured in the build log > > > > [INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) > @ > > cryptocommon --- > > [INFO] Toolchain in maven-compiler-plugin: JDK[/usr/lib/jvm/zulu-9-amd64] > > [INFO] Changes detected - recompiling the module! > > [INFO] Compiling 7 source files to > > /git/tep22x/common_cryptocommon/target/test-classes > > [INFO] > > [INFO] --- maven-surefire-plugin:3.0.0-M5:test (default-test) @ > > cryptocommon --- > > [INFO] Toolchain in maven-surefire-plugin: JDK[/usr/lib/jvm/zulu-9-amd64] > > > > Now, if on top of my changes thus far I go and configure surefire-plugin > > with 1, it's back to a successful build. > > > > But, if I follow the advice of > > > > > https://maven.apache.org/surefire/maven-surefire-plugin/examples/class-loading.html > > and rather set 0, I get this > > > > [ERROR] Exception in provider > > [ERROR] org.apache.maven.surefire.booter.SurefireExecutionException: > > Exception in provider > > [ERROR] at > > > > > org.apache.maven.plugin.surefire.InPluginVMSurefireStarter.runSuitesInProcess(InPluginVMSurefireStarter.java:91) > > [ERROR] at > > > > > org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1295) > > [ERROR] at > > > > > org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:1159) > > [ERROR] at > > > > > org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.j
Re: maven-surefire-plugin jdkToolchain meets forkCount
IIUC, with forkCount=0, you're disabling forking, so everything happens in the Maven process itself and won't use the configured toolchain. If you're running Maven with a JDK < 9 then you'd have that UnsupportedClassVersionError. For the first case, with forkCount being its default value (forkCount=1) I suppose, can you share the stacktrace? It might be (I haven't checked) that the plugin looks at (loads) the compiled classes to determine how to actually fork/run the tests (e.g. determine if a given class is a test class, by looking at the @Test annotations with JUnit 4 for instance). If that's the case then it means you have to run Maven with a JDK version greater than the one you'd want to use as a toolchain. In other words you can run Maven with JDK 11 to run your tests with JDK 8, but not run Maven with JDK 8 to run tests with JDK 11. On Thu, Aug 26, 2021 at 3:32 PM Delany wrote: > Hi. Im having trouble with the jdkToolchain feature of > maven-surefire-plugin > > https://maven.apache.org/surefire/maven-surefire-plugin/examples/toolchains.html > This is my working build tag > > > > > > maven-compiler-plugin > > 8 > 8 > > > > maven-surefire-plugin > > > 9 > > > > > > > > maven-toolchains-plugin > > > > > > 9 > > > > > > > > > > I can build with the above config no problem, but if I configure the > compile plugin with 9, surefire throws > > > Execution default-test of goal > org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M5:test failed: > java.lang.UnsupportedClassVersionError: > com/etc/common/crypto/clientreference/TestClientToken has been compiled by > a more recent version of the Java Runtime (class file version 53.0), this > version of the Java Runtime only recognizes class file versions up to 52.0 > > In either case I can see the toolchain being configured in the build log > > [INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ > cryptocommon --- > [INFO] Toolchain in maven-compiler-plugin: JDK[/usr/lib/jvm/zulu-9-amd64] > [INFO] Changes detected - recompiling the module! > [INFO] Compiling 7 source files to > /git/tep22x/common_cryptocommon/target/test-classes > [INFO] > [INFO] --- maven-surefire-plugin:3.0.0-M5:test (default-test) @ > cryptocommon --- > [INFO] Toolchain in maven-surefire-plugin: JDK[/usr/lib/jvm/zulu-9-amd64] > > Now, if on top of my changes thus far I go and configure surefire-plugin > with 1, it's back to a successful build. > > But, if I follow the advice of > > https://maven.apache.org/surefire/maven-surefire-plugin/examples/class-loading.html > and rather set 0, I get this > > [ERROR] Exception in provider > [ERROR] org.apache.maven.surefire.booter.SurefireExecutionException: > Exception in provider > [ERROR] at > > org.apache.maven.plugin.surefire.InPluginVMSurefireStarter.runSuitesInProcess(InPluginVMSurefireStarter.java:91) > [ERROR] at > > org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1295) > [ERROR] at > > org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:1159) > [ERROR] at > > org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:932) > [ERROR] at > > org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137) > [ERROR] at > > org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210) > [ERROR] at > > org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156) > [ERROR] at > > org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148) > [ERROR] at > > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117) > [ERROR] at > > org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call(MultiThreadedBuilder.java:196) > [ERROR] at > > org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call(MultiThreadedBuilder.java:186) > [ERROR] at j
Re: maven-surefire-plugin jdkToolchain meets forkCount
>From the looks of it, your toolchains plugin might not get executed. Are you sure you've configured execution phase to "validate" in toolchains plugin? Last when I had to use toolchains plugin I don't remember needing to configure particular surefire properties. See java9 with toolchains.xml https://maven.apache.org/surefire/maven-surefire-plugin/java9.html org.apache.maven.plugins maven-toolchains-plugin 1.1 validate toolchain 9 On Thu, Aug 26, 2021 at 1:31 PM Delany wrote: > > Hi. Im having trouble with the jdkToolchain feature of maven-surefire-plugin > https://maven.apache.org/surefire/maven-surefire-plugin/examples/toolchains.html > This is my working build tag > > > > > > maven-compiler-plugin > > 8 > 8 > > > > maven-surefire-plugin > > > 9 > > > > > > > > maven-toolchains-plugin > > > > > > 9 > > > > > > > > > > I can build with the above config no problem, but if I configure the > compile plugin with 9, surefire throws > > > Execution default-test of goal > org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M5:test failed: > java.lang.UnsupportedClassVersionError: > com/etc/common/crypto/clientreference/TestClientToken has been compiled by > a more recent version of the Java Runtime (class file version 53.0), this > version of the Java Runtime only recognizes class file versions up to 52.0 > > In either case I can see the toolchain being configured in the build log > > [INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ > cryptocommon --- > [INFO] Toolchain in maven-compiler-plugin: JDK[/usr/lib/jvm/zulu-9-amd64] > [INFO] Changes detected - recompiling the module! > [INFO] Compiling 7 source files to > /git/tep22x/common_cryptocommon/target/test-classes > [INFO] > [INFO] --- maven-surefire-plugin:3.0.0-M5:test (default-test) @ > cryptocommon --- > [INFO] Toolchain in maven-surefire-plugin: JDK[/usr/lib/jvm/zulu-9-amd64] > > Now, if on top of my changes thus far I go and configure surefire-plugin > with 1, it's back to a successful build. > > But, if I follow the advice of > https://maven.apache.org/surefire/maven-surefire-plugin/examples/class-loading.html > and rather set 0, I get this > > [ERROR] Exception in provider > [ERROR] org.apache.maven.surefire.booter.SurefireExecutionException: > Exception in provider > [ERROR] at > org.apache.maven.plugin.surefire.InPluginVMSurefireStarter.runSuitesInProcess(InPluginVMSurefireStarter.java:91) > [ERROR] at > org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1295) > [ERROR] at > org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:1159) > [ERROR] at > org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:932) > [ERROR] at > org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137) > [ERROR] at > org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210) > [ERROR] at > org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156) > [ERROR] at > org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148) > [ERROR] at > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117) > [ERROR] at > org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call(MultiThreadedBuilder.java:196) > [ERROR] at > org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call(MultiThreadedBuilder.java:186) > [ERROR] at java.util.concurrent.FutureTask.run(FutureTask.java:266) > [ERROR] at > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) > [ERROR] at java.util.concurrent.FutureTask.run(FutureTask.java:266) > [ERROR] at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) > [ERROR]
maven-surefire-plugin jdkToolchain meets forkCount
Hi. Im having trouble with the jdkToolchain feature of maven-surefire-plugin https://maven.apache.org/surefire/maven-surefire-plugin/examples/toolchains.html This is my working build tag maven-compiler-plugin 8 8 maven-surefire-plugin 9 maven-toolchains-plugin 9 I can build with the above config no problem, but if I configure the compile plugin with 9, surefire throws > Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M5:test failed: java.lang.UnsupportedClassVersionError: com/etc/common/crypto/clientreference/TestClientToken has been compiled by a more recent version of the Java Runtime (class file version 53.0), this version of the Java Runtime only recognizes class file versions up to 52.0 In either case I can see the toolchain being configured in the build log [INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ cryptocommon --- [INFO] Toolchain in maven-compiler-plugin: JDK[/usr/lib/jvm/zulu-9-amd64] [INFO] Changes detected - recompiling the module! [INFO] Compiling 7 source files to /git/tep22x/common_cryptocommon/target/test-classes [INFO] [INFO] --- maven-surefire-plugin:3.0.0-M5:test (default-test) @ cryptocommon --- [INFO] Toolchain in maven-surefire-plugin: JDK[/usr/lib/jvm/zulu-9-amd64] Now, if on top of my changes thus far I go and configure surefire-plugin with 1, it's back to a successful build. But, if I follow the advice of https://maven.apache.org/surefire/maven-surefire-plugin/examples/class-loading.html and rather set 0, I get this [ERROR] Exception in provider [ERROR] org.apache.maven.surefire.booter.SurefireExecutionException: Exception in provider [ERROR] at org.apache.maven.plugin.surefire.InPluginVMSurefireStarter.runSuitesInProcess(InPluginVMSurefireStarter.java:91) [ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1295) [ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:1159) [ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:932) [ERROR] at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137) [ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210) [ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156) [ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148) [ERROR] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117) [ERROR] at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call(MultiThreadedBuilder.java:196) [ERROR] at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call(MultiThreadedBuilder.java:186) [ERROR] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [ERROR] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [ERROR] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [ERROR] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [ERROR] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [ERROR] at java.lang.Thread.run(Thread.java:748) [ERROR] Caused by: java.lang.UnsupportedClassVersionError: com/traderoot/common/crypto/clientreference/TestClientToken has been compiled by a more recent version of the Java Runtime (class file version 53.0), this version of the Java Runtime only recognizes class f ile versions up to 52.0 [ERROR] at java.lang.ClassLoader.defineClass1(Native Method) [ERROR] at java.lang.ClassLoader.defineClass(ClassLoader.java:756) [ERROR] at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) [ERROR] at java.net.URLClassLoader.defineClass(URLClassLoader.java:468) [ERROR] at java.net.URLClassLoader.access$100(URLClassLoader.java:74) [ERROR] at java.net.URLClassLoader$1.run(URLClassLoader.java:369) [ERROR] at java.net.URLClassLoader$1.run(URLClassLoader.java:363) [ERROR] at java.security.AccessController.doPrivileged(Native Method) [ERROR] at java.net.URLClassLoader.findClass(URLClassLoader.java:362) [ER
Re: Maven surefire plugin: parallel configuration not running tests in parallel
We will do our best as well. On one hand TeamCity uses flowId based on Thread ID, the surefire plugin can use a similar mechanism we used before in surefire-junit47-provider and we can identify the lines of system output by Thread ID. T On Wed, Feb 17, 2021 at 6:31 PM Jay Crosley wrote: > My plan is to run these serially for local development and in parallel for > TeamCity, and for TeamCity I think it will pick out the logs using flowId, > so hopefully that will work. > > From: Tibor Digana > Date: Wednesday, February 17, 2021 at 2:19 AM > To: Maven Users List > Subject: Re: Maven surefire plugin: parallel configuration not running > tests in parallel > In case of combining JUnit5 and Surefire/Failsafe, the configuration > parameters e.g. "parallel" and "threadCountClasses" are not bound to the > native JUnit parameters "junit.jupiter.execution.parallel.enabled" because > it was an agreement between Maven/JUnit teams and the solution became "by > design". We can talk about a new concept and bind these parameters of > course. > > Regarding the parallel execution has it's own logging problems in plugin on > the top of JUnit5 engine but that's another issue you may be facing. We are > approaching the fix step by step. > > Cheers > Tibor > > On Tue, Feb 16, 2021 at 11:04 PM Jay Crosley wrote: > > > I’m trying to get junit5 tests to run in parallel using the maven > surefire > > plugin, as described on > > > https://urldefense.proofpoint.com/v2/url?u=https-3A__maven.apache.org_surefire_maven-2Dsurefire-2Dplugin_examples_fork-2Doptions-2Dand-2Dparallel-2Dexecution.html=DwIFaQ=0hefKdg9jtsMu47wpF0ovg=qyxGgg8iek4zUTwPHqQd2x5bP20ZI2bxMqb2S9cASmw=M_2Gjt2FtuqAHQQ0HhrtLwLB6txc8A381wmGzx0q2jw=9y-T5guZoywkTqejMKcpEcM60c0Eg_HNafGvBD39cxM= > . > > Despite configuration that looks correct, I can’t get them to run in > > parallel. I’ll paste my configuration and what I’ve tried and experienced > > so far. Any help is greatly appreciated! > > > > My surefire plugin configuration looks like this: > > > > > > > > org.apache.maven.plugins > > maven-surefire-plugin > > 2.21.0 > > > > > > org.junit.platform > > junit-platform-surefire-provider > > 1.2.0 > > > > > > org.junit.jupiter > > junit-jupiter-engine > > 5.2.0 > > > > > > > > > > And I have a maven profile setup with additional configuration for our > > integration tests, which includes the parallel configuration. The > commented > > out configurations indicate all the things I’ve tried. > > > > > > > > integration-tests-local > > > > > > > > org.apache.maven.plugins > > maven-surefire-plugin > > ${surefire.version} > > > > classes > > 4 > > true > > > > > > > > > > > > false > > > > false > > > > none > > > > > > **/*IntegrationTests*.java > > > > > > > > > > > > > > The project is structured with a parent pom.xml and several sub-projects. > > The tests are in the “integration-tests” module, which pulls in the > > surefire plugin with no additional configuration: > > > > > > > > maven-surefire-plugin > > > > > > I mention the sub-project because it means that the maven command I’m > > running looks like this (I’ve tried with/without the “-T”): > > > > > > mvn -T 4 test -e -pl integration-tests -am -Pintegration-tests-local > > > > For the purposes of debugging, I’ve created 10 .java files named > > TestIntegrationTests1.java through TestIntegrationTests10.java, each of > > which has 10 unit tests all of which look like this: > > > > > > package com.axon.scorpius.integration_tests; > > > > import static org.junit.jupiter.api.Assertions.assertTrue; > > > > import org.junit.jupiter.api.Test; > > > > /** > > * Tests. > > */ > > public class TestIntegrationTests1 { > > > > @Test > > void test1() { > > try { > > Thread.sleep(1000); > > } catch (InterruptedException ex) { > > System.out.println("Interrupted exception: " + ex); > > } > > > > assertTrue(true);
Re: Maven surefire plugin: parallel configuration not running tests in parallel
My plan is to run these serially for local development and in parallel for TeamCity, and for TeamCity I think it will pick out the logs using flowId, so hopefully that will work. From: Tibor Digana Date: Wednesday, February 17, 2021 at 2:19 AM To: Maven Users List Subject: Re: Maven surefire plugin: parallel configuration not running tests in parallel In case of combining JUnit5 and Surefire/Failsafe, the configuration parameters e.g. "parallel" and "threadCountClasses" are not bound to the native JUnit parameters "junit.jupiter.execution.parallel.enabled" because it was an agreement between Maven/JUnit teams and the solution became "by design". We can talk about a new concept and bind these parameters of course. Regarding the parallel execution has it's own logging problems in plugin on the top of JUnit5 engine but that's another issue you may be facing. We are approaching the fix step by step. Cheers Tibor On Tue, Feb 16, 2021 at 11:04 PM Jay Crosley wrote: > I’m trying to get junit5 tests to run in parallel using the maven surefire > plugin, as described on > https://urldefense.proofpoint.com/v2/url?u=https-3A__maven.apache.org_surefire_maven-2Dsurefire-2Dplugin_examples_fork-2Doptions-2Dand-2Dparallel-2Dexecution.html=DwIFaQ=0hefKdg9jtsMu47wpF0ovg=qyxGgg8iek4zUTwPHqQd2x5bP20ZI2bxMqb2S9cASmw=M_2Gjt2FtuqAHQQ0HhrtLwLB6txc8A381wmGzx0q2jw=9y-T5guZoywkTqejMKcpEcM60c0Eg_HNafGvBD39cxM= > . > Despite configuration that looks correct, I can’t get them to run in > parallel. I’ll paste my configuration and what I’ve tried and experienced > so far. Any help is greatly appreciated! > > My surefire plugin configuration looks like this: > > > > org.apache.maven.plugins > maven-surefire-plugin > 2.21.0 > > > org.junit.platform > junit-platform-surefire-provider > 1.2.0 > > > org.junit.jupiter > junit-jupiter-engine > 5.2.0 > > > > > And I have a maven profile setup with additional configuration for our > integration tests, which includes the parallel configuration. The commented > out configurations indicate all the things I’ve tried. > > > > integration-tests-local > > > > org.apache.maven.plugins > maven-surefire-plugin > ${surefire.version} > > classes > 4 > true > > > > > > false > > false > > none > > > **/*IntegrationTests*.java > > > > > > > The project is structured with a parent pom.xml and several sub-projects. > The tests are in the “integration-tests” module, which pulls in the > surefire plugin with no additional configuration: > > > > maven-surefire-plugin > > > I mention the sub-project because it means that the maven command I’m > running looks like this (I’ve tried with/without the “-T”): > > > mvn -T 4 test -e -pl integration-tests -am -Pintegration-tests-local > > For the purposes of debugging, I’ve created 10 .java files named > TestIntegrationTests1.java through TestIntegrationTests10.java, each of > which has 10 unit tests all of which look like this: > > > package com.axon.scorpius.integration_tests; > > import static org.junit.jupiter.api.Assertions.assertTrue; > > import org.junit.jupiter.api.Test; > > /** > * Tests. > */ > public class TestIntegrationTests1 { > > @Test > void test1() { > try { > Thread.sleep(1000); > } catch (InterruptedException ex) { > System.out.println("Interrupted exception: " + ex); > } > > assertTrue(true); > } > > > > … 9 identical tests > > My hope is that when I run “mvn test” (I’m running locally in iTerm on a > Macbook), these 10 test classes will run in parallel (at least partially), > but they run serially, as seen here: > > INFO] --- > [INFO] T E S T S > [INFO] --- > [INFO] Running com.axon.scorpius.integration_tests.TestIntegrationTests4 > [INFO] Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: > 11.057 s - in com.axon.scorpius.integration_tests.TestIntegrationTests4 > [INFO] Running com.axon.scorpius.integration_tests.TestIntegrationTests6 > [INFO] Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: > 11.029 s - in com.axon.scorpius.integration_tests.TestIntegrationTests6 > [INFO] Running com.axon.scorpius.inte
Re: Maven surefire plugin: parallel configuration not running tests in parallel
In case of combining JUnit5 and Surefire/Failsafe, the configuration parameters e.g. "parallel" and "threadCountClasses" are not bound to the native JUnit parameters "junit.jupiter.execution.parallel.enabled" because it was an agreement between Maven/JUnit teams and the solution became "by design". We can talk about a new concept and bind these parameters of course. Regarding the parallel execution has it's own logging problems in plugin on the top of JUnit5 engine but that's another issue you may be facing. We are approaching the fix step by step. Cheers Tibor On Tue, Feb 16, 2021 at 11:04 PM Jay Crosley wrote: > I’m trying to get junit5 tests to run in parallel using the maven surefire > plugin, as described on > https://maven.apache.org/surefire/maven-surefire-plugin/examples/fork-options-and-parallel-execution.html. > Despite configuration that looks correct, I can’t get them to run in > parallel. I’ll paste my configuration and what I’ve tried and experienced > so far. Any help is greatly appreciated! > > My surefire plugin configuration looks like this: > > > > org.apache.maven.plugins > maven-surefire-plugin > 2.21.0 > > > org.junit.platform > junit-platform-surefire-provider > 1.2.0 > > > org.junit.jupiter > junit-jupiter-engine > 5.2.0 > > > > > And I have a maven profile setup with additional configuration for our > integration tests, which includes the parallel configuration. The commented > out configurations indicate all the things I’ve tried. > > > > integration-tests-local > > > > org.apache.maven.plugins > maven-surefire-plugin > ${surefire.version} > > classes > 4 > true > > > > > > false > > false > > none > > > **/*IntegrationTests*.java > > > > > > > The project is structured with a parent pom.xml and several sub-projects. > The tests are in the “integration-tests” module, which pulls in the > surefire plugin with no additional configuration: > > > > maven-surefire-plugin > > > I mention the sub-project because it means that the maven command I’m > running looks like this (I’ve tried with/without the “-T”): > > > mvn -T 4 test -e -pl integration-tests -am -Pintegration-tests-local > > For the purposes of debugging, I’ve created 10 .java files named > TestIntegrationTests1.java through TestIntegrationTests10.java, each of > which has 10 unit tests all of which look like this: > > > package com.axon.scorpius.integration_tests; > > import static org.junit.jupiter.api.Assertions.assertTrue; > > import org.junit.jupiter.api.Test; > > /** > * Tests. > */ > public class TestIntegrationTests1 { > > @Test > void test1() { > try { > Thread.sleep(1000); > } catch (InterruptedException ex) { > System.out.println("Interrupted exception: " + ex); > } > > assertTrue(true); > } > > > > … 9 identical tests > > My hope is that when I run “mvn test” (I’m running locally in iTerm on a > Macbook), these 10 test classes will run in parallel (at least partially), > but they run serially, as seen here: > > INFO] --- > [INFO] T E S T S > [INFO] --- > [INFO] Running com.axon.scorpius.integration_tests.TestIntegrationTests4 > [INFO] Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: > 11.057 s - in com.axon.scorpius.integration_tests.TestIntegrationTests4 > [INFO] Running com.axon.scorpius.integration_tests.TestIntegrationTests6 > [INFO] Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: > 11.029 s - in com.axon.scorpius.integration_tests.TestIntegrationTests6 > [INFO] Running com.axon.scorpius.integration_tests.TestIntegrationTests10 > [INFO] Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: > 11.025 s - in com.axon.scorpius.integration_tests.TestIntegrationTests10 > [INFO] Running com.axon.scorpius.integration_tests.TestIntegrationTests2 > [INFO] Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: > 11.027 s - in com.axon.scorpius.integration_tests.TestIntegrationTests2 > [INFO] Running com.axon.scorpius.integration_tests.TestIntegrationTests7 > [INFO] Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: > 11.032 s
Re: Maven surefire plugin: parallel configuration not running tests in parallel
On Tue, Feb 16, 2021 at 4:18 PM Jay Crosley wrote: > I take it back, the maven-failsafe-plugin works with the junit > configuration options you suggested. That was the one combination I hadn’t > tried. Woo hoo! > I should have mentioned: there are no other configuration settings necessary. Best, Laird
Re: Maven surefire plugin: parallel configuration not running tests in parallel
I take it back, the maven-failsafe-plugin works with the junit configuration options you suggested. That was the one combination I hadn’t tried. Woo hoo! From: Laird Nelson Date: Tuesday, February 16, 2021 at 4:01 PM To: Maven Users List Subject: Re: Maven surefire plugin: parallel configuration not running tests in parallel On Tue, Feb 16, 2021 at 4:00 PM Jay Crosley wrote: > Thank you. That looked promising but alas, I get the same result. I tried > those with and without the other surefire configurations for running > parallel tests. I also tried (from browsing the web) the > maven-failsafe-plugin with the various configurations and get the same > result with that too. > Best of luck; that configuration works for sure. Best, Laird
Re: Maven surefire plugin: parallel configuration not running tests in parallel
On Tue, Feb 16, 2021 at 4:00 PM Jay Crosley wrote: > Thank you. That looked promising but alas, I get the same result. I tried > those with and without the other surefire configurations for running > parallel tests. I also tried (from browsing the web) the > maven-failsafe-plugin with the various configurations and get the same > result with that too. > Best of luck; that configuration works for sure. Best, Laird
Re: Maven surefire plugin: parallel configuration not running tests in parallel
Thank you. That looked promising but alas, I get the same result. I tried those with and without the other surefire configurations for running parallel tests. I also tried (from browsing the web) the maven-failsafe-plugin with the various configurations and get the same result with that too. From: Laird Nelson Date: Tuesday, February 16, 2021 at 2:56 PM To: Maven Users List Subject: Re: Maven surefire plugin: parallel configuration not running tests in parallel JUnit5 does this in a strange way and they don't make it obvious. Try a recipe like this: maven-surefire-plugin junit.jupiter.execution.parallel.enabled=true junit.jupiter.execution.parallel.mode.default=concurrent Best, Laird On Tue, Feb 16, 2021 at 2:04 PM Jay Crosley wrote: > I’m trying to get junit5 tests to run in parallel using the maven surefire > plugin, as described on > https://urldefense.proofpoint.com/v2/url?u=https-3A__maven.apache.org_surefire_maven-2Dsurefire-2Dplugin_examples_fork-2Doptions-2Dand-2Dparallel-2Dexecution.html=DwIFaQ=0hefKdg9jtsMu47wpF0ovg=qyxGgg8iek4zUTwPHqQd2x5bP20ZI2bxMqb2S9cASmw=l4pkyWdpKGZmIkAgh8BX_Pucc2XXQLIcXqoMUG2MLQc=BDHGeYlib1BtRqkGRGkKw-wJorLBhcO0-Dh6mODYUhY= > . > Despite configuration that looks correct, I can’t get them to run in > parallel. I’ll paste my configuration and what I’ve tried and experienced > so far. Any help is greatly appreciated! > > My surefire plugin configuration looks like this: > > > > org.apache.maven.plugins > maven-surefire-plugin > 2.21.0 > > > org.junit.platform > junit-platform-surefire-provider > 1.2.0 > > > org.junit.jupiter > junit-jupiter-engine > 5.2.0 > > > > > And I have a maven profile setup with additional configuration for our > integration tests, which includes the parallel configuration. The commented > out configurations indicate all the things I’ve tried. > > > > integration-tests-local > > > > org.apache.maven.plugins > maven-surefire-plugin > ${surefire.version} > > classes > 4 > true > > > > > > false > > false > > none > > > **/*IntegrationTests*.java > > > > > > > The project is structured with a parent pom.xml and several sub-projects. > The tests are in the “integration-tests” module, which pulls in the > surefire plugin with no additional configuration: > > > > maven-surefire-plugin > > > I mention the sub-project because it means that the maven command I’m > running looks like this (I’ve tried with/without the “-T”): > > > mvn -T 4 test -e -pl integration-tests -am -Pintegration-tests-local > > For the purposes of debugging, I’ve created 10 .java files named > TestIntegrationTests1.java through TestIntegrationTests10.java, each of > which has 10 unit tests all of which look like this: > > > package com.axon.scorpius.integration_tests; > > import static org.junit.jupiter.api.Assertions.assertTrue; > > import org.junit.jupiter.api.Test; > > /** > * Tests. > */ > public class TestIntegrationTests1 { > > @Test > void test1() { > try { > Thread.sleep(1000); > } catch (InterruptedException ex) { > System.out.println("Interrupted exception: " + ex); > } > > assertTrue(true); > } > > > > … 9 identical tests > > My hope is that when I run “mvn test” (I’m running locally in iTerm on a > Macbook), these 10 test classes will run in parallel (at least partially), > but they run serially, as seen here: > > INFO] --- > [INFO] T E S T S > [INFO] --- > [INFO] Running com.axon.scorpius.integration_tests.TestIntegrationTests4 > [INFO] Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: > 11.057 s - in com.axon.scorpius.integration_tests.TestIntegrationTests4 > [INFO] Running com.axon.scorpius.integration_tests.TestIntegrationTests6 > [INFO] Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: > 11.029 s - in com.axon.scorpius.integration_tests.TestIntegrationTests6 > [INFO] Running com.axon.scorpius.integration_tests.TestIntegrationTests10 > [INFO] Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: > 11.025 s - in com.axon.scorpius.integration_tests.TestIntegratio
Re: Maven surefire plugin: parallel configuration not running tests in parallel
JUnit5 does this in a strange way and they don't make it obvious. Try a recipe like this: maven-surefire-plugin junit.jupiter.execution.parallel.enabled=true junit.jupiter.execution.parallel.mode.default=concurrent Best, Laird On Tue, Feb 16, 2021 at 2:04 PM Jay Crosley wrote: > I’m trying to get junit5 tests to run in parallel using the maven surefire > plugin, as described on > https://maven.apache.org/surefire/maven-surefire-plugin/examples/fork-options-and-parallel-execution.html. > Despite configuration that looks correct, I can’t get them to run in > parallel. I’ll paste my configuration and what I’ve tried and experienced > so far. Any help is greatly appreciated! > > My surefire plugin configuration looks like this: > > > > org.apache.maven.plugins > maven-surefire-plugin > 2.21.0 > > > org.junit.platform > junit-platform-surefire-provider > 1.2.0 > > > org.junit.jupiter > junit-jupiter-engine > 5.2.0 > > > > > And I have a maven profile setup with additional configuration for our > integration tests, which includes the parallel configuration. The commented > out configurations indicate all the things I’ve tried. > > > > integration-tests-local > > > > org.apache.maven.plugins > maven-surefire-plugin > ${surefire.version} > > classes > 4 > true > > > > > > false > > false > > none > > > **/*IntegrationTests*.java > > > > > > > The project is structured with a parent pom.xml and several sub-projects. > The tests are in the “integration-tests” module, which pulls in the > surefire plugin with no additional configuration: > > > > maven-surefire-plugin > > > I mention the sub-project because it means that the maven command I’m > running looks like this (I’ve tried with/without the “-T”): > > > mvn -T 4 test -e -pl integration-tests -am -Pintegration-tests-local > > For the purposes of debugging, I’ve created 10 .java files named > TestIntegrationTests1.java through TestIntegrationTests10.java, each of > which has 10 unit tests all of which look like this: > > > package com.axon.scorpius.integration_tests; > > import static org.junit.jupiter.api.Assertions.assertTrue; > > import org.junit.jupiter.api.Test; > > /** > * Tests. > */ > public class TestIntegrationTests1 { > > @Test > void test1() { > try { > Thread.sleep(1000); > } catch (InterruptedException ex) { > System.out.println("Interrupted exception: " + ex); > } > > assertTrue(true); > } > > > > … 9 identical tests > > My hope is that when I run “mvn test” (I’m running locally in iTerm on a > Macbook), these 10 test classes will run in parallel (at least partially), > but they run serially, as seen here: > > INFO] --- > [INFO] T E S T S > [INFO] --- > [INFO] Running com.axon.scorpius.integration_tests.TestIntegrationTests4 > [INFO] Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: > 11.057 s - in com.axon.scorpius.integration_tests.TestIntegrationTests4 > [INFO] Running com.axon.scorpius.integration_tests.TestIntegrationTests6 > [INFO] Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: > 11.029 s - in com.axon.scorpius.integration_tests.TestIntegrationTests6 > [INFO] Running com.axon.scorpius.integration_tests.TestIntegrationTests10 > [INFO] Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: > 11.025 s - in com.axon.scorpius.integration_tests.TestIntegrationTests10 > [INFO] Running com.axon.scorpius.integration_tests.TestIntegrationTests2 > [INFO] Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: > 11.027 s - in com.axon.scorpius.integration_tests.TestIntegrationTests2 > [INFO] Running com.axon.scorpius.integration_tests.TestIntegrationTests7 > [INFO] Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: > 11.032 s - in com.axon.scorpius.integration_tests.TestIntegrationTests7 > [INFO] Running com.axon.scorpius.integration_tests.TestIntegrationTests5 > [INFO] Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: > 11.027 s - in com.axon.scorpius.integration_tests.TestIntegrationTests5 > [INFO] Running com.axon.scorpius.
Maven surefire plugin: parallel configuration not running tests in parallel
I’m trying to get junit5 tests to run in parallel using the maven surefire plugin, as described on https://maven.apache.org/surefire/maven-surefire-plugin/examples/fork-options-and-parallel-execution.html. Despite configuration that looks correct, I can’t get them to run in parallel. I’ll paste my configuration and what I’ve tried and experienced so far. Any help is greatly appreciated! My surefire plugin configuration looks like this: org.apache.maven.plugins maven-surefire-plugin 2.21.0 org.junit.platform junit-platform-surefire-provider 1.2.0 org.junit.jupiter junit-jupiter-engine 5.2.0 And I have a maven profile setup with additional configuration for our integration tests, which includes the parallel configuration. The commented out configurations indicate all the things I’ve tried. integration-tests-local org.apache.maven.plugins maven-surefire-plugin ${surefire.version} classes 4 true false false none **/*IntegrationTests*.java The project is structured with a parent pom.xml and several sub-projects. The tests are in the “integration-tests” module, which pulls in the surefire plugin with no additional configuration: maven-surefire-plugin I mention the sub-project because it means that the maven command I’m running looks like this (I’ve tried with/without the “-T”): mvn -T 4 test -e -pl integration-tests -am -Pintegration-tests-local For the purposes of debugging, I’ve created 10 .java files named TestIntegrationTests1.java through TestIntegrationTests10.java, each of which has 10 unit tests all of which look like this: package com.axon.scorpius.integration_tests; import static org.junit.jupiter.api.Assertions.assertTrue; import org.junit.jupiter.api.Test; /** * Tests. */ public class TestIntegrationTests1 { @Test void test1() { try { Thread.sleep(1000); } catch (InterruptedException ex) { System.out.println("Interrupted exception: " + ex); } assertTrue(true); } … 9 identical tests My hope is that when I run “mvn test” (I’m running locally in iTerm on a Macbook), these 10 test classes will run in parallel (at least partially), but they run serially, as seen here: INFO] --- [INFO] T E S T S [INFO] --- [INFO] Running com.axon.scorpius.integration_tests.TestIntegrationTests4 [INFO] Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 11.057 s - in com.axon.scorpius.integration_tests.TestIntegrationTests4 [INFO] Running com.axon.scorpius.integration_tests.TestIntegrationTests6 [INFO] Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 11.029 s - in com.axon.scorpius.integration_tests.TestIntegrationTests6 [INFO] Running com.axon.scorpius.integration_tests.TestIntegrationTests10 [INFO] Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 11.025 s - in com.axon.scorpius.integration_tests.TestIntegrationTests10 [INFO] Running com.axon.scorpius.integration_tests.TestIntegrationTests2 [INFO] Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 11.027 s - in com.axon.scorpius.integration_tests.TestIntegrationTests2 [INFO] Running com.axon.scorpius.integration_tests.TestIntegrationTests7 [INFO] Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 11.032 s - in com.axon.scorpius.integration_tests.TestIntegrationTests7 [INFO] Running com.axon.scorpius.integration_tests.TestIntegrationTests5 [INFO] Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 11.027 s - in com.axon.scorpius.integration_tests.TestIntegrationTests5 [INFO] Running com.axon.scorpius.integration_tests.TestIntegrationTests1 [INFO] Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 11.032 s - in com.axon.scorpius.integration_tests.TestIntegrationTests1 [INFO] Running com.axon.scorpius.integration_tests.TestIntegrationTests3 [INFO] Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 11.036 s - in com.axon.scorpius.integration_tests.TestIntegrationTests3 [INFO] Running com.axon.scorpius.integration_tests.TestIntegrationTests9 [INFO] Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 11.013 s - in com.axon.scorpius.integration_tests.TestIntegrationTests9 [INFO] Running com.axon.scorpius.integration_tests.TestIntegrationTests8 [INFO] Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 11.026 s - in com.axon.scorpius.integration_tests.TestIntegrationTests8 [INFO] [INFO] Results: [INFO] [WARNING] Tests run: 113, Failures: 0, Errors: 0, Skipped: 2
[ANN] Apache Maven Surefire Plugin 3.0.0-M5 Released
The Apache Maven team is pleased to announce the release of the Apache Maven Surefire Plugin, version 3.0.0-M5. The release contains 40 bug fixes. Again we received contributions from the community in the form of bug reports and bug fixes. Thank you and keep them coming! http://maven.apache.org/plugins/maven-surefire-plugin/ You should specify the version in your project's plugin configuration: org.apache.maven.plugins maven-surefire-plugin 3.0.0-M5 or for failsafe: org.apache.maven.plugins maven-failsafe-plugin 3.0.0-M5 or for surefire-report: org.apache.maven.plugins maven-surefire-report-plugin 3.0.0-M5 You can download the appropriate sources etc. from the download page: https://maven.apache.org/surefire/download.cgi Release Notes - Maven Surefire - Version 3.0.0-M5 Bug - [SUREFIRE-1570 <https://issues.apache.org/jira/browse/SUREFIRE-1570>] - Maven-fail-safe doesn't put testing JPMS module on module path - [SUREFIRE-1695 <https://issues.apache.org/jira/browse/SUREFIRE-1695>] - Support multiple inheritance of @Categories - [SUREFIRE-1719 <https://issues.apache.org/jira/browse/SUREFIRE-1719>] - Race condition results in "VM crash or System.exit called?" failure - [SUREFIRE-1721 <https://issues.apache.org/jira/browse/SUREFIRE-1721>] - fixed typo in JavaDoc for Failsafe: mvn test -Dsurefire.enableProcessChecker=all - [SUREFIRE-1725 <https://issues.apache.org/jira/browse/SUREFIRE-1725>] - Surefire in JUnit Vintage mode distributes tests very unevenly between forks, causing poor parallelism - [SUREFIRE-1741 <https://issues.apache.org/jira/browse/SUREFIRE-1741>] - Exceptions in parameterized test sources are ignored - [SUREFIRE-1746 <https://issues.apache.org/jira/browse/SUREFIRE-1746>] - Dependencies for dynamic provider contain Maven artifacts from the MOJO plugin - [SUREFIRE-1748 <https://issues.apache.org/jira/browse/SUREFIRE-1748>] - JUnit 5 Assertions.fail() breaks reporting - [SUREFIRE-1749 <https://issues.apache.org/jira/browse/SUREFIRE-1749>] - Correct useSystemClassloader used in message - [SUREFIRE-1759 <https://issues.apache.org/jira/browse/SUREFIRE-1759>] - NullPointerException from RunEntryStatisticsMap#serialize when there's a class-level @Ignore annotation - [SUREFIRE-1762 <https://issues.apache.org/jira/browse/SUREFIRE-1762>] - skipAfterFailureCount>0 with testng 7.1.0 resulting in java.lang.NoSuchMethodError: org.testng.TestNG.addListener(Lorg/testng/ITestListener;)V - [SUREFIRE-1782 <https://issues.apache.org/jira/browse/SUREFIRE-1782>] - Configured Environment Variables do not take effect unless also added to excludedEnvironmentVariables - [SUREFIRE-1783 <https://issues.apache.org/jira/browse/SUREFIRE-1783>] - Fork JVM defined by Toolchain should not inherit JAVA_HOME from Maven process - [SUREFIRE-1784 <https://issues.apache.org/jira/browse/SUREFIRE-1784>] - Fork JVM defined by jvm parameter should not inherit JAVA_HOME from Maven process - [SUREFIRE-1797 <https://issues.apache.org/jira/browse/SUREFIRE-1797>] - Surefire report with parameterized tests contain all names of test the same New Feature - [SUREFIRE-1234 <https://issues.apache.org/jira/browse/SUREFIRE-1234>] - Allow to configure JVM for tests by referencing a toolchain entry - [SUREFIRE-1516 <https://issues.apache.org/jira/browse/SUREFIRE-1516>] - Should surefire specialize test runner when test isolation (i.e., fork) is needed? - [SUREFIRE-1658 <https://issues.apache.org/jira/browse/SUREFIRE-1658>] - TCP/IP Channel for forked Surefire JVM. Extensions API and SPI. Polymorphism for remote and local process communication. - [SUREFIRE-1744 <https://issues.apache.org/jira/browse/SUREFIRE-1744>] - Enable system-out for successfully passed tests as well - [SUREFIRE-1766 <https://issues.apache.org/jira/browse/SUREFIRE-1766>] - Surefire does not display TestNG data provider values on command line Improvement - [SUREFIRE-1378 <https://issues.apache.org/jira/browse/SUREFIRE-1378>] - Nice to have systemPropertiesFile configurable by user property - [SUREFIRE-1728 <https://issues.apache.org/jira/browse/SUREFIRE-1728>] - maven.test.failure.ignore: differentiate between test failure and timeout - [SUREFIRE-1729 <https://issues.apache.org/jira/browse/SUREFIRE-1729>] - Run Order / JUnit5 supported in the Feature Matrix + tests - [SUREFIRE-1733 <https://issues.apache.org/jira/browse/SUREFIRE-1733>] - Surefire and Failsafe JPMS additions for JUnit 5.x execution - [SUREFIRE-1740 <https://issues.apache.org/jira/browse/SUREFIRE-1740>] - Prerequisite implementation for SUREFIRE-1658 - [SUREFIRE-1758 <https://issues.apache.org/jira/browse/SUREFIRE-1758
[maven-surefire-plugin] message published by JUnit5-TestReporter does not appear in surefire report
Hello, I uploaded this simple project to illustrate my observation: https://github.com/gabalawi/junit5-testreporter Maybe someone could help me with clarifying - if there is a bug or lacking feature in the surefire plugin - or if I did not properly configure the surefire plugin - or if it is up to another plugin (maven-reporting?) to pick up the TestReporter's publications - or if I have some misunderstanding about the TestReporter intentions usage at all Thank you very much in advance, kind regards, Heinz -- Heinz Knoche Consultant Development Public Authorities Web & Application Security secunet Security Networks AG www.secunet.com signature.asc Description: This is a digitally signed message part
[ANN] Apache Maven Surefire Plugin 3.0.0-M4 Released
The Apache Maven team is pleased to announce the release of the Apache Maven Surefire Plugin, version 3.0.0-M4. The release contains 43 bug fixes. Again we received contributions from the community in form of bug reports and bug fixes. Thank you and keep them coming! http://maven.apache.org/plugins/maven-surefire-plugin/ You should specify the version in your project's plugin configuration: org.apache.maven.plugins maven-surefire-plugin 3.0.0-M4 or for failsafe: org.apache.maven.plugins maven-failsafe-plugin 3.0.0-M4 or for surefire-report: org.apache.maven.plugins maven-surefire-report-plugin 3.0.0-M4 You can download the appropriate sources etc. from the download page: https://maven.apache.org/surefire/download.cgi Release Notes - Maven Surefire - Version3.0.0-M4 Bug [SUREFIRE-1222] - ForkClient attempts to consume unrelated lines [SUREFIRE-1464] - Failsafe plugin exposes slf4j-jdk14 dependency [SUREFIRE-1534] - Surefire 2.21.0 ClassNotFoundException: org.apache.maven.plugin.surefire.StartupReportConfiguration using reuseForks set to false [SUREFIRE-1546] - JUnit 5 runner does not honor JUnit 5 display names [SUREFIRE-1664] - "plugin's wiki page" points to non-existing web page [SUREFIRE-1669] - POJO tests do not call fixture methods setUp and tearDown and test instances are not new between tests [SUREFIRE-1670] - wrong "Filtering by Test Class Names" in failsafe "Using JUnit 5 Platform" page [SUREFIRE-1675] - Forked JVM terminates with 'halt' when another module's tests fail [SUREFIRE-1679] - Caching of provider classpath with module-specific changes may break test bootstrapping in subsequent modules [SUREFIRE-1684] - The documentation of Maven Surefire Report Plugin contains wrong number of plugin goals [SUREFIRE-1689] - The fast PpidChecker is switched to the slow 30 seconds PING after the subprocess (/bin/ps -o etime= -p ...) failed with exit 1 [SUREFIRE-1690] - Typo fixed: classpathDependencyExclude [SUREFIRE-1701] - Surefire / Failsafe rerun failed tests functionality fails with JUnit 5 if using @DisplayName [SUREFIRE-1707] - Forked JVM is killed when GC paused the tests for over 30 seconds [SUREFIRE-1712] - Running tests with JDK13 fails with Unsupported class file major version 57 [SUREFIRE-1716] - JUnit5 Parameterized tests and re-run should see unique test runs with different parameters New Feature [SUREFIRE-1584] - Rerun Failing Tests with JUnit 5 [SUREFIRE-1705] - new config parameter Exclude Environment Variables [SUREFIRE-1711] - Support @ParameterizedTest for JUnit 5 test reruns [SUREFIRE-1717] - Enable Process Checkers Improvement [SUREFIRE-1004] - Enhance pattern/wildcard capabilities for dependenciesToScan to GAVT [SUREFIRE-1585] - Align JUnit Platform version at runtime [SUREFIRE-1617] - Surefire fails with bad message when path contains colon [SUREFIRE-1619] - FileReporter should not use PintWriter because i/o errors are not thrown [SUREFIRE-1620] - Replaced deprecated component ArtifactFactory with RepositorySystem [SUREFIRE-1634] - Add missing since tags to excludesFile and includesFile [SUREFIRE-1635] - Set properties readonly where it doesn't make sense to change values [SUREFIRE-1647] - When using junit5, delay loading testClass and use myown classLoader [SUREFIRE-1666] - printSummary=false does not completely suppress the summary on the console [SUREFIRE-1668] - The stackTrace should use CDATA in XML report. [SUREFIRE-1682] - Default value for config parameter 'shutdown' should change from 'testset' to 'exit' [SUREFIRE-1702] - [JDK 11 Alpine Linux] JAR content is not flushed completely down to drive "Error: Invalid or corrupt jarfile target/surefire/surefirebooter13749914711390838584.jar" [SUREFIRE-1703] - [JDK 11 Alpine Linux] Surefire handled random order of pid and /procps does not filter pid on busybox distributions [SUREFIRE-1704] - [JDK 11 Alpine Linux] long etime within hours has format 2h01 on busybox Task [SUREFIRE-1678] - JUnit5 Integration Tests should test wide spectrum of versions [SUREFIRE-1683] - Buildfix: TLS 1.2 passed to maven-invoker-plugin via system property [SUREFIRE-1706] - Use the checkstyle in tests and set includeTestSourceDirectory=true [SUREFIRE-1714] - Created module "surefire-shared-utils" as a required dependency in "surefire-extensions-api" and "maven-surefire-common" Dependency upgrade [SUREFIRE-1642] - Upgrade plexus-java to Version 1.0.3 [SUREFIRE-1646] - Upgrade maven-artifact-transfer Version 0.11.0 [SUREFIRE-1672] - DOXIA updated to version 1.9 [SUREFIRE-1674] - DOXIA TOOLS updated to version 1.9.1 [SUREFIRE-1685] - Upgrade maven-fluido-skin to 1.8 and maven-site-plugin to 3.8.2 Enjoy, -The Apache Maven team
Re: surefire-plugin v3.0.0-M4 release
Hi Walid, You are writing right on the time! We could not make a new release because we interrupted important fix in Surefire and we concentrated on: + build process issues + new Maven release 3.6.2 + Resolver 1.4.1 + JDK 1.8 vs Archetype 3.1.1 and 3.1.2 We have finished all these activities and the team will cut a new version of Maven quite soon. We have returned back from vacations, and Enrico and me will recover the activity we previously interrupted in Surefire. I guess we won't have a big blocker next days and hopefully we will get a new release soon! Cheers Tibor17 On Thu, Aug 22, 2019 at 11:38 PM Walid Bounouar wrote: > Hi, > > I am just wondering if there is a timeline for the release of the > surefire-plugin version 3.0.0-M4 or if there's a way for me to track such a > thing? > > Thanks for the help! > > Walid Bounouar >
surefire-plugin v3.0.0-M4 release
Hi, I am just wondering if there is a timeline for the release of the surefire-plugin version 3.0.0-M4 or if there's a way for me to track such a thing? Thanks for the help! Walid Bounouar
Re: There seems to be a mistake in the documentation - MAVEN SUREFIRE PLUGIN
Thank you On Fri, Jul 26, 2019 at 1:47 PM Tibor Digana wrote: > Hello Moina, > > I have reported this issue in JIRA > https://issues.apache.org/jira/browse/SUREFIRE-1684 > > Cheers > Tibor17 > > On Fri, Jul 19, 2019 at 2:26 PM Moina Farheen > wrote: > > > Hi, > > > > I am a beginner and just started to learn maven for my project. I was > > reading about surefire plugin on the site and found this - > > > > image.png > > > > As I see here, there are 3 goals in this plugin but why does it say there > > "Surefire Report Plugin only has one goal" > > Have I misunderstood? > > > > Appreciate response. > > > > Thanks > > >
Re: There seems to be a mistake in the documentation - MAVEN SUREFIRE PLUGIN
Hello Moina, I have reported this issue in JIRA https://issues.apache.org/jira/browse/SUREFIRE-1684 Cheers Tibor17 On Fri, Jul 19, 2019 at 2:26 PM Moina Farheen wrote: > Hi, > > I am a beginner and just started to learn maven for my project. I was > reading about surefire plugin on the site and found this - > > image.png > > As I see here, there are 3 goals in this plugin but why does it say there > "Surefire Report Plugin only has one goal" > Have I misunderstood? > > Appreciate response. > > Thanks >
Re: There seems to be a mistake in the documentation - MAVEN SUREFIRE PLUGIN
yes, thats the one. On Fri, Jul 19, 2019 at 1:49 PM Tibor Digana wrote: > btw, you did not attach the image. > > You mean this? > (You can open a Jira ticket and fix in PR on > github.com/apache/maven-surefire) > > The Surefire Report Plugin only has one goal (the other is a workaround): > >- surefire-report:failsafe-report-only >< > https://maven.apache.org/surefire/maven-surefire-report-plugin/failsafe-report-only-mojo.html > > >This goal does not run the tests, it only builds the IT reports. See >SUREFIRE-257 <https://issues.apache.org/jira/browse/SUREFIRE-257> >- surefire-report:report >< > https://maven.apache.org/surefire/maven-surefire-report-plugin/report-mojo.html > > >Generates the test results report into HTML format. >- surefire-report:report-only >< > https://maven.apache.org/surefire/maven-surefire-report-plugin/report-only-mojo.html > > >This goal does not run the tests, it only builds the reports. It is >provided as a work around for SUREFIRE-2 ><https://issues.apache.org/jira/browse/SUREFIRE-257> > > > On Fri, Jul 19, 2019 at 2:26 PM Moina Farheen > wrote: > > > Hi, > > > > I am a beginner and just started to learn maven for my project. I was > > reading about surefire plugin on the site and found this - > > > > image.png > > > > As I see here, there are 3 goals in this plugin but why does it say there > > "Surefire Report Plugin only has one goal" > > Have I misunderstood? > > > > Appreciate response. > > > > Thanks > > >
Re: There seems to be a mistake in the documentation - MAVEN SUREFIRE PLUGIN
btw, you did not attach the image. You mean this? (You can open a Jira ticket and fix in PR on github.com/apache/maven-surefire) The Surefire Report Plugin only has one goal (the other is a workaround): - surefire-report:failsafe-report-only <https://maven.apache.org/surefire/maven-surefire-report-plugin/failsafe-report-only-mojo.html> This goal does not run the tests, it only builds the IT reports. See SUREFIRE-257 <https://issues.apache.org/jira/browse/SUREFIRE-257> - surefire-report:report <https://maven.apache.org/surefire/maven-surefire-report-plugin/report-mojo.html> Generates the test results report into HTML format. - surefire-report:report-only <https://maven.apache.org/surefire/maven-surefire-report-plugin/report-only-mojo.html> This goal does not run the tests, it only builds the reports. It is provided as a work around for SUREFIRE-2 <https://issues.apache.org/jira/browse/SUREFIRE-257> On Fri, Jul 19, 2019 at 2:26 PM Moina Farheen wrote: > Hi, > > I am a beginner and just started to learn maven for my project. I was > reading about surefire plugin on the site and found this - > > image.png > > As I see here, there are 3 goals in this plugin but why does it say there > "Surefire Report Plugin only has one goal" > Have I misunderstood? > > Appreciate response. > > Thanks >
There seems to be a mistake in the documentation - MAVEN SUREFIRE PLUGIN
Hi, I am a beginner and just started to learn maven for my project. I was reading about surefire plugin on the site and found this - image.png As I see here, there are 3 goals in this plugin but why does it say there "Surefire Report Plugin only has one goal" Have I misunderstood? Appreciate response. Thanks
[ANN] Apache Maven Surefire Plugin 2.22.2 Released
The Apache Maven team is pleased to announce the release of the Apache Maven Surefire Plugin, version 2.22.2. The release contains 1 bug fix about JUnit 5 Compatibility Again we received contributions from the community in form of bug reports and bug fixes. Thank you and keep them coming! http://maven.apache.org/plugins/maven-surefire-plugin/ You should specify the version in your project's plugin configuration: org.apache.maven.plugins maven-surefire-plugin 2.22.2 or for failsafe: org.apache.maven.plugins maven-failsafe-plugin 2.22.2 or for surefire-report: org.apache.maven.plugins maven-surefire-report-plugin 2.22.2 You can download the appropriate sources etc. from the download page: https://maven.apache.org/surefire/download.cgi Release Notes - Maven Surefire - Version 2.22.2 ** Bug * [SUREFIRE-1614] - JUnit Runner that writes to System.out corrupts Surefire's STDOUT when using JUnit's Vintage Engine Enjoy, -The Apache Maven team
Re: Surefire plugin with multi-release?
Well this escalated quickly :) Now to find some time to look at this. I'll pull the plugin code later On 6 Apr 2019, at 19:52, Tibor Digana wrote: > Mark, do not forget to update documentation with certain usecase(s). > Configure your tool (prefer IntelliJ IDEA) with code style, see the > instructions in > https://maven.apache.org/developers/conventions/code.html# > IntelliJ_IDEA_4.5.2B > and download https://maven.apache.org/developers/maven-idea-codestyle.xml --- "The ease with which a change can be implemented has no relevance at all to whether it is the right change for the (Java) Platform for all time." Mark Reinhold. Mark Derricutt http://www.theoryinpractice.net http://www.chaliceofblood.net http://plus.google.com/+MarkDerricutt http://twitter.com/talios http://facebook.com/mderricutt signature.asc Description: OpenPGP digital signature
Re: Surefire plugin with multi-release?
the XML works with IDEA 14 (not higher). Feel free to update the codestyle XML for IDEA 18+. On Sat, Apr 6, 2019 at 8:52 AM Tibor Digana wrote: > Mark, do not forget to update documentation with certain usecase(s). > Configure your tool (prefer IntelliJ IDEA) with code style, see the > instructions in > https://maven.apache.org/developers/conventions/code.html# > IntelliJ_IDEA_4.5.2B > and download https://maven.apache.org/developers/maven-idea-codestyle.xml > > On Sat, Apr 6, 2019 at 8:48 AM Tibor Digana > wrote: > >> Mark, provide a patch including the unit tests in pull request on GitHub. >> We are spending the time with tasks related to our long standing plan. >> >> On Fri, Apr 5, 2019 at 10:35 AM Robert Scholte >> wrote: >> >>> I think what Mark means is a jdkToolchain parameter[1] like >>> maven-compiler-plugin. >>> This way you can execute with several different toolchains within the >>> same >>> Maven run. >>> To me it makes sense to add that to surefire/failsafe >>> >>> Robert >>> >>> [1] >>> >>> https://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#jdkToolchain >>> >>> On Thu, 04 Apr 2019 23:54:38 +0200, Tibor Digana >>> >>> wrote: >>> >>> > You can use Toolchain with Failsafe plugin: >>> > https://maven.apache.org/surefire/maven-surefire-plugin/java9.html >>> > but you can configure multiple executions and phases for the >>> > maven-toolchains-plugin. >>> > >>> > On Thu, Apr 4, 2019 at 11:09 PM Mark Derricutt >>> wrote: >>> > >>> >> On 5 Apr 2019, at 6:29, Robert Scholte wrote: >>> >> >>> >> If you want to test the jar, you must use the failsafe plugin (or bind >>> >> surefire to the integration-test phase) >>> >> >>> >> Can/could failsafe take a toolchain id as config, then you could >>> >> configure >>> >> additional executions using each toolchain you wanted? >>> >> -- >>> >> >>> >> "The ease with which a change can be implemented has no relevance at >>> all >>> >> to whether it is the right change for the (Java) Platform for all >>> >> time." — >>> >> Mark Reinhold. >>> >> >>> >> Mark Derricutt >>> >> http://www.theoryinpractice.net >>> >> http://www.chaliceofblood.net >>> >> http://plus.google.com/+MarkDerricutt >>> >> http://twitter.com/talios >>> >> http://facebook.com/mderricutt >>> >>> - >>> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org >>> For additional commands, e-mail: users-h...@maven.apache.org >>> >>>
Re: Surefire plugin with multi-release?
Mark, do not forget to update documentation with certain usecase(s). Configure your tool (prefer IntelliJ IDEA) with code style, see the instructions in https://maven.apache.org/developers/conventions/code.html# IntelliJ_IDEA_4.5.2B and download https://maven.apache.org/developers/maven-idea-codestyle.xml On Sat, Apr 6, 2019 at 8:48 AM Tibor Digana wrote: > Mark, provide a patch including the unit tests in pull request on GitHub. > We are spending the time with tasks related to our long standing plan. > > On Fri, Apr 5, 2019 at 10:35 AM Robert Scholte > wrote: > >> I think what Mark means is a jdkToolchain parameter[1] like >> maven-compiler-plugin. >> This way you can execute with several different toolchains within the >> same >> Maven run. >> To me it makes sense to add that to surefire/failsafe >> >> Robert >> >> [1] >> >> https://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#jdkToolchain >> >> On Thu, 04 Apr 2019 23:54:38 +0200, Tibor Digana >> >> wrote: >> >> > You can use Toolchain with Failsafe plugin: >> > https://maven.apache.org/surefire/maven-surefire-plugin/java9.html >> > but you can configure multiple executions and phases for the >> > maven-toolchains-plugin. >> > >> > On Thu, Apr 4, 2019 at 11:09 PM Mark Derricutt wrote: >> > >> >> On 5 Apr 2019, at 6:29, Robert Scholte wrote: >> >> >> >> If you want to test the jar, you must use the failsafe plugin (or bind >> >> surefire to the integration-test phase) >> >> >> >> Can/could failsafe take a toolchain id as config, then you could >> >> configure >> >> additional executions using each toolchain you wanted? >> >> -- >> >> >> >> "The ease with which a change can be implemented has no relevance at >> all >> >> to whether it is the right change for the (Java) Platform for all >> >> time." — >> >> Mark Reinhold. >> >> >> >> Mark Derricutt >> >> http://www.theoryinpractice.net >> >> http://www.chaliceofblood.net >> >> http://plus.google.com/+MarkDerricutt >> >> http://twitter.com/talios >> >> http://facebook.com/mderricutt >> >> - >> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org >> For additional commands, e-mail: users-h...@maven.apache.org >> >>
Re: Surefire plugin with multi-release?
Mark, provide a patch including the unit tests in pull request on GitHub. We are spending the time with tasks related to our long standing plan. On Fri, Apr 5, 2019 at 10:35 AM Robert Scholte wrote: > I think what Mark means is a jdkToolchain parameter[1] like > maven-compiler-plugin. > This way you can execute with several different toolchains within the > same > Maven run. > To me it makes sense to add that to surefire/failsafe > > Robert > > [1] > > https://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#jdkToolchain > > On Thu, 04 Apr 2019 23:54:38 +0200, Tibor Digana > > wrote: > > > You can use Toolchain with Failsafe plugin: > > https://maven.apache.org/surefire/maven-surefire-plugin/java9.html > > but you can configure multiple executions and phases for the > > maven-toolchains-plugin. > > > > On Thu, Apr 4, 2019 at 11:09 PM Mark Derricutt wrote: > > > >> On 5 Apr 2019, at 6:29, Robert Scholte wrote: > >> > >> If you want to test the jar, you must use the failsafe plugin (or bind > >> surefire to the integration-test phase) > >> > >> Can/could failsafe take a toolchain id as config, then you could > >> configure > >> additional executions using each toolchain you wanted? > >> -- > >> > >> "The ease with which a change can be implemented has no relevance at all > >> to whether it is the right change for the (Java) Platform for all > >> time." — > >> Mark Reinhold. > >> > >> Mark Derricutt > >> http://www.theoryinpractice.net > >> http://www.chaliceofblood.net > >> http://plus.google.com/+MarkDerricutt > >> http://twitter.com/talios > >> http://facebook.com/mderricutt > > - > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > >
Re: Surefire plugin with multi-release?
I think what Mark means is a jdkToolchain parameter[1] like maven-compiler-plugin. This way you can execute with several different toolchains within the same Maven run. To me it makes sense to add that to surefire/failsafe Robert [1] https://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#jdkToolchain On Thu, 04 Apr 2019 23:54:38 +0200, Tibor Digana wrote: You can use Toolchain with Failsafe plugin: https://maven.apache.org/surefire/maven-surefire-plugin/java9.html but you can configure multiple executions and phases for the maven-toolchains-plugin. On Thu, Apr 4, 2019 at 11:09 PM Mark Derricutt wrote: On 5 Apr 2019, at 6:29, Robert Scholte wrote: If you want to test the jar, you must use the failsafe plugin (or bind surefire to the integration-test phase) Can/could failsafe take a toolchain id as config, then you could configure additional executions using each toolchain you wanted? -- "The ease with which a change can be implemented has no relevance at all to whether it is the right change for the (Java) Platform for all time." — Mark Reinhold. Mark Derricutt http://www.theoryinpractice.net http://www.chaliceofblood.net http://plus.google.com/+MarkDerricutt http://twitter.com/talios http://facebook.com/mderricutt - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Surefire plugin with multi-release?
You can use Toolchain with Failsafe plugin: https://maven.apache.org/surefire/maven-surefire-plugin/java9.html but you can configure multiple executions and phases for the maven-toolchains-plugin. On Thu, Apr 4, 2019 at 11:09 PM Mark Derricutt wrote: > On 5 Apr 2019, at 6:29, Robert Scholte wrote: > > If you want to test the jar, you must use the failsafe plugin (or bind > surefire to the integration-test phase) > > Can/could failsafe take a toolchain id as config, then you could configure > additional executions using each toolchain you wanted? > -- > > "The ease with which a change can be implemented has no relevance at all > to whether it is the right change for the (Java) Platform for all time." — > Mark Reinhold. > > Mark Derricutt > http://www.theoryinpractice.net > http://www.chaliceofblood.net > http://plus.google.com/+MarkDerricutt > http://twitter.com/talios > http://facebook.com/mderricutt >
Re: Surefire plugin with multi-release?
On 5 Apr 2019, at 6:29, Robert Scholte wrote: > If you want to test the jar, you must use the failsafe plugin (or bind > surefire to the integration-test phase) Can/could failsafe take a toolchain id as config, then you could configure additional executions using each toolchain you wanted? --- "The ease with which a change can be implemented has no relevance at all to whether it is the right change for the (Java) Platform for all time." Mark Reinhold. Mark Derricutt http://www.theoryinpractice.net http://www.chaliceofblood.net http://plus.google.com/+MarkDerricutt http://twitter.com/talios http://facebook.com/mderricutt signature.asc Description: OpenPGP digital signature
Re: Surefire plugin with multi-release?
My experience is that most people are application developers and MR JARS are meant for libraries, not applications. And even for libraries you often don't need to turn it into a MRJAR. Only for those "special" libraries it might make sense, but I consider these specials and their developers are often Java specialists. I would expect from them to understand the requirements and consequences of MR Jars. As described, testing is the hardest part and there's just no "best" strategy. Every MR JAR library must decide what's their best fit. One way or another, you must execute your tests with all specified Java versions and Maven is not going to dictate that. For example: plexus-java is a multi-release jar, which relies heavily on the CI-server. When it runs on Java 7, it is building and testing only Java7 related code. For 9+ it builds the complete project. Trying to solve this with toolchains is possible, but requires a specific setup by the developer. None of the solutions could be solved by a simple surefire improvement. Unless I've overseen a option, I don't see any way how to solve this "by default"/"out-of-the-box" with surefire. I would expect that Maven needs to be improved first to understand this concept. Robert [1] https://github.com/codehaus-plexus/plexus-languages/tree/master/plexus-java/src/main On Thu, 04 Apr 2019 20:00:33 +0200, Russell Gold wrote: Yes, I know that’s how it works. The question is, how will developers use it? If MR jars are common, many developers will run into this problem, and it would be nice if Maven handled it by default. If it’s not common… those of with the issue will need to find workarounds. I have two open-source projects that create MR jars at present. On Apr 4, 2019, at 1:29 PM, Robert Scholte wrote: The specification you're talking about is the Multi Release Jar, and especially the last word is important: Jar. This only works with Jars and with a MANIFEST file containing Multi-Release: true Compiling and packaging has never been the issue, the tricky part is testing. If you want to test the jar, you must use the failsafe plugin (or bind surefire to the integration-test phase) All is described on the multirelease page of the maven-compiler-plugin[1] thanks, Robert [1] https://maven.apache.org/plugins/maven-compiler-plugin/multirelease.html On Thu, 04 Apr 2019 18:14:58 +0200, Russell Gold wrote: As of 3.8.0, the maven-compiler-plugin will place javaNNN source under META-INF/versions/NNN, which makes them ready for the jar plugin. But the surefire plugin ignores them! Is there a way to get the surefire plugin to run against them? They would need to be added on the class path ahead of the main output directory. I tried the setting, but that adds them later on the path, which is worthless. Or the tests could run against the built jar, but that violates the maven lifecycle order. My multirelease parent strategy doesn’t seem to work well for the multi-module case, as it can either build the MR jar normally, letting later modules test against it (but breaking the MR module’s unit tests), or copy the META-INF/versions classes into the output directory, letting the module’s unit test use them, but breaking jar building. I can see making the configuration much more complex, but it would be easier if there was a way to get the surefire plugin to recognize MR modules. Thanks, Russ - 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 - 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: Surefire plugin with multi-release?
Yes, I know that’s how it works. The question is, how will developers use it? If MR jars are common, many developers will run into this problem, and it would be nice if Maven handled it by default. If it’s not common… those of with the issue will need to find workarounds. I have two open-source projects that create MR jars at present. > On Apr 4, 2019, at 1:29 PM, Robert Scholte wrote: > > The specification you're talking about is the Multi Release Jar, and > especially the last word is important: Jar. > > This only works with Jars and with a MANIFEST file containing Multi-Release: > true > > Compiling and packaging has never been the issue, the tricky part is testing. > If you want to test the jar, you must use the failsafe plugin (or bind > surefire to the integration-test phase) > > All is described on the multirelease page of the maven-compiler-plugin[1] > > thanks, > Robert > > [1] https://maven.apache.org/plugins/maven-compiler-plugin/multirelease.html > > On Thu, 04 Apr 2019 18:14:58 +0200, Russell Gold > wrote: > >> As of 3.8.0, the maven-compiler-plugin will place javaNNN source under >> META-INF/versions/NNN, which makes them ready for the jar plugin. But the >> surefire plugin ignores them! Is there a way to get the surefire plugin to >> run against them? They would need to be added on the class path ahead of the >> main output directory. I tried the setting, >> but that adds them later on the path, which is worthless. >> >> Or the tests could run against the built jar, but that violates the maven >> lifecycle order. >> >> My multirelease parent strategy doesn’t seem to work well for the >> multi-module case, as it can either build the MR jar normally, letting later >> modules test against it (but breaking the MR module’s unit tests), or copy >> the META-INF/versions classes into the output directory, letting the >> module’s unit test use them, but breaking jar building. >> >> I can see making the configuration much more complex, but it would be easier >> if there was a way to get the surefire plugin to recognize MR modules. >> >> Thanks, >> Russ >> - >> 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 > - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Surefire plugin with multi-release?
The specification you're talking about is the Multi Release Jar, and especially the last word is important: Jar. This only works with Jars and with a MANIFEST file containing Multi-Release: true Compiling and packaging has never been the issue, the tricky part is testing. If you want to test the jar, you must use the failsafe plugin (or bind surefire to the integration-test phase) All is described on the multirelease page of the maven-compiler-plugin[1] thanks, Robert [1] https://maven.apache.org/plugins/maven-compiler-plugin/multirelease.html On Thu, 04 Apr 2019 18:14:58 +0200, Russell Gold wrote: As of 3.8.0, the maven-compiler-plugin will place javaNNN source under META-INF/versions/NNN, which makes them ready for the jar plugin. But the surefire plugin ignores them! Is there a way to get the surefire plugin to run against them? They would need to be added on the class path ahead of the main output directory. I tried the setting, but that adds them later on the path, which is worthless. Or the tests could run against the built jar, but that violates the maven lifecycle order. My multirelease parent strategy doesn’t seem to work well for the multi-module case, as it can either build the MR jar normally, letting later modules test against it (but breaking the MR module’s unit tests), or copy the META-INF/versions classes into the output directory, letting the module’s unit test use them, but breaking jar building. I can see making the configuration much more complex, but it would be easier if there was a way to get the surefire plugin to recognize MR modules. Thanks, Russ - 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
Surefire plugin with multi-release?
As of 3.8.0, the maven-compiler-plugin will place javaNNN source under META-INF/versions/NNN, which makes them ready for the jar plugin. But the surefire plugin ignores them! Is there a way to get the surefire plugin to run against them? They would need to be added on the class path ahead of the main output directory. I tried the setting, but that adds them later on the path, which is worthless. Or the tests could run against the built jar, but that violates the maven lifecycle order. My multirelease parent strategy doesn’t seem to work well for the multi-module case, as it can either build the MR jar normally, letting later modules test against it (but breaking the MR module’s unit tests), or copy the META-INF/versions classes into the output directory, letting the module’s unit test use them, but breaking jar building. I can see making the configuration much more complex, but it would be easier if there was a way to get the surefire plugin to recognize MR modules. Thanks, Russ - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
[ANN] Apache Maven Surefire Plugin 3.0.0-M3 Released
The Apache Maven team is pleased to announce the release of the Apache Maven Surefire Plugin, version 3.0.0-M3. The release contains 6 bug fixes. Again we received contributions from the community in form of bug reports and bug fixes. Thank you and keep them coming! http://maven.apache.org/plugins/maven-surefire-plugin/ You should specify the version in your project's plugin configuration: org.apache.maven.plugins maven-surefire-plugin 3.0.0-M3 or for failsafe: org.apache.maven.plugins maven-failsafe-plugin 3.0.0-M3 or for surefire-report: org.apache.maven.plugins maven-surefire-report-plugin 3.0.0-M3 You can download the appropriate sources etc. from the download page: https://maven.apache.org/surefire/download.cgi Release Notes - Maven Surefire - Version 3.0.0-M3 Bug [SUREFIRE-1613] - maven-surefire-report-plugin fails on JDK 11 [SUREFIRE-1614] - JUnit Runner that writes to System.out corrupts Surefire's STDOUT when using JUnit's Vintage Engine [SUREFIRE-1616] - Smart stacktrace in test summary should not print JUnit5 assertion exception type Improvement [SUREFIRE-1608] - dump error paths with the same root cause in Boot Manifest-JAR only once without stacktrace Task [SUREFIRE-1609] - Use ShadeFire 3.0.0-M2 in the internal tests [SUREFIRE-1611] - Deprecate skipTests in Failsafe Plugin Enjoy, -The Apache Maven team
[ANN] Apache Maven Surefire Plugin 3.0.0-M2 Released
The Apache Maven team is pleased to announce the release of the Apache Maven Surefire Plugin, version 3.0.0-M2. The release contains 15 bug fixes. Again we received contributions from the community in form of bug reports and bug fixes. Thank you and keep them coming! http://maven.apache.org/plugins/maven-surefire-plugin/ You should specify the version in your project's plugin configuration: org.apache.maven.plugins maven-surefire-plugin 3.0.0-M2 or for failsafe: org.apache.maven.plugins maven-failsafe-plugin 3.0.0-M2 or for surefire-report: org.apache.maven.plugins maven-surefire-report-plugin 3.0.0-M2 You can download the appropriate sources etc. from the download page: https://maven.apache.org/surefire/download.cgi Release Notes - Maven Surefire - Version 3.0.0-M2 Bug - [SUREFIRE-1568 <https://issues.apache.org/jira/browse/SUREFIRE-1568>] - Versions 2.21 and higher doesn't work with junit-platform for Java 9 module - [SUREFIRE-1593 <https://issues.apache.org/jira/browse/SUREFIRE-1593>] - 3.0.0-M1 produces invalid code sources on Windows - [SUREFIRE-1602 <https://issues.apache.org/jira/browse/SUREFIRE-1602>] - Surefire fails loading class ForkedBooter when using a sub-directory pom file and a local maven repo - [SUREFIRE-1605 <https://issues.apache.org/jira/browse/SUREFIRE-1605>] - NoClassDefFoundError (RunNotifier) with JDK 11 - [SUREFIRE-1606 <https://issues.apache.org/jira/browse/SUREFIRE-1606>] - maven-shared-utils must not be on provider's classpath New Feature - [SUREFIRE-1531 <https://issues.apache.org/jira/browse/SUREFIRE-1531>] - Option to switch-off Java 9 modules Improvement - [SUREFIRE-1590 <https://issues.apache.org/jira/browse/SUREFIRE-1590>] - Deploy multiple versions of Report XSD - [SUREFIRE-1591 <https://issues.apache.org/jira/browse/SUREFIRE-1591>] - Java 1.7 feature Diamonds replaced Generics - [SUREFIRE-1594 <https://issues.apache.org/jira/browse/SUREFIRE-1594>] - Java 1.7 feature try-catch - multiple exceptions in one catch - [SUREFIRE-1595 <https://issues.apache.org/jira/browse/SUREFIRE-1595>] - Java 1.7 feature System.lineSeparator() - [SUREFIRE-1597 <https://issues.apache.org/jira/browse/SUREFIRE-1597>] - ModularClasspathForkConfiguration with debug logs (@args file and its path on file system) Test - [SUREFIRE-1596 <https://issues.apache.org/jira/browse/SUREFIRE-1596>] - Unnecessary check JAVA_RECENT == JAVA_1_7 in unit tests - [SUREFIRE-1598 <https://issues.apache.org/jira/browse/SUREFIRE-1598>] - Fixed typo in assertion statement in integration test Surefire855AllowFailsafeUseArtifactFileIT Task - [SUREFIRE-1600 <https://issues.apache.org/jira/browse/SUREFIRE-1600>] - Surefire Project using surefire:2.12.4 is not fully able to work with JDK 10+ on internal build system. Therefore surefire-shadefire should go with Surefire:3.0.0-M2. - [SUREFIRE-1607 <https://issues.apache.org/jira/browse/SUREFIRE-1607>] - Roadmap on Project Site Enjoy, -The Apache Maven team
Tests fails after switching to maven-surefire-plugin 3.0.0-M1
Hello, At Apache Wicket we hit issue described here https://stackoverflow.com/a/53016532/1676516 (tests fails when OpenJDK 8u181 is used) To fix it we have tried to update maven-surefire-plugin (2.20 -> 3.0.0-M1) Tests for one module (CDI-1.1) fails for both OpenJDK and OracleJDK I tried to fix these tests - no luck Then I have added false to surefire-plugin configuration and tests become green So I guess this should be maven-surefire-plugin issue The issue can be checked using Apache Wicket sources available here https://github.com/apache/wicket/tree/wicket-8.x (please NOTE `wicket-8.x` branch) Please let me know if any additional details are required -- WBR Maxim aka solomax
[ANN] Apache Maven Surefire Plugin 3.0.0-M1 Released
The Apache Maven team is pleased to announce the release of the Apache Maven Surefire Plugin, version 3.0.0-M1 The release contains 5 bug fixes. Again we received contributions from the community in form of bug reports and bug fixes. Thank you and keep them coming! http://maven.apache.org/plugins/maven-surefire-plugin/ You should specify the version in your project's plugin configuration: org.apache.maven.plugins maven-surefire-plugin 3.0.0-M1 or for failsafe: org.apache.maven.plugins maven-failsafe-plugin 3.0.0-M1 or for surefire-report: org.apache.maven.plugins maven-surefire-report-plugin 3.0.0-M1 You can download the appropriate sources etc. from the download page: https://maven.apache.org/surefire/download.cgi Release Notes - Maven Surefire - Version 3.0.0-M1 Bug [SUREFIRE-1466] - Surefire fails on a dummy:dummy dependency with a authenticating proxy [SUREFIRE-1588] - Surefire manifest jar classloading broken on latest Debian/Ubuntu Java8 New Feature [SUREFIRE-1493] - Maven Plugin API 3.0 Improvement [SUREFIRE-1212] - @Component is deprecated. @Parameter should be used instead. [SUREFIRE-1474] - Java 1.7 as minimum Enjoy, -The Apache Maven team
[ANN] Apache Maven Surefire Plugin version 2.22.1 Released
The Apache Maven team is pleased to announce the release of the Apache Maven Surefire Plugin, version 2.22.1 The release contains 17 bug fixes. Again we received contributions from the community in form of bug reports and bug fixes. Thank you and keep them coming! http://maven.apache.org/plugins/maven-surefire-plugin/ You should specify the version in your project's plugin configuration: org.apache.maven.plugins maven-surefire-plugin 2.22.1 or for failsafe: org.apache.maven.plugins maven-failsafe-plugin 2.22.1 or for surefire-report: org.apache.maven.plugins maven-surefire-report-plugin 2.22.1 You can download the appropriate sources etc. from the download page: https://maven.apache.org/surefire/download.cgi Release Notes - Maven Surefire - Version 2.22.1 Bug [SUREFIRE-1532] - MIME type for javascript is now officially application/javascript [SUREFIRE-1535] - Surefire unable to run testng suites in parallel [SUREFIRE-1538] - Git considers PNG files as changed although there is no change [SUREFIRE-1550] - The surefire XSD published on maven site lacks of some rerun element [SUREFIRE-1559] - XML Report elements rerunError, rerunFailure, flakyFailure, flakyError should contain element stackTrace and should not be simpleContent. [SUREFIRE-1561] - Logs in Parallel Tests are mixed up when forkMode=never or forkCount=0 [SUREFIRE-1564] - Can't override platform version through project/plugin dependencies [SUREFIRE-1579] - Forks mixed up characters in standard output Improvement [SUREFIRE-1552] - Nil element "failureMessage" in failsafe-summary.xml should have self closed tag [SUREFIRE-1554] - Fix old test resources TEST-*.xml in favor of continuing with SUREFIRE-1550 [SUREFIRE-1555] - Elapsed time in XML Report should satisfy pattern in XSD. [SUREFIRE-1562] - Support Java 11 [SUREFIRE-1565] - Surefire should support parameterized reportsDirectory Task [SUREFIRE-1569] - m-invoker-p:3.1.0 attempts to reolve maven-surefire-common:jar:2.22.1-SNAPSHOT from remote repo 'apache.snapshots' [SUREFIRE-1578] - Remove obsolete module surefire-setup-integration-tests Dependency upgrade [SUREFIRE-1540] - Upgrade maven-plugins parent to version 32 [SUREFIRE-1571] - Upgrade maven-plugins parent to version 33 Enjoy, -The Apache Maven team
Re: How to work java 9 modules with Maven Surefire Plugin?
Hi, > I want to test my JPMS module using maven surefire plugin (2.22) > with junit5. For this I added the following to my pom: > > ... > >org.junit.jupiter >junit-jupiter-engine >5.3.0 >test > > ... > > org.apache.maven.plugins > maven-surefire-plugin > 2.22.0 > > > **/IT*.java > > > > > However, I have this error: > > Please refer to dump files (if any exist)[date]-jvmRun[N].dump, > [date].dumpstream and[date]-jvmRun[N].dumpstream.The forked VM > terminated without properly saying goodbye. VM crash orSystem.exit > called?Command was /bin/sh -c cd "/home/project"&&/opt/jdk-9/bin/ > java '@/home/project/target/surefire/ > surefireargs4438382394951202560''/home/project/target/ > surefire'2018-09-13T13-42-05_435-jvmRun1 > surefire4870497011802680670tmp surefire_015850140770716473411tmp > Error occurred in starting fork, check output in log > ProcessExitCode:1 (...) > Could anyone explain what I do wrong? It seems to > me that I don't use module-path while testing but how to use it I > didn't find. Maybe any links to examples. > Please, help. It seems similar to the issue reported here: https://issues.apache.org/jira/browse/SUREFIRE-1528 Can you try switching to m-surefire-p 2.21.0? On my system this additionally resolved a ClassNotFoundException I suddenly saw with 2.22.0 in one of our projects; see https://issues.apache.org/jira/browse/SUREFIRE-1537 Regards Thorsten
How to work java 9 modules with Maven Surefire Plugin?
Hi all, I want to test my JPMS module using maven surefire plugin (2.22) with junit5. For this I added the following to my pom: ... org.junit.jupiter junit-jupiter-engine 5.3.0 test ... org.apache.maven.plugins maven-surefire-plugin 2.22.0 **/IT*.java However, I have this error: Please refer to dump files (if any exist)[date]-jvmRun[N].dump,[date].dumpstream and[date]-jvmRun[N].dumpstream.The forked VM terminated without properly saying goodbye. VM crash orSystem.exit called?Command was /bin/sh -c cd "/home/project"&&/opt/jdk-9/bin/java '@/home/project/target/surefire/surefireargs4438382394951202560''/home/project/target/surefire'2018-09-13T13-42-05_435-jvmRun1 surefire4870497011802680670tmp surefire_015850140770716473411tmp Error occurred in starting fork, check output in log ProcessExitCode:1 org.apache.maven.surefire.booter.SurefireBooterForkException:The forked VM terminated without properly saying goodbye. VM crash orSystem.exit called?Command was /bin/sh -c cd "/home/project"&&/opt/jdk-9/bin/java '@/home/project/target/surefire/surefireargs4438382394951202560''/home/project/target/surefire'2018-09-13T13-42-05_435-jvmRun1 surefire4870497011802680670tmp surefire_015850140770716473411tmp Error occurred in starting fork, check output in log ProcessExitCode:1 at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:671) at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:533) at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:278) at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:244) at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1194) at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:1022) at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:868) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288) at org.apache.maven.cli.MavenCli.main(MavenCli.java:199) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:564) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)->[Help1] And in surefire-reports I see the following: # Created at 2018-09-13T13:42:07.587Error:Couldnot find or load main classProjects..home.project.m2.repository.org.eclipse.persistence.javax.persistence.2.2.0.javax.persistence-2.2.0.jar:.home.project..m2.repository.org.eclipse.persistence.org.eclipse.persistence.core.2.7.0.org.eclipse.persistence.core-2.7.0.jar:.home.project..m2.repository.org.slf4j.slf4j-api.1.7.25.slf4j-api-1.7.25.jar...# Created at 2018-09-13T13:42:07.588Causedby: java.lang.ClassNotFoundException:/home/project//m2/repository/org/eclipse/persistence/javax/persistence/2/2/0/javax/persistence-2/2/0/jar:/home/project//m2/repository/org/eclipse/persistence/org/eclipse/persistence/core/2/7/0/org/eclipse/persistence/core-2/7/0/jar:/home/project//m2/repository/org/slf4j/slf4j-api/1/7/25/slf4j-api-1/7/25/jar ... Could anyone explain what I do
Null value in report file name for surefire plugin
I hope someone within the list can either guide me to the answer I'm looking for or help me identify what I'm doing incorrectly. I'm using the surefire-plugin (v2.21.0). I have setup a maven profile to run my tests in parallel. Here is my configuration org.apache.maven.plugins maven-surefire-plugin ${surefire.plugin.version} smoke-acceptance-tests test classes 25 false true -Duser.language=en -Xmx3g -Xms2g -XX:MaxPermSize=512m -Dfile.encoding=UTF-8 -Dcucumber.options="--tags @smoke" **/ParallelRunner*.class Note, that I've included the redirectTestOutputToFile tag. When I run the tests a file is created under the surefire-reports directory. However, the name of the file is null-output.txt How can I get surefire to not use 'null' in the file's name?
Re: Help needed: maven-surefire-plugin is skipping/not finding tests
There is zero tests to run because you have globally specified a "groups" but there are no tests annotated with such group in your project hadoop-hdfs. Try to come over this issue by specifying empty groups in this child. Let's go back to your three questions. 1. The pluginManagement should be in parent and children should not specify/override plugin version, unless necessary. 2. You can use the latest version 2.22.0 but groups is old feature available in 2.21.0 or 2.20.0 too and earlier. 3. Fix for groups is on your side, since you specify groups in parent POM it means all children should undergo the same principle and all tests should be annotated with one group at least. In your case when you still have test which are not annotated with groups is to make the "groups" config parameter empty. You can run the Maven in debug mode (mvn -X ...) and you can see how the parameter is set in this plugin. T On Thu, Jul 26, 2018 at 6:15 PM, Jun Huang wrote: > Hi, > > Recently in our hadoop project, we added maven-surefire-plugin for running > unit tests by categories. > > in hadoop root pom.xml: > > > junit > junit > 4.11 > > : > : > > > org.apache.hadoop.classification. > TestJUnitCategory$AllTests > 4.11 > > > > org.apache.maven.plugins > maven-surefire-plugin > 2.21.0 > > ${test.groups} > > > > > > flakies > > org.apache.hadoop.classification. > TestJUnitCategory$FlakiesTest > > > > stables > > org.apache.hadoop.classification. > TestJUnitCategory$StablesTest > > > > integrations > > org.apache.hadoop.classification.TestJUnitCategory$ > IntegrationsTest > > > > none > > !org.apache.hadoop.classification. > TestJUnitCategory$AllTest > > > > > Invoking tests by category works fine: mvn -P integrations. However, our > old fashioned unit test execution got skipped by this maven-surefire-plugin: > > 13:16:35 [INFO] --- maven-antrun-plugin:1.7:run (create-log-dir) @ > hadoop-hdfs --- > 13:16:35 [INFO] Executing tasks > 13:16:35 > 13:16:35 main: > 13:16:35[delete] Deleting directory /tmp/tmp.o7flMN8505/src/ > ghuang/ghuang/hadoop-hdfs-project/hadoop-hdfs/target/test/data > 13:16:35 [mkdir] Created dir: /tmp/tmp.o7flMN8505/src/ > ghuang/ghuang/hadoop-hdfs-project/hadoop-hdfs/target/test/data > 13:16:35 [copy] Copying 16 files to /tmp/tmp.o7flMN8505/src/ > ghuang/ghuang/hadoop-hdfs-project/hadoop-hdfs/target/test-classes/webapps > 13:16:35 [INFO] Executed tasks > 13:16:35 [INFO] > 13:16:35 [INFO] --- maven-compiler-plugin:3.1:testCompile > (default-testCompile) @ hadoop-hdfs --- > 13:16:35 [INFO] Nothing to compile - all classes are up to date > 13:16:35 [INFO] > 13:16:35 [INFO] --- maven-surefire-plugin:2.20:test (default-test) @ > hadoop-hdfs --- > 13:16:35 [INFO] Surefire report directory: /tmp/tmp.o7flMN8505/src/ > ghuang/ghuang/hadoop-hdfs-project/hadoop-hdfs/target/surefire-reports > 13:16:35 [INFO] parallel='none', perCoreThreadCount=true, threadCount=0, > useUnlimitedThreads=false, threadCountSuites=0, threadCountClasses=0, > threadCountMethods=0, parallelOptimized=true > 13:16:35 [INFO] > 13:16:35 [INFO] --- > 13:16:35 [INFO] T E S T S > 13:16:35 [INFO] --- > 13:26:01 [INFO] > 13:26:01 [INFO] Results: > 13:26:01 [INFO] > 13:26:01 [INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0 > 13:26:01 [INFO] > 13:26:01 [INFO] > 13:26:01 [INFO] --- maven-antrun-plugin:1.7:run (hdfs-test-bats-driver) @ > hadoop-hdfs --- > > I also verified that by removing surefire-plugin block in root pom.xml > file will make these tests executing again as usual. So I have some > questions here: > > 1. I saw the reported surefire-plugin version was 2.20 while I was > defining 2.21 in my change. This is because it gets overwritten by the > parent pom. So how do I make it use my customized version. > > 2. Is the version 2.21 the right version for this? I saw some post > indicated version 2.21 might have some bug? > > 3. What is the fix for this issue? > > > Many thanks, > George > > See attached pom.xml file. > > > > - > To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org > For additional commands, e-mail: dev-h...@maven.apache.org >
how to disable logs in memory in surefire plugin
Hi Folks, I've seen some OutOfMemory recently in the surefire plugin while running testng tests. I took the dump for one of the issues and apparently the surefire plugin keeps every single entry of the log in memory, which is finally causing the OutOfMemory. This is what Eclipse Memory Analyzer shows: (link in case image does not show up: https://pasteboard.co/Hghlmzm.png) Is there a way to avoid the TestSetRunListener to keep every single log entry in memory? or how do I disable it if possible? Thanks in advance, Raul Villanueva
how to disable logs in memory in surefire plugin
Hi Folks, I've seen some OutOfMemory recently in the surefire plugin while running testng tests. I took the dump for one of the issues and apparently the surefire plugin keeps every single entry of the log in memory, which is finally causing the OutOfMemory. This is what Eclipse Memory Analyzer shows: (link in case image does not show up: https://pasteboard.co/Hghlmzm.png) Is there a way to avoid the TestSetRunListener to keep every single log entry in memory? or how do I disable it if possible? Thanks in advance, Raul Villanueva - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Question about using a custom StackTraceWriter with the maven-surefire-plugin
Is it possible to register a custom writer with the maven-surefire-plugin? let me know. thank you. —Z - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: [ANN] Apache Maven Surefire Plugin 2.21.0 Released
The Apache Maven team is pleased to announce the release of the Apache Maven Surefire Plugin, version 2.21.0. The release contains 33 bug fixes. Again we received contributions from the community in form of bug reports and bug fixes. Thank you and keep them coming! http://maven.apache.org/plugins/maven-surefire-plugin/ You should specify the version in your project's plugin configuration: org.apache.maven.plugins maven-surefire-plugin 2.21.0 or for failsafe: org.apache.maven.plugins maven-failsafe-plugin 2.21.0 or for surefire-report: org.apache.maven.plugins maven-surefire-report-plugin 2.21.0 Release Notes - Maven Surefire - Version 2.21.0 Bug [SUREFIRE-1372] - Rerunning failing tests fails in combination with Description#createSuiteDescription [SUREFIRE-1422] - Forking fails on Linux if /bin/ps isn't available [SUREFIRE-1424] - javax.transaction.TransactionManager not visible with Java9 [SUREFIRE-1439] - NullPointerException on JDK10 [SUREFIRE-1443] - surefire report: broken links with inner classes [SUREFIRE-1445] - Properties from configuration POM are not passed to Provider on JDK 9 [SUREFIRE-1450] - TestNG Listener aren't working from Property Tag in POM.xml With JDK9 [SUREFIRE-1451] - Surefire Booter compatibility with NetBSD ps(1) output [SUREFIRE-1452] - Support filtering of tests from Base Class (TestNG) [SUREFIRE-1475] - PpidChecker.windows() assumes wmic is on the path Improvement [SUREFIRE-1183] - Custom Test Report Titles and Descriptions [SUREFIRE-1262] - Add modulepath support [SUREFIRE-1416] - maven-surefire-parser: add new method isError in ReportTestCase [SUREFIRE-1435] - Improve Thread Dump. Use prefix "surefire-forkedjvm" in daemon Threads in forked JVM [SUREFIRE-1448] - Clarified specifying multiple categories for JUnit [SUREFIRE-1453] - Allow to specify non existant classes as "groups" [SUREFIRE-1454] - Speedup Standard Output if Tests [SUREFIRE-1491] - LocationManager injected in MOJO unables plugin to run in JDK 1.6 Test [SUREFIRE-1437] - Improve unit tests. Call PID parser on all platforms in SystemUtilsTest. Wish [SUREFIRE-1436] - Increase usability in quiet mode Task [SUREFIRE-1455] - JaCoCo on integration tests [SUREFIRE-1461] - UnicodeTestNamesIT should be able to run multiple times [SUREFIRE-1463] - integration tests should run on the top of JDK 9 [SUREFIRE-1471] - Too long Windows path cause CI issues. Renamed surefire-intergation-tests to surefire-its. [SUREFIRE-1472] - Multibranch Pipeline supports JDK 7-10 Maven 3.2-3.5 Linux Windows [SUREFIRE-1481] - Surefire1295AttributeJvmCrashesToTestsIT should be Parameterized test instead of using Theories runner [SUREFIRE-1482] - Obsolete workaround with commons-lang3 in project unit tests [SUREFIRE-1484] - maven-clean-plugin should be used in integration test resource junit-pathWithUmlaut [SUREFIRE-1485] - surefire-shadefire project should not be deployed in Maven Central [SUREFIRE-1486] - maven-failsafe-plugin does not use JUnit adapter for JUnit4 annotations and TestNG providers do not have maven-surefire-plugin config in POM [SUREFIRE-1488] - Native library in Surefire1295AttributeJvmCrashesToTestsIT caused unstable test [SUREFIRE-1489] - Implement different HTTP ports in ITs and zip() in jenkinsfile Dependency upgrade [SUREFIRE-1434] - Upgrade PowerMock@Java9 to Version 2.0.0-beta.5 Enjoy, -The Apache Maven team On Tue, Mar 6, 2018 at 7:03 PM, Tibor Digana <tibordig...@apache.org> wrote: > The Apache Maven team is pleased to announce the release of the Apache > Maven Surefire Plugin, version 2.21.0. > > The release contains 33 bug fixes. > Again we received contributions from the community in form of bug reports > and bug fixes. > Thank you and keep them coming! > > http://maven.apache.org/plugins/maven-surefire-plugin/ > > You should specify the version in your project's plugin configuration: > > > org.apache.maven.plugins > maven-surefire-plugin > 2.21.0 > > > or for failsafe: > > > org.apache.maven.plugins > maven-failsafe-plugin > 2.21.0 > > > or for surefire-report: > > > org.apache.maven.plugins > maven-surefire-report-plugin > 2.21.0 > > > > ( The text area below allows the project release notes to be copied to > another HTML document.) > > Release Notes - Maven Surefire - Version 2.21.0 > > Bug > > > [ href='https://issues.apache.org/jira/browse/SUREFIRE-1372'>SUREFIRE-1372] > - Rerunning failing tests fails in combination with Description# > createSuiteDescription > > [ href='https://issues.apache.org/jira/browse/SUREFIRE-1422'>SUREFIRE-1422] > - Forking fails on Linux if /bin/ps isnt av
[ANN] Apache Maven Surefire Plugin 2.21.0 Released
The Apache Maven team is pleased to announce the release of the Apache Maven Surefire Plugin, version 2.21.0. The release contains 33 bug fixes. Again we received contributions from the community in form of bug reports and bug fixes. Thank you and keep them coming! http://maven.apache.org/plugins/maven-surefire-plugin/ You should specify the version in your project's plugin configuration: org.apache.maven.plugins maven-surefire-plugin 2.21.0 or for failsafe: org.apache.maven.plugins maven-failsafe-plugin 2.21.0 or for surefire-report: org.apache.maven.plugins maven-surefire-report-plugin 2.21.0 ( The text area below allows the project release notes to be copied to another HTML document.) Release Notes - Maven Surefire - Version 2.21.0 Bug [SUREFIRE-1372] - Rerunning failing tests fails in combination with Description#createSuiteDescription [SUREFIRE-1422] - Forking fails on Linux if /bin/ps isnt available [SUREFIRE-1424] - javax.transaction.TransactionManager not visible with Java9 [SUREFIRE-1439] - NullPointerException on JDK10 [SUREFIRE-1443] - surefire report: broken links with inner classes [SUREFIRE-1445] - Properties from configuration POM are not passed to Provider on JDK 9 [SUREFIRE-1450] - TestNG Listener arent working from Property Tag in POM.xml With JDK9 [SUREFIRE-1451] - Surefire Booter compatibility with NetBSD ps(1) output [SUREFIRE-1452] - Support filtering of tests from Base Class (TestNG) [SUREFIRE-1475] - PpidChecker.windows() assumes wmic is on the path Improvement [SUREFIRE-1183] - Custom Test Report Titles and Descriptions [SUREFIRE-1262] - Add modulepath support [SUREFIRE-1416] - maven-surefire-parser: add new method isError in ReportTestCase [SUREFIRE-1435] - Improve Thread Dump. Use prefix surefire-forkedjvm in daemon Threads in forked JVM [SUREFIRE-1448] - Clarified specifying multiple categories for JUnit [SUREFIRE-1453] - Allow to specify non existant classes as groups [SUREFIRE-1454] - Speedup Standard Output if Tests [SUREFIRE-1491] - LocationManager injected in MOJO unables plugin to run in JDK 1.6 Test [SUREFIRE-1437] - Improve unit tests. Call PID parser on all platforms in SystemUtilsTest. Wish [SUREFIRE-1436] - Increase usability in quiet mode Task [SUREFIRE-1455] - JaCoCo on integration tests [SUREFIRE-1461] - UnicodeTestNamesIT should be able to run multiple times [SUREFIRE-1463] - integration tests should run on the top of JDK 9 [SUREFIRE-1471] - Too long Windows path cause CI issues. Renamed surefire-intergation-tests to surefire-its. [SUREFIRE-1472] - Multibranch Pipeline supports JDK 7-10 Maven 3.2-3.5 Linux Windows [SUREFIRE-1481] - Surefire1295AttributeJvmCrashesToTestsIT should be Parameterized test instead of using Theories runner [SUREFIRE-1482] - Obsolete workaround with commons-lang3 in project unit tests [SUREFIRE-1484] - maven-clean-plugin should be used in integration test resource junit-pathWithUmlaut [SUREFIRE-1485] - surefire-shadefire project should not be deployed in Maven Central [SUREFIRE-1486] - maven-failsafe-plugin does not use JUnit adapter for JUnit4 annotations and TestNG providers do not have maven-surefire-plugin config in POM [SUREFIRE-1488] - Native library in Surefire1295AttributeJvmCrashesToTestsIT caused unstable test [SUREFIRE-1489] - Implement different HTTP ports in ITs and zip() in jenkinsfile Dependency upgrade [SUREFIRE-1434] - Upgrade PowerMock@Java9 to Version 2.0.0-beta.5 Enjoy, -The Apache Maven team
[ANN] Apache Maven Surefire Plugin 2.20.1 Released
The Apache Maven team is pleased to announce the release of the Apache Maven Surefire Plugin, version 2.20.1 The release contains 24 bug fixes. Again we received contributions from the community in form of bug reports and bug fixes. Thank you and keep them coming! http://maven.apache.org/plugins/maven-surefire-plugin/ You should specify the version in your project's plugin configuration: org.apache.maven.plugins maven-surefire-plugin 2.20.1 or for failsafe: org.apache.maven.plugins maven-failsafe-plugin 2.20.1 or for surefire-report: org.apache.maven.plugins maven-surefire-report-plugin 2.20.1 Release Notes - Maven Surefire - Version 2.20.1 Bug [SUREFIRE-1264] - Some tests can be lost when running in parallel with parameterized tests [SUREFIRE-1265] - reuseForks=false fails on jdk-9-ea builds [SUREFIRE-1302] - Surefire does not wait long enough for the forked VM and assumes it to be dead [SUREFIRE-1364] - Report XML should contain system properties of forked JVM [SUREFIRE-1367] - System Output and Error should be reported in parallel JUnit tests if Assumption fails. [SUREFIRE-1376] - The forked VM terminated without properly saying goodbye when running Surefire in a very deep project structure on Windows [SUREFIRE-1382] - OutOfMemoryError occurs when JUnit 5 test fails [SUREFIRE-1391] - System Property variables processed twice in calculation of effective properties [SUREFIRE-1396] - Provider class path is incorrect for custom provider in Failsafe [SUREFIRE-1400] - Windows surefire boot directory should appear in system default temporary-directory [SUREFIRE-1403] - [Jigsaw] [Java 9] add --add-modules java.se.ee to forked CLI argument [SUREFIRE-1404] - Package of ServiceLoader was changed in version 2.20 and documentation uses package providerapi [SUREFIRE-1412] - Findbugs plugin fails - Update maven-parent to Version 30 and downgrade maven-site-plugin [SUREFIRE-1413] - Javadoc - unknown TAG @noinspection Improvement [SUREFIRE-1361] - Buffering in StatelessXmlReporter [SUREFIRE-1362] - Buffering in ConsoleOutputFileReporter [SUREFIRE-1363] - Java 1.6 features @Override and Charset [SUREFIRE-1409] - Parallel runner should not drop away runners that have zero children. [SUREFIRE-1410] - Add FAQ and improve Warning message when native stream in forked JVM is corrupted [SUREFIRE-1411] - Improve calls String.length == 0 to Java 1.6 call String.isEmpty Task [SUREFIRE-1366] - mvn javadoc:javadoc fails on Javadoc syntax with JDK 1.8 [SUREFIRE-1375] - Fixing build on Windows cmd.exe [SUREFIRE-1380] - AbstractCommandStream should flush data if another Thread marks the stream closed, empty shared buffer. [SUREFIRE-1381] - Refactoring in AbstractCommandStream and MasterProcessCommand Enjoy, -The Apache Maven team
[ANN] Apache Maven Surefire Plugin 2.20 Released
The Apache Maven team is pleased to announce the release of the Apache Maven Surefire Plugin, version 2.20. The release contains 70 bug fixes. Again we received contributions from the community in form of bug reports and bug fixes. Thank you and keep them coming! http://maven.apache.org/plugins/maven-surefire-plugin/ You should specify the version in your project's plugin configuration: org.apache.maven.plugins maven-surefire-plugin 2.20 or for failsafe: org.apache.maven.plugins maven-failsafe-plugin 2.20 or for surefire-report: org.apache.maven.plugins maven-surefire-report-plugin 2.20 Release Notes - Maven Surefire - Version 2.20 Bug - [SUREFIRE-725 <https://issues.apache.org/jira/browse/SUREFIRE-725>] - Test result output ist sent to System.out instead of using logger - [SUREFIRE-1198 <https://issues.apache.org/jira/browse/SUREFIRE-1198>] - Failsafe does not allow to configure the jar file to use - [SUREFIRE-1216 <https://issues.apache.org/jira/browse/SUREFIRE-1216>] - TEST-*.xml files generated by Surefire are invalid - [SUREFIRE-1217 <https://issues.apache.org/jira/browse/SUREFIRE-1217>] - Differentiate XML schema for failsafe and surefire - [SUREFIRE-1239 <https://issues.apache.org/jira/browse/SUREFIRE-1239>] - ExecutionException java.lang.RuntimeException: org.apache.maven.surefire.report.ReporterException: When writing xml report stdout/stderr (No such file or directory) - [SUREFIRE-1244 <https://issues.apache.org/jira/browse/SUREFIRE-1244>] - NumberFormatException in parallel test run with runOrder = failedFirst - [SUREFIRE-1250 <https://issues.apache.org/jira/browse/SUREFIRE-1250>] - Regex testcase filtering: exception when hashmark is regex-quoted - [SUREFIRE-1252 <https://issues.apache.org/jira/browse/SUREFIRE-1252>] - Tests not being run when using XML suite file with TestNG - [SUREFIRE-1268 <https://issues.apache.org/jira/browse/SUREFIRE-1268>] - With JUnit listener, redirectTestOutputToFile is ignored - [SUREFIRE-1278 <https://issues.apache.org/jira/browse/SUREFIRE-1278>] - TestNG tests are run with group name that ends with specified group - [SUREFIRE-1284 <https://issues.apache.org/jira/browse/SUREFIRE-1284>] - Statistics file should not be determined as (directory of surefire-reports).getParentFile().getParentFile(). It is a problem if report directory is customized. Statistics file should be located in project dir. - [SUREFIRE-1289 <https://issues.apache.org/jira/browse/SUREFIRE-1289>] - forkedProcessTimeoutInSeconds should not use ping timer of 10 seconds but 0.1 sec period timer - [SUREFIRE-1290 <https://issues.apache.org/jira/browse/SUREFIRE-1290>] - Orphan Fork JVMs should be killed after any previous finished with fatal error - [SUREFIRE-1295 <https://issues.apache.org/jira/browse/SUREFIRE-1295>] - JVM crashes in forks do not log the name of the failing test - [SUREFIRE-1296 <https://issues.apache.org/jira/browse/SUREFIRE-1296>] - The project build directory should not be determined as (directory of surefire-reports).getParentFile(). It is a problem if report directory is customized. - [SUREFIRE-1305 <https://issues.apache.org/jira/browse/SUREFIRE-1305>] - surefire fails on parallel tests when newline character is in test description - [SUREFIRE-1312 <https://issues.apache.org/jira/browse/SUREFIRE-1312>] - Classpath containing url special characters with Reflections not working - [SUREFIRE-1313 <https://issues.apache.org/jira/browse/SUREFIRE-1313>] - Unify console report result in SurefirePlugin and VerifyMojo - [SUREFIRE-1315 <https://issues.apache.org/jira/browse/SUREFIRE-1315>] - Fix stylistic errors in DefaultReporterFactory - [SUREFIRE-1322 <https://issues.apache.org/jira/browse/SUREFIRE-1322>] - Surefire and Failsafe should dump critical errors in dump file and console - [SUREFIRE-1324 <https://issues.apache.org/jira/browse/SUREFIRE-1324>] - Surefire incorrectly suppresses exceptions when closing resources. - [SUREFIRE-1333 <https://issues.apache.org/jira/browse/SUREFIRE-1333>] - Process pending events from forked process after exited and then finish forked Thread. - [SUREFIRE-1341 <https://issues.apache.org/jira/browse/SUREFIRE-1341>] - Documentation of configuration parameters in Failsafe should mention IT instead or Test.java - [SUREFIRE-1342 <https://issues.apache.org/jira/browse/SUREFIRE-1342>] - Acknowledge normal exit of JVM and drain shared memory between processes - [SUREFIRE-1349 <https://issues.apache.org/jira/browse/SUREFIRE-1349>] - FreeBSD cross process communication needs to commit stdout data in forked JVM within a synchronized block - [SUREFIRE-1352 <https://issues.apache.org/
Re: Configuring the surefire plugin - a question
I tried many combinations but couldn't make it shorter with the same behavior :( - ph --- Just a small hint about the concept of includes/excludes. A test is executed if and only if it matches any include (or all if there are no includes) AND doesn't match any exclude. The problem I see is that by default you exclude every test (**/*). This implies that all includes are useless. By overriding the excludes per execution-block you kind of fixed that. Robert .
Re: Configuring the surefire plugin - a question
On Fri, 24 Feb 2017 04:32:17 +0100, Paul Hammant <p...@hammant.org> wrote: Thanks João, thanks Robert. I've taken Robert's snippet and expanded it a little to do what I want: Diff: https://github.com/paul-hammant/todobackend-jooby/commit/9626a3155eddbaea74bbf66a3e899b81227842ee (repo: paul-hammant/todobackend-jooby* branch: expectations*) I found that I had to be explicit about excludes too, and have a precursor exclude that is outside of the three executions. I did a bunch of trial and error, but this was the minima. The test of correctness: $ mvn install | grep "Time elapsed" Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.237 sec - in todobackend.TodoUnitTest Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 7.51 sec - in todobackend.TodoIntegrationTest Tests run: 4, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 11.608 sec - in todobackend.TodoWebDriverTest (ignore some WebDriver noise to std-err) I can't say I really understand the rules about additive includes and excludes, but my job is to make speedy builds, not fully understand every angle bracket of Maven. Just a small hint about the concept of includes/excludes. A test is executed if and only if it matches any include (or all if there are no includes) AND doesn't match any exclude. The problem I see is that by default you exclude every test (**/*). This implies that all includes are useless. By overriding the excludes per execution-block you kind of fixed that. Robert Regards, - Paul On Fri, Feb 17, 2017 at 2:00 PM, Robert Scholte <rfscho...@apache.org> wrote: When you only want to change the pom (not the tests), a set of executionblocks will do the trick: org.apache.maven.plugins maven-surefire-plugin 2.18.1 unit-tests **/*Unit*.java functional-tests **/*WebDriver*.java integration-tests **/*Integration*.java On Thu, 16 Feb 2017 11:22:37 +0100, João Cabrita <joao.r.cabr...@gmail.com> wrote: I'd say you could add executions to the surefire plugin with different categories: https://maven.apache.org/surefire/maven-surefire-plugin/ examples/junit.html#Using_JUnit_Categories Look at this gist (I've omitted some details): https://gist.github.com/kewne/2b909ab5e8035a4e44e406fa35e3276c AFAIK, even if the executions are all bound to the same phase in the lifecycle, they execute in the order specificied in the POM. Beware this is the behavior I've observed and can't confirm it is specified behavior. João Cabrita On 16 February 2017 at 10:06, Paul Hammant <p...@hammant.org> wrote: Hi folks,. I've a fast WebDriver using build that I blogged about: A 16 Second Java Webapp Build (Including WebDriver Tests) <http://paulhammant.com/2017/02/05/a-16-second-java-webapp- build-including-webdriver-tests/> . Jooby (like SpringBoot and SparkJava) give new options for testing - it can be instantiated in a JUnit test. Everything can be done in Surefire now, and the Failsafe plugin isn't needed for these. Don't believe me - watch the video in the blog entry above, it's not long. New problem. I want unit tests to run in this order: 1. unit 2. integration (may invoke service calls headlessly) 3. function (will use WebDriver) I can't work out what magic I have to do with executions to allow that to happen. Here is how far I got: https://github.com/paul-hammant/todobackend-jooby/blob/ master/pom.xml#L74 It is all a bit second class, because I'd have to do ... mvn clean test -Punit-tests mvn test -Pintegration-tests mvn test -Pfunctional-tests ... to simulate a pipeline, and I would be happy to just rely on annotations for classifications. I really want to do ... mvn clean test -DexecutionOrder=unit,integration,functional -DstopBuildAtExecutionBoundariesForTestFailures ... and shave seconds off the build. How do I configure that tersely and elegantly in the surefire plugin today? - 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: Configuring the surefire plugin - a question
Thanks João, thanks Robert. I've taken Robert's snippet and expanded it a little to do what I want: Diff: https://github.com/paul-hammant/todobackend-jooby/commit/9626a3155eddbaea74bbf66a3e899b81227842ee (repo: paul-hammant/todobackend-jooby* branch: expectations*) I found that I had to be explicit about excludes too, and have a precursor exclude that is outside of the three executions. I did a bunch of trial and error, but this was the minima. The test of correctness: $ mvn install | grep "Time elapsed" Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.237 sec - in todobackend.TodoUnitTest Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 7.51 sec - in todobackend.TodoIntegrationTest Tests run: 4, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 11.608 sec - in todobackend.TodoWebDriverTest (ignore some WebDriver noise to std-err) I can't say I really understand the rules about additive includes and excludes, but my job is to make speedy builds, not fully understand every angle bracket of Maven. Regards, - Paul On Fri, Feb 17, 2017 at 2:00 PM, Robert Scholte <rfscho...@apache.org> wrote: > When you only want to change the pom (not the tests), a set of > executionblocks will do the trick: > > > org.apache.maven.plugins > maven-surefire-plugin > 2.18.1 > > > unit-tests > > > **/*Unit*.java > > > > > functional-tests > > > **/*WebDriver*.java > > > > > integration-tests > > > **/*Integration*.java > > > > > > > > On Thu, 16 Feb 2017 11:22:37 +0100, João Cabrita <joao.r.cabr...@gmail.com> > wrote: > > I'd say you could add executions to the surefire plugin with different >> categories: >> https://maven.apache.org/surefire/maven-surefire-plugin/ >> examples/junit.html#Using_JUnit_Categories >> >> Look at this gist (I've omitted some details): >> https://gist.github.com/kewne/2b909ab5e8035a4e44e406fa35e3276c >> >> AFAIK, even if the executions are all bound to the same phase in the >> lifecycle, they execute in the order specificied in the POM. >> Beware this is the behavior I've observed and can't confirm it is >> specified >> behavior. >> >> >> >> João Cabrita >> >> On 16 February 2017 at 10:06, Paul Hammant <p...@hammant.org> wrote: >> >> Hi folks,. >>> >>> I've a fast WebDriver using build that I blogged about: A 16 Second Java >>> Webapp Build (Including WebDriver Tests) >>> <http://paulhammant.com/2017/02/05/a-16-second-java-webapp- >>> build-including-webdriver-tests/> >>> . >>> >>> Jooby (like SpringBoot and SparkJava) give new options for testing - it >>> can >>> be instantiated in a JUnit test. Everything can be done in Surefire now, >>> and the Failsafe plugin isn't needed for these. Don't believe me - watch >>> the video in the blog entry above, it's not long. >>> >>> New problem. I want unit tests to run in this order: >>> >>> 1. unit >>> 2. integration (may invoke service calls headlessly) >>> 3. function (will use WebDriver) >>> >>> >>> I can't work out what magic I have to do with executions to allow that to >>> happen. >>> >>> Here is how far I got: >>> >>> >>> https://github.com/paul-hammant/todobackend-jooby/blob/ >>> master/pom.xml#L74 >>> >>> It is all a bit second class, because I'd have to do ... >>> >>> mvn clean test -Punit-tests >>> mvn test -Pintegration-tests >>> mvn test -Pfunctional-tests >>> >>> ... to simulate a pipeline, and I would be happy to just rely on >>> annotations for classifications. >>> >>> I really want to do ... >>> >>> mvn clean test -DexecutionOrder=unit,integration,functional >>> -DstopBuildAtExecutionBoundariesForTestFailures >>> >>> >>> ... and shave seconds off the build. >>> >>> How do I configure that tersely and elegantly in the surefire plugin >>> today? >>> >> > - > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > >
Re: Configuring the surefire plugin - a question
When you only want to change the pom (not the tests), a set of executionblocks will do the trick: org.apache.maven.plugins maven-surefire-plugin 2.18.1 unit-tests **/*Unit*.java functional-tests **/*WebDriver*.java integration-tests **/*Integration*.java On Thu, 16 Feb 2017 11:22:37 +0100, João Cabrita <joao.r.cabr...@gmail.com> wrote: I'd say you could add executions to the surefire plugin with different categories: https://maven.apache.org/surefire/maven-surefire-plugin/examples/junit.html#Using_JUnit_Categories Look at this gist (I've omitted some details): https://gist.github.com/kewne/2b909ab5e8035a4e44e406fa35e3276c AFAIK, even if the executions are all bound to the same phase in the lifecycle, they execute in the order specificied in the POM. Beware this is the behavior I've observed and can't confirm it is specified behavior. João Cabrita On 16 February 2017 at 10:06, Paul Hammant <p...@hammant.org> wrote: Hi folks,. I've a fast WebDriver using build that I blogged about: A 16 Second Java Webapp Build (Including WebDriver Tests) <http://paulhammant.com/2017/02/05/a-16-second-java-webapp- build-including-webdriver-tests/> . Jooby (like SpringBoot and SparkJava) give new options for testing - it can be instantiated in a JUnit test. Everything can be done in Surefire now, and the Failsafe plugin isn't needed for these. Don't believe me - watch the video in the blog entry above, it's not long. New problem. I want unit tests to run in this order: 1. unit 2. integration (may invoke service calls headlessly) 3. function (will use WebDriver) I can't work out what magic I have to do with executions to allow that to happen. Here is how far I got: https://github.com/paul-hammant/todobackend-jooby/blob/master/pom.xml#L74 It is all a bit second class, because I'd have to do ... mvn clean test -Punit-tests mvn test -Pintegration-tests mvn test -Pfunctional-tests ... to simulate a pipeline, and I would be happy to just rely on annotations for classifications. I really want to do ... mvn clean test -DexecutionOrder=unit,integration,functional -DstopBuildAtExecutionBoundariesForTestFailures ... and shave seconds off the build. How do I configure that tersely and elegantly in the surefire plugin today? - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Configuring the surefire plugin - a question
I'd say you could add executions to the surefire plugin with different categories: https://maven.apache.org/surefire/maven-surefire-plugin/examples/junit.html#Using_JUnit_Categories Look at this gist (I've omitted some details): https://gist.github.com/kewne/2b909ab5e8035a4e44e406fa35e3276c AFAIK, even if the executions are all bound to the same phase in the lifecycle, they execute in the order specificied in the POM. Beware this is the behavior I've observed and can't confirm it is specified behavior. João Cabrita On 16 February 2017 at 10:06, Paul Hammant <p...@hammant.org> wrote: > Hi folks,. > > I've a fast WebDriver using build that I blogged about: A 16 Second Java > Webapp Build (Including WebDriver Tests) > <http://paulhammant.com/2017/02/05/a-16-second-java-webapp- > build-including-webdriver-tests/> > . > > Jooby (like SpringBoot and SparkJava) give new options for testing - it can > be instantiated in a JUnit test. Everything can be done in Surefire now, > and the Failsafe plugin isn't needed for these. Don't believe me - watch > the video in the blog entry above, it's not long. > > New problem. I want unit tests to run in this order: > > 1. unit > 2. integration (may invoke service calls headlessly) > 3. function (will use WebDriver) > > > I can't work out what magic I have to do with executions to allow that to > happen. > > Here is how far I got: > > > https://github.com/paul-hammant/todobackend-jooby/blob/master/pom.xml#L74 > > It is all a bit second class, because I'd have to do ... > > mvn clean test -Punit-tests > mvn test -Pintegration-tests > mvn test -Pfunctional-tests > > ... to simulate a pipeline, and I would be happy to just rely on > annotations for classifications. > > I really want to do ... > > mvn clean test -DexecutionOrder=unit,integration,functional > -DstopBuildAtExecutionBoundariesForTestFailures > > > ... and shave seconds off the build. > > How do I configure that tersely and elegantly in the surefire plugin today? >
Configuring the surefire plugin - a question
Hi folks,. I've a fast WebDriver using build that I blogged about: A 16 Second Java Webapp Build (Including WebDriver Tests) <http://paulhammant.com/2017/02/05/a-16-second-java-webapp-build-including-webdriver-tests/> . Jooby (like SpringBoot and SparkJava) give new options for testing - it can be instantiated in a JUnit test. Everything can be done in Surefire now, and the Failsafe plugin isn't needed for these. Don't believe me - watch the video in the blog entry above, it's not long. New problem. I want unit tests to run in this order: 1. unit 2. integration (may invoke service calls headlessly) 3. function (will use WebDriver) I can't work out what magic I have to do with executions to allow that to happen. Here is how far I got: https://github.com/paul-hammant/todobackend-jooby/blob/master/pom.xml#L74 It is all a bit second class, because I'd have to do ... mvn clean test -Punit-tests mvn test -Pintegration-tests mvn test -Pfunctional-tests ... to simulate a pipeline, and I would be happy to just rely on annotations for classifications. I really want to do ... mvn clean test -DexecutionOrder=unit,integration,functional -DstopBuildAtExecutionBoundariesForTestFailures ... and shave seconds off the build. How do I configure that tersely and elegantly in the surefire plugin today?
Regarding surefire plugin usage
Hi There, Not sure if this is the correct way to communicate for surefire related help. Please forgive me if its not. This is regarding suefire plugin feature for my use case. I have maven project, and running running mvn test executes test cases within a separate process. My ask is: Is there any way to run tests by attaching to an existing process? So that tests can use the attached process environment. I found surefire has JVMproperty, found here <http://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html#jvm>, but could not get how to set it, if this is correct understanding. The reason is: Test cases are heavily depend on environment setup, for each test i don't want to waste time for setup and configuration, rather focusing on problem to solve by tests. Thank you. -Arfeen.
Unable to execute tests in parallel using surefire plugin
Hi, Need your help as i have been struggling with parallel execution using maven. i am trying to run Testng tests in parallel, maven V3.3.9, maven-surefire-plugin V2.18.1, with the below configuration testng.xml classes 10 or 10 But, tests aren't running in parallel. Need your inputs to figure out where i might be wrong. -- View this message in context: http://maven.40175.n5.nabble.com/Unable-to-execute-tests-in-parallel-using-surefire-plugin-tp5862392.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
[ANN] Apache Maven Surefire Plugin 2.19.1 Released
The Apache Maven team is pleased to announce the release of the Apache Maven Surefire Plugin, version 2.19.1 The release contains 17 bug fixes. Again we received contributions from the community in form of bug reports and bug fixes. Thank you and keep them coming! http://maven.apache.org/plugins/maven-surefire-plugin/ You should specify the version in your project's plugin configuration: org.apache.maven.plugins maven-surefire-plugin 2.19.1 or for failsafe: org.apache.maven.plugins maven-failsafe-plugin 2.19.1 or for surefire-report: org.apache.maven.plugins maven-surefire-report-plugin 2.19.1 Release Notes - Maven Surefire - Version 2.19.1 Bug [SUREFIRE-1185] - single method test spews status of every single other test [SUREFIRE-1187] - JUnit4 Provider created unnecessary Runner instance [SUREFIRE-1189] - Prevent from I/O leakage. Thus close streams in finally block. [SUREFIRE-1192] - Fixed Sonar and FindBug issues [SUREFIRE-1193] - Surefire 2.19 hangs in the log4j build [SUREFIRE-1194] - reporter argument does not work for TestNG [SUREFIRE-1197] - Surefire 2.19 breaks tests under Windows due to fork problem [SUREFIRE-1200] - Could not run single test by full name [SUREFIRE-1203] - Surefire hangs after Test Execution [SUREFIRE-1204] - -Dtest= option is broken in 2.19 [SUREFIRE-1208] - Start stream capture before loading tests [SUREFIRE-1209] - rerunFailingTestsCount does not run failed tests if forkCount and surefire-junit47 is used [SUREFIRE-1211] - surefire-testng runs JUnit tests [SUREFIRE-1215] - refs/tags/surefire-2.19.1_vote-1 slows down the Maven build in 20 seconds Improvement [SUREFIRE-1135] - Improve ignore message for TestNG [SUREFIRE-1191] - Run Single Test with Package Name Doesnt work [SUREFIRE-1202] - Allow rerunFailingTestsCount, skipAfterFailureCount together Enjoy, -The Apache Maven team
Configuration of Java used for surefire plugin / JUnit tests
Hello everyone, :-) I have a Jenkins based build server on which different version of Java are installed for different builds (for older versions of our software). I can control the Java version used by the compiler plugin as well as by javadoc plugin. But I haven't found a way to control the Java version used by the surefire plugin for the JUnit tests. Example: The default Java is 8 while Java 7 should be used as target for the build. For the compiler plugin I can configure the following: 1.7 1.7 C:\Program Files\Java\jdk1.7.0_80\bin\javac For the javadoc plugin I can configure the following: C:\Program Files\Java\jdk1.7.0_80\bin\javadoc And both configurations work. The classes will be Java 1.7 classes. And Javadoc e.g. doesn't need that "-doclint" parameter (otherwise it will fail because of malformed HTML code in the Javadoc comments for some reason). But if the Maven is started using Java 1.8 the JUnit tests will be performed Java 1.8. Unfortunately a few of the standard classes behave differently in 1.8 than in 1.7 (e.g. JAXB). So I want them executed also using Java 1.7. About why Maven is started using Java 1.8: Because it is the default Java of the machine and I want to configure everything within Maven and nothing outside (e.g. in Jenkins). Any ideas? Regards, Gerrit
AW: Configuration of Java used for surefire plugin / JUnit tests
Hello everyone, :-) ehm, okay, forget it. I found the solution. I need the following configuration for the surefire plugin: C:\Program Files\jdk1.7.0_80\bin\java The "forkCount" has to be 1. 0 would use the current JVM. As 1 is the default value it is not necessary to configure it (at least in my case). Regards, Gerrit -Ursprüngliche Nachricht- Von: Hohl, Gerrit [mailto:g.h...@aurenz.de] Gesendet: Dienstag, 27. Oktober 2015 17:21 An: users@maven.apache.org Betreff: Configuration of Java used for surefire plugin / JUnit tests Hello everyone, :-) I have a Jenkins based build server on which different version of Java are installed for different builds (for older versions of our software). I can control the Java version used by the compiler plugin as well as by javadoc plugin. But I haven't found a way to control the Java version used by the surefire plugin for the JUnit tests. Example: The default Java is 8 while Java 7 should be used as target for the build. For the compiler plugin I can configure the following: 1.7 1.7 C:\Program Files\Java\jdk1.7.0_80\bin\javac For the javadoc plugin I can configure the following: C:\Program Files\Java\jdk1.7.0_80\bin\javadoc And both configurations work. The classes will be Java 1.7 classes. And Javadoc e.g. doesn't need that "-doclint" parameter (otherwise it will fail because of malformed HTML code in the Javadoc comments for some reason). But if the Maven is started using Java 1.8 the JUnit tests will be performed Java 1.8. Unfortunately a few of the standard classes behave differently in 1.8 than in 1.7 (e.g. JAXB). So I want them executed also using Java 1.7. About why Maven is started using Java 1.8: Because it is the default Java of the machine and I want to configure everything within Maven and nothing outside (e.g. in Jenkins). Any ideas? Regards, Gerrit - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
[ANN] Apache Maven Surefire Plugin 2.19 Released
The release contains a number of bug fixes. Again we received contributions from the community in form of bug reports, bug fixes, features and improvements. Thank you and keep them coming! Summarizing new main features and bug fixing, we have introduced + new parser of test patterns, let's call it Test Filter API, related to parameters: test, ex/includes, ex/includesFile; + a feature to interrupting the test-set after exceedded certain number of errors/failures + new Doxia Version + anchoring test class names + shutdown operations + command based communication between in-plugin and forked process + improvements in JUnit and TestNG runners + etc. http://maven.apache.org/plugins/maven-surefire-plugin/ You should specify the version in your project's plugin configuration: org.apache.maven.plugins maven-surefire-plugin 2.19 or for failsafe: org.apache.maven.plugins maven-failsafe-plugin 2.19 or for surefire-report: org.apache.maven.plugins maven-surefire-report-plugin 2.19 Release Notes - Maven Surefire - Version 2.19 Bug [SUREFIRE-856] - Running single test in Failsafe using CLI does not override includes configuration [SUREFIRE-919] - TestNG plugin fails to apply verbose setting from TestNG.xml [SUREFIRE-945] - Top of web page is pretty opaque [SUREFIRE-964] - TEST-*.xml files generated by Surefire throw validation warnings in Eclipse for no grammer constraints (DTD or XML schema) referenced in the document [SUREFIRE-983] - Running a Single Test feature does not work as expected (for testng provider) [SUREFIRE-986] - Groovy power assert incorrect indentation [SUREFIRE-1024] - verify goal ignores dependenciesToScan parameter when checking tests existence [SUREFIRE-1037] - Elapsed time is reported incorrectly for tests run in parallel [SUREFIRE-1067] - Nested causes conflated with wrapper exception [SUREFIRE-1084] - Surefire-report stack traces appear on a single line. [SUREFIRE-1125] - Running multiple methods via the `test` property does not work in junit47 provider [SUREFIRE-1126] - Discrepancy between test exclusion docs and plugin behavior [SUREFIRE-1127] - Failsafe project does not fail in verify phase when a test case object errors during initialization [SUREFIRE-1128] - Fix mvn 2.2.1 build process https://builds.apache.org/view/All/job/maven-surefire-mvn-2.2.1 [SUREFIRE-1129] - JDK 5 should be the min requirements in surefire project [SUREFIRE-1131] - Remove obsolete maven profiles [SUREFIRE-1133] - Surefire Windows Build fails on OOM [SUREFIRE-1136] - Current working directory propagation in forked mode [SUREFIRE-1137] - Problem with Umlauts in stdout [SUREFIRE-1138] - Enabling reuseForks runs all tests in series on just one fork [SUREFIRE-1144] - Time for testsuite on commandline does not suit with the time value given in the report file [SUREFIRE-1146] - rerunFailingTestsCount not working with Parameterized test [SUREFIRE-1148] - JUnit Method Filter (**/Class#method) should use same syntax as test parameter [SUREFIRE-1150] - The surefire and failsafe plugin should not be dependent on JCIP [SUREFIRE-1151] - surefire/failsafe home pages should link to apache.org for issues [SUREFIRE-1152] - Option rerunFailingTestsCount silently fails with test suites [SUREFIRE-1154] - TestNG and JUnit should be able to run its own tests [SUREFIRE-1158] - Remove startup logs of the plugin and TestNG configurator [SUREFIRE-1159] - JUnit47 runner failing in parallel mode [SUREFIRE-1160] - -DTest=... should be independent of execustion section [SUREFIRE-1161] - Executing selected (multiple) tests of same class gives Exception [SUREFIRE-1167] - Upgrade DOXIA to Version 1.6 [SUREFIRE-1173] - Link to plugins web site is reported as redirected by maven linkcheck plugin. [SUREFIRE-1177] - TestNG suitethreadpoolsize parameter can not be set by Maven Surefire [SUREFIRE-1179] - TestNG parallel options seem to not be honored [SUREFIRE-1180] - Does not overrides include/exclude using -Dtest property [SUREFIRE-1181] - forkedProcessTimeoutInSeconds does not kill forked JVM although interrupted build [SUREFIRE-1182] - Surefire 2.19 rc hangs when building maven core [SUREFIRE-1184] - Documentation for TestNG parameter testnames - see SUREFIRE-845 Improvement [SUREFIRE-574] - additionalClasspathElements-feature improved [SUREFIRE-597] - Surefire report creation fails on processing absent optional JUnit xml attributes [SUREFIRE-622] - The TestNG command line option -testrunfactory should be supported. [SUREFIRE-745] - -Dtest supports multiple test classes but not multiple test methods
Maven surefire plugin and TestNG : How to run suites in parallel?
Hi, I want to execute in parallel the 2 TestNG suites.Actually with this config the first suite is executed and then the second suite.I have tried with suitethreadpoolsize2/suitethreadpoolsize but no change. I have searched but I didn't find a solution.Could you explain me how to do that? plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-surefire-plugin/artifactId version2.18.1/version configurationsuitethreadpoolsize2/suitethreadpoolsize suiteXmlFiles suiteXmlFiletestng_1.xml/suiteXmlFile suiteXmlFiletestng_2.xml/suiteXmlFile /suiteXmlFiles /configuration/plugin
[ANN] Apache Maven Surefire Plugin 2.18.1 Released
The Apache Maven team is pleased to announce the release of the Apache Maven Surefire Plugin, version 2.18.1 The release contains a number of bug fixes. Again we received contributions from the community in form of bug reports and bug fixes. Thank you and keep them coming! http://maven.apache.org/plugins/maven-surefire-plugin/ You should specify the version in your project's plugin configuration: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-surefire-plugin/artifactId version2.18.1/version /plugin or for failsafe: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-failsafe-plugin/artifactId version2.18.1/version /plugin or for surefire-report: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-surefire-report-plugin/artifactId version2.18.1/version /plugin Release Notes - Maven Surefire - Version 2.18.1 ** Bug * [SUREFIRE-859] - Exception in thread TreadedStreamConsumer java.lang.RuntimeException during GC * [SUREFIRE-1036] - Tests using MockitoJUnitRunner are always run regardless of membership in specified group * [SUREFIRE-1112] - Remove uneccessary newlines in console output for test results with no error * [SUREFIRE-1114] - NPE in TestSetStats. Concurrency issue with parallel methods on TestNG. * [SUREFIRE-1117] - The documentation of re-run parameter should mention limitations with JUnit 4.xprovider * [SUREFIRE-1121] - java.lang.NullPointerException org.apache.maven.plugin.surefire.report.DefaultReporterFactory.mergeFromOtherFactories(DefaultReporterFactory.java:82) * [SUREFIRE-1122] - When running failsafe with -Dfailsafe.rerunFailingTestsCount and parallel all, the reports are not generated correctly ** Improvement * [SUREFIRE-987] - Provide user property for suiteXmlFile so that it can be passed from Maven Command line * [SUREFIRE-995] - Support searching superclass for JUnit @Category * [SUREFIRE-1109] - runOrder should have a user property * [SUREFIRE-1110] - Document the memory requirements to run unit- and integration tests for a release test * [SUREFIRE-1116] - Parallel Computer should use ConsoleLogger interface * [SUREFIRE-1120] - Improved warning message File encoding has not been set, ... Enjoy, -The Apache Maven team
[ANN] Apache Maven Surefire Plugin 2.18 Released
The Apache Maven team is pleased to announce the release of the Apache Maven Surefire Plugin, version 2.18 The release contains a number of bug fixes, and introduces an option to automatically rerun failing tests, including proper reporting on the console and in the XML reports for the individual runs. Again we received some much appreciated contributions from the community in form of bug reports, bug fixes and patches for new features. Thank you and keep 'em coming! You should specify the version in your project's plugin configuration: plugin groupIdorg.apache.maven. plugins/groupId artifactIdmaven-surefire-plugin/artifactId version2.18/version /plugin or for failsafe: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-failsafe-plugin/artifactId version2.18/version /plugin Release Notes - Maven Surefire - Version 2.18 ** Bug * [SUREFIRE-649] - Might be impossible to have empty strings in systemPropertyVariables element * [SUREFIRE-941] - TESTS header printed twice when forkMode is always * [SUREFIRE-963] - Unable to set empty environment variables * [SUREFIRE-1023] - Report generation fails with StringIndexOutOfBoundsException * [SUREFIRE-1028] - Unable to run single test (junit) * [SUREFIRE-1069] - Typo in alwaysGenerateSurefireReport doc: Defaulyts * [SUREFIRE-1072] - Duplicate example of commandline in run single test documentation * [SUREFIRE-1075] - Addresses to documented mailing lists in Maven site dead * [SUREFIRE-1077] - NPE problem will happen if you set testng status to fail at afterInvocation method * [SUREFIRE-1078] - Failure running forked mode with TestNG test suites defined via XML files * [SUREFIRE-1080] - Use parallel and fork together run some tests multiple times * [SUREFIRE-1081] - Doc claims parallel is TestNG only, but rest of doc implies junit works, too. * [SUREFIRE-1088] - When test fail during initialization the test execution time can result in a large negative number. * [SUREFIRE-1090] - NPE in SmartStacktraceParser if Thread.contextCassLoader is null * [SUREFIRE-1091] - IOException when test with much output prints in @After / @AfterClass - possible haning processes * [SUREFIRE-1092] - The shutdown hook of parallel computer randomly prints started tests after timeout overflow * [SUREFIRE-1095] - NPE in RunListener * [SUREFIRE-1096] - ClassCastException: Fork test for TestNG with xmlsuite * [SUREFIRE-1098] - runOrder=balanced is not working * [SUREFIRE-1099] - Invalid link ids in surefire-report * [SUREFIRE-1102] - The module surefire-setup-integration-tests fails with Maven 3.2.3 * [SUREFIRE-1104] - Internal Maven Surefire IT tests fail with Maven 3.2.x ** Improvement * [SUREFIRE-1053] - Suppress warning message if file.encoding is set using argLine * [SUREFIRE-1097] - improve documentation includes/excludes * [SUREFIRE-1101] - Surefire does not shutdown thread-pools programatically after test run has finished. * [SUREFIRE-1105] - Surefire build should check Java 1.5 API signatures with JDK version 5 * [SUREFIRE-1106] - Update to minimum maven 2.2.1 * [SUREFIRE-1108] - Surefire should print parallel tests in progress been stopped after elapsed timeout ** New Feature * [SUREFIRE-654] - TestNG: Recognize successful tests when using invocationCount and successPercentage parameters on the @Test annotation * [SUREFIRE-1087] - New option rerunFailingTestsCount * [SUREFIRE-1093] - Exceptional parallel execution on @NotThreadSafe testcase or suite Enjoy, -The Apache Maven team
maven-surefire-plugin to be defined for the unit tests to be run
Hi good morning all, I have asked this question on stackoverflow two days ago about the necessity of defining / overriding the maven-surefire-plugin. http://stackoverflow.com/questions/26694974/why-maven-surefire-plugin-needs-to-be-defined-for-the-tests-to-be-run I didn't get any answer so far. My apologies in advance if I am missing a fundamental Maven concept.. Best regards, Alex
Surefire plugin report all successfull sub tests.
Hi Colleagues, Is there a possibility the surefire-plugin to count all successful subtest(verify statements) for Junit tests. Here is the describing of the problem: Imagine you have two tests, with each having 5 verify statements If both tests succeed, the test result will show two tests which passed successfully If only one test succeeds and the other test fails completely, the result (e.g. in Jenkins) will show one test succeeded and 5 tests failed, which leads to a success rate of ~17%, while in fact the success rate is 50% (5 verify statements of the succeeded test are only reported as one success). Thanks and regards, Mihail Chalashkanov
Re: maven-surefire-plugin does not fail build if TestNG and JUnit47 are used
Hi, 2.10 is rather old. Could you try it with a more recent version such as 2.17? Am Donnerstag, 11. September 2014 schrieb David Hoffer : I have a module where maven-surefire-plugin (2.10) is configured to use TestNG and JUnit47. The former has several tests that all succeed and the later has two tests that fail. However the build succeeds. How can I configure surefire so the build fails if either have failures which is the expected behavior?
Re: maven-surefire-plugin does not fail build if TestNG and JUnit47 are used
I did try 2.17 to see if it would fix the problem but got an additional error (I forget what it was) so I reverted it back to 2.10. I ended up just converting the TestNG tests to use JUnit and all works fine now. -Dave On Fri, Sep 12, 2014 at 12:38 AM, Andreas Gudian andreas.gud...@gmail.com wrote: Hi, 2.10 is rather old. Could you try it with a more recent version such as 2.17? Am Donnerstag, 11. September 2014 schrieb David Hoffer : I have a module where maven-surefire-plugin (2.10) is configured to use TestNG and JUnit47. The former has several tests that all succeed and the later has two tests that fail. However the build succeeds. How can I configure surefire so the build fails if either have failures which is the expected behavior?
maven-surefire-plugin does not fail build if TestNG and JUnit47 are used
I have a module where maven-surefire-plugin (2.10) is configured to use TestNG and JUnit47. The former has several tests that all succeed and the later has two tests that fail. However the build succeeds. How can I configure surefire so the build fails if either have failures which is the expected behavior?
[ANN] Apache Maven Surefire Plugin 2.17 Released
The Apache Maven team is pleased to announce the release of the Apache Maven Surefire Plugin, version 2.17 This release comes with some smaller improvements and bug fixes for TestNG, for the JUnit Parallel Computer, the removal of temporary files, and last but not least it fixes a compatibility issue with JDK 8 - just in time for the much anticipated GA this week. Yet again we received some much appreciated contributions from the community. Thank you and keep 'em coming! You should specify the version in your project's plugin configuration: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-surefire-plugin/artifactId version2.17/version /plugin Release Notes - Maven Surefire - Version 2.17 ** Bug * [SUREFIRE-1031] - Temp files are not deleted properly * [SUREFIRE-1033] - Invalid XML on documentation page * [SUREFIRE-1038] - Regression: Method depends on nonexistent group * [SUREFIRE-1040] - Typo in documentation of IntegrationTestMojo#test * [SUREFIRE-1041] - JUnit47 provider: Exception in JUnit Runner can crash test run without visible stack trace * [SUREFIRE-1044] - Changed behaviour of TestNG test execution after implementing runOrder support * [SUREFIRE-1046] - Inproc test running does not work with java 8 * [SUREFIRE-1051] - Surefire plugin creates files in /tmp and does not delete them on exit * [SUREFIRE-1055] - Parallel JUnit does not run all test methods with parallel=classesAndMethods perCoreThreadCount=false useUnlimitedThreads=true and threadCountMethods specified * [SUREFIRE-1056] - fractional forkCount does not work as intended on single core machines * [SUREFIRE-1063] - Typo in error message ** Improvement * [SUREFIRE-1030] - Remove nested exception wrappers * [SUREFIRE-1047] - Add @{...} property evaluation for the argLine * [SUREFIRE-1058] - TestSetFailedException trying to use maven-surefire-plugin + regular expressions for TestNG groups * [SUREFIRE-1062] - TestNG listeners on separate lines in pom.xml ** Wish * [SUREFIRE-1025] - TestSetRunListener.testSetCompleted() should write files first before reporting the completion on console. Enjoy, -The Apache Maven team
Re: Help[please]: maven-surefire-plugin with TestNG group dependencies not working....
Anyone have similar issues running tests w/ group dependencies? On Tue, Feb 18, 2014 at 5:52 PM, Jeff predato...@gmail.com wrote: I'm having a frustrating test dependency issue and I don't know if it is my configuration or a problem. I've got two test classes in my maven project using testng:6.8.7 and maven-surefire-plugin:2.16. The first test class has the following annotation on the test *class* which should be inherited by the test methods: * @Test(groups={ functional })* * public class FuncTest{...}* on the other test *class*, I have: * @Test(groups={ load }, dependsOnGroups = { functional })* * public class LoadTest {...}* When I run the following: *mvn test* I get the error: *[ERROR] DependencyMap::Method LoadTest depends on nonexistent group functional* If I REMOVE the dependsOnGroups... it works. If I do any of the following but keep the dependsOnGroups option: * mvn test -Dtest=LoadTest,FuncTest* * mvn test -Dgroups=functional,load* * mvn test -Dgroups=functional,load **-Dtest=LoadTest,FuncTest* it fails with the error above. If I run it outside of Maven by calling org.testng.TestNG directly, it works fine. I also tried moving the group definitions/dependencies to the test method directly, but that didn't change. *What am I missing? * Thanks! -- Jeff Vincent See my LinkedIn profile at: http://www.linkedin.com/in/rjeffreyvincent -- Jeff Vincent See my LinkedIn profile at: http://www.linkedin.com/in/rjeffreyvincent
Help[please]: maven-surefire-plugin with TestNG group dependencies not working....
I'm having a frustrating test dependency issue and I don't know if it is my configuration or a problem. I've got two test classes in my maven project using testng:6.8.7 and maven-surefire-plugin:2.16. The first test class has the following annotation on the test *class* which should be inherited by the test methods: * @Test(groups={ functional })* * public class FuncTest{...}* on the other test *class*, I have: * @Test(groups={ load }, dependsOnGroups = { functional })* * public class LoadTest {...}* When I run the following: *mvn test* I get the error: *[ERROR] DependencyMap::Method LoadTest depends on nonexistent group functional* If I REMOVE the dependsOnGroups... it works. If I do any of the following but keep the dependsOnGroups option: * mvn test -Dtest=LoadTest,FuncTest* * mvn test -Dgroups=functional,load* * mvn test -Dgroups=functional,load **-Dtest=LoadTest,FuncTest* it fails with the error above. If I run it outside of Maven by calling org.testng.TestNG directly, it works fine. I also tried moving the group definitions/dependencies to the test method directly, but that didn't change. *What am I missing? * Thanks! -- Jeff Vincent See my LinkedIn profile at: http://www.linkedin.com/in/rjeffreyvincent
Re: surefire plugin output changes
3.0.3 defaulted to surefire 2.7.2 if you did not specify a version 3.0.4 and 3.0.5 default to surefire 2.10 3.1.1 defaults surefire to 2.12.4 HTH On 28 January 2014 00:52, John Dix john@amdocs.com wrote: I should point out that I have run 3.0.3 against the build in question and I still received the same non-verbose output they are complaining about. At a loss at what to tell them other than a shoulder shrug and idunno I thought I would ask here to see if there was a change somewhere that could account for this. -Original Message- From: John Dix Sent: Monday, January 27, 2014 4:35 PM To: Maven Users List Subject: surefire plugin output changes Hello all, We have migrated our maven from version 3.0.3 to 3.0.5 and our developers are claiming now that they're not seeing the verbosity in the test outputs like they did before. The only see a synopsis and summary of the number of tests run, failed, and which ones failed. Servers are run in a CentOS 5.3 linux environment within Jenkins. I am being told that before this upgrade they had an extremely chatty output like below. What they haven't been able to confirm for me is whether this change happened after we moved from 2.1.0 to 3.0.3 or not as that was before my time. Can anyone please confirm if this output was/is handled by surefire and maybe a commandline switch in maven got lost, or from somewhere else? The output as from an old archived log the developer gave me. [INFO ]: com.qpass.payment.multinodeCloud.DeployTest: Connected to Mission Control Server on :: myWar from getWarUrl = mobilePaymentsApp-amp_i-SNAPSHOT.war objname = ampait/ ampait-control-1.opsdevna3.amdocsdc.net/5666/com.qpass:Type=Environment [INFO ]: com.qpass.payment.multinodeCloud.DeployTest: Test: deployAppWartoSelectedsEnv Result={0}: {machine-name=Successfull Deployment of WAR file: app} [INFO ]: com.qpass.payment.multinodeCloud.DeployTest: Test:deployAppWar: Time Spent 2 min 24 secs 324 ms myWar from getWarUrl = mobilePaymentExtractsApp-amp_i-SNAPSHOT.war [INFO ]: com.qpass.payment.multinodeCloud.DeployTest: Test: deployExtractsWar Result={0}: {ampait-back-1.opsdevna3.amdocsdc.net:8999=Successfull Deployment of WAR file: extractsApp} [INFO ]: com.qpass.payment.multinodeCloud.DeployTest: Test:deployExtractsWar: Time Spent 1 min 23 secs 14 ms myWar from getWarUrl = nxtcomSampleApp-amp_i-SNAPSHOT.war [INFO ]: com.qpass.payment.multinodeCloud.DeployTest: Test: deployNxtSampleWar Result={0}: {ampait-back-1.opsdevna3.amdocsdc.net:8999=Successfull Deployment of WAR file: nxtcomServices} [INFO ]: com.qpass.payment.multinodeCloud.DeployTest: Test:deployNxtSampleWar: Time Spent 47 secs 410 ms myWar from getWarUrl = zmobileSampleApp-amp_i-SNAPSHOT.war [INFO ]: com.qpass.payment.multinodeCloud.DeployTest: Test: deployZmobileSampleWar Result={0}: {ampait-back-1.opsdevna3.amdocsdc.net:8999=Successfull Deployment of WAR file: zmobileServices} [INFO ]: com.qpass.payment.multinodeCloud.DeployTest: Test:deployZmobileSampleWar: Time Spent 31 secs 400 ms myWar from getWarUrl = mobilePaymentsWebServiceApp-amp_i-SNAPSHOT.war [INFO ]: com.qpass.payment.multinodeCloud.DeployTest: Test: deployWebServiceApp Result={0}: {ampait-front-1.opsdevna3.amdocsdc.net:8999=Successfull Deployment of WAR file: ROOT} [INFO ]: com.qpass.payment.multinodeCloud.DeployTest: Test:deployBackWarToSelectedEnv: Time Spent 1 min 33 secs 791 ms myWar from getWarUrl = paymentsReportingUiApplication-amp_i-SNAPSHOT.war This message and the information contained herein is proprietary and confidential and subject to the Amdocs policy statement, you may review at http://www.amdocs.com/email_disclaimer.asp - 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: surefire plugin output changes
Do you know which version Maven 2.1.0 had? -Original Message- From: Stephen Connolly [mailto:stephen.alan.conno...@gmail.com] Sent: Tuesday, January 28, 2014 12:56 AM To: Maven Users List Subject: Re: surefire plugin output changes 3.0.3 defaulted to surefire 2.7.2 if you did not specify a version 3.0.4 and 3.0.5 default to surefire 2.10 3.1.1 defaults surefire to 2.12.4 HTH On 28 January 2014 00:52, John Dix john@amdocs.com wrote: I should point out that I have run 3.0.3 against the build in question and I still received the same non-verbose output they are complaining about. At a loss at what to tell them other than a shoulder shrug and idunno I thought I would ask here to see if there was a change somewhere that could account for this. -Original Message- From: John Dix Sent: Monday, January 27, 2014 4:35 PM To: Maven Users List Subject: surefire plugin output changes Hello all, We have migrated our maven from version 3.0.3 to 3.0.5 and our developers are claiming now that they're not seeing the verbosity in the test outputs like they did before. The only see a synopsis and summary of the number of tests run, failed, and which ones failed. Servers are run in a CentOS 5.3 linux environment within Jenkins. I am being told that before this upgrade they had an extremely chatty output like below. What they haven't been able to confirm for me is whether this change happened after we moved from 2.1.0 to 3.0.3 or not as that was before my time. Can anyone please confirm if this output was/is handled by surefire and maybe a commandline switch in maven got lost, or from somewhere else? The output as from an old archived log the developer gave me. [INFO ]: com.qpass.payment.multinodeCloud.DeployTest: Connected to Mission Control Server on :: myWar from getWarUrl = mobilePaymentsApp-amp_i-SNAPSHOT.war objname = ampait/ ampait-control-1.opsdevna3.amdocsdc.net/5666/com.qpass:Type=Environmen t [INFO ]: com.qpass.payment.multinodeCloud.DeployTest: Test: deployAppWartoSelectedsEnv Result={0}: {machine-name=Successfull Deployment of WAR file: app} [INFO ]: com.qpass.payment.multinodeCloud.DeployTest: Test:deployAppWar: Time Spent 2 min 24 secs 324 ms myWar from getWarUrl = mobilePaymentExtractsApp-amp_i-SNAPSHOT.war [INFO ]: com.qpass.payment.multinodeCloud.DeployTest: Test: deployExtractsWar Result={0}: {ampait-back-1.opsdevna3.amdocsdc.net:8999=Successfull Deployment of WAR file: extractsApp} [INFO ]: com.qpass.payment.multinodeCloud.DeployTest: Test:deployExtractsWar: Time Spent 1 min 23 secs 14 ms myWar from getWarUrl = nxtcomSampleApp-amp_i-SNAPSHOT.war [INFO ]: com.qpass.payment.multinodeCloud.DeployTest: Test: deployNxtSampleWar Result={0}: {ampait-back-1.opsdevna3.amdocsdc.net:8999=Successfull Deployment of WAR file: nxtcomServices} [INFO ]: com.qpass.payment.multinodeCloud.DeployTest: Test:deployNxtSampleWar: Time Spent 47 secs 410 ms myWar from getWarUrl = zmobileSampleApp-amp_i-SNAPSHOT.war [INFO ]: com.qpass.payment.multinodeCloud.DeployTest: Test: deployZmobileSampleWar Result={0}: {ampait-back-1.opsdevna3.amdocsdc.net:8999=Successfull Deployment of WAR file: zmobileServices} [INFO ]: com.qpass.payment.multinodeCloud.DeployTest: Test:deployZmobileSampleWar: Time Spent 31 secs 400 ms myWar from getWarUrl = mobilePaymentsWebServiceApp-amp_i-SNAPSHOT.war [INFO ]: com.qpass.payment.multinodeCloud.DeployTest: Test: deployWebServiceApp Result={0}: {ampait-front-1.opsdevna3.amdocsdc.net:8999=Successfull Deployment of WAR file: ROOT} [INFO ]: com.qpass.payment.multinodeCloud.DeployTest: Test:deployBackWarToSelectedEnv: Time Spent 1 min 33 secs 791 ms myWar from getWarUrl = paymentsReportingUiApplication-amp_i-SNAPSHOT.war This message and the information contained herein is proprietary and confidential and subject to the Amdocs policy statement, you may review at http://www.amdocs.com/email_disclaimer.asp - 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 This message and the information contained herein is proprietary and confidential and subject to the Amdocs policy statement, you may review at http://www.amdocs.com/email_disclaimer.asp - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
RE: surefire plugin output changes
I got it... 2.16 -Original Message- From: John Dix Sent: Tuesday, January 28, 2014 9:45 AM To: Maven Users List Subject: RE: surefire plugin output changes Do you know which version Maven 2.1.0 had? -Original Message- From: Stephen Connolly [mailto:stephen.alan.conno...@gmail.com] Sent: Tuesday, January 28, 2014 12:56 AM To: Maven Users List Subject: Re: surefire plugin output changes 3.0.3 defaulted to surefire 2.7.2 if you did not specify a version 3.0.4 and 3.0.5 default to surefire 2.10 3.1.1 defaults surefire to 2.12.4 HTH On 28 January 2014 00:52, John Dix john@amdocs.com wrote: I should point out that I have run 3.0.3 against the build in question and I still received the same non-verbose output they are complaining about. At a loss at what to tell them other than a shoulder shrug and idunno I thought I would ask here to see if there was a change somewhere that could account for this. -Original Message- From: John Dix Sent: Monday, January 27, 2014 4:35 PM To: Maven Users List Subject: surefire plugin output changes Hello all, We have migrated our maven from version 3.0.3 to 3.0.5 and our developers are claiming now that they're not seeing the verbosity in the test outputs like they did before. The only see a synopsis and summary of the number of tests run, failed, and which ones failed. Servers are run in a CentOS 5.3 linux environment within Jenkins. I am being told that before this upgrade they had an extremely chatty output like below. What they haven't been able to confirm for me is whether this change happened after we moved from 2.1.0 to 3.0.3 or not as that was before my time. Can anyone please confirm if this output was/is handled by surefire and maybe a commandline switch in maven got lost, or from somewhere else? The output as from an old archived log the developer gave me. [INFO ]: com.qpass.payment.multinodeCloud.DeployTest: Connected to Mission Control Server on :: myWar from getWarUrl = mobilePaymentsApp-amp_i-SNAPSHOT.war objname = ampait/ ampait-control-1.opsdevna3.amdocsdc.net/5666/com.qpass:Type=Environmen t [INFO ]: com.qpass.payment.multinodeCloud.DeployTest: Test: deployAppWartoSelectedsEnv Result={0}: {machine-name=Successfull Deployment of WAR file: app} [INFO ]: com.qpass.payment.multinodeCloud.DeployTest: Test:deployAppWar: Time Spent 2 min 24 secs 324 ms myWar from getWarUrl = mobilePaymentExtractsApp-amp_i-SNAPSHOT.war [INFO ]: com.qpass.payment.multinodeCloud.DeployTest: Test: deployExtractsWar Result={0}: {ampait-back-1.opsdevna3.amdocsdc.net:8999=Successfull Deployment of WAR file: extractsApp} [INFO ]: com.qpass.payment.multinodeCloud.DeployTest: Test:deployExtractsWar: Time Spent 1 min 23 secs 14 ms myWar from getWarUrl = nxtcomSampleApp-amp_i-SNAPSHOT.war [INFO ]: com.qpass.payment.multinodeCloud.DeployTest: Test: deployNxtSampleWar Result={0}: {ampait-back-1.opsdevna3.amdocsdc.net:8999=Successfull Deployment of WAR file: nxtcomServices} [INFO ]: com.qpass.payment.multinodeCloud.DeployTest: Test:deployNxtSampleWar: Time Spent 47 secs 410 ms myWar from getWarUrl = zmobileSampleApp-amp_i-SNAPSHOT.war [INFO ]: com.qpass.payment.multinodeCloud.DeployTest: Test: deployZmobileSampleWar Result={0}: {ampait-back-1.opsdevna3.amdocsdc.net:8999=Successfull Deployment of WAR file: zmobileServices} [INFO ]: com.qpass.payment.multinodeCloud.DeployTest: Test:deployZmobileSampleWar: Time Spent 31 secs 400 ms myWar from getWarUrl = mobilePaymentsWebServiceApp-amp_i-SNAPSHOT.war [INFO ]: com.qpass.payment.multinodeCloud.DeployTest: Test: deployWebServiceApp Result={0}: {ampait-front-1.opsdevna3.amdocsdc.net:8999=Successfull Deployment of WAR file: ROOT} [INFO ]: com.qpass.payment.multinodeCloud.DeployTest: Test:deployBackWarToSelectedEnv: Time Spent 1 min 33 secs 791 ms myWar from getWarUrl = paymentsReportingUiApplication-amp_i-SNAPSHOT.war This message and the information contained herein is proprietary and confidential and subject to the Amdocs policy statement, you may review at http://www.amdocs.com/email_disclaimer.asp - 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 This message and the information contained herein is proprietary and confidential and subject to the Amdocs policy statement, you may review at http://www.amdocs.com/email_disclaimer.asp - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands
Re: surefire plugin output changes
No, that's the latest version of maven-surefire-plugin. Run mvn help:effective-pom from a pom.xml in your project and look for the stanza that concerns the maven-surefire-plugin and that will tell you for sure. Best, Laird On Tue, Jan 28, 2014 at 10:06 AM, John Dix john@amdocs.com wrote: I got it... 2.16 -Original Message- From: John Dix Sent: Tuesday, January 28, 2014 9:45 AM To: Maven Users List Subject: RE: surefire plugin output changes Do you know which version Maven 2.1.0 had? -Original Message- From: Stephen Connolly [mailto:stephen.alan.conno...@gmail.com] Sent: Tuesday, January 28, 2014 12:56 AM To: Maven Users List Subject: Re: surefire plugin output changes 3.0.3 defaulted to surefire 2.7.2 if you did not specify a version 3.0.4 and 3.0.5 default to surefire 2.10 3.1.1 defaults surefire to 2.12.4 HTH On 28 January 2014 00:52, John Dix john@amdocs.com wrote: I should point out that I have run 3.0.3 against the build in question and I still received the same non-verbose output they are complaining about. At a loss at what to tell them other than a shoulder shrug and idunno I thought I would ask here to see if there was a change somewhere that could account for this. -Original Message- From: John Dix Sent: Monday, January 27, 2014 4:35 PM To: Maven Users List Subject: surefire plugin output changes Hello all, We have migrated our maven from version 3.0.3 to 3.0.5 and our developers are claiming now that they're not seeing the verbosity in the test outputs like they did before. The only see a synopsis and summary of the number of tests run, failed, and which ones failed. Servers are run in a CentOS 5.3 linux environment within Jenkins. I am being told that before this upgrade they had an extremely chatty output like below. What they haven't been able to confirm for me is whether this change happened after we moved from 2.1.0 to 3.0.3 or not as that was before my time. Can anyone please confirm if this output was/is handled by surefire and maybe a commandline switch in maven got lost, or from somewhere else? The output as from an old archived log the developer gave me. [INFO ]: com.qpass.payment.multinodeCloud.DeployTest: Connected to Mission Control Server on :: myWar from getWarUrl = mobilePaymentsApp-amp_i-SNAPSHOT.war objname = ampait/ ampait-control-1.opsdevna3.amdocsdc.net/5666/com.qpass:Type=Environmen t [INFO ]: com.qpass.payment.multinodeCloud.DeployTest: Test: deployAppWartoSelectedsEnv Result={0}: {machine-name=Successfull Deployment of WAR file: app} [INFO ]: com.qpass.payment.multinodeCloud.DeployTest: Test:deployAppWar: Time Spent 2 min 24 secs 324 ms myWar from getWarUrl = mobilePaymentExtractsApp-amp_i-SNAPSHOT.war [INFO ]: com.qpass.payment.multinodeCloud.DeployTest: Test: deployExtractsWar Result={0}: {ampait-back-1.opsdevna3.amdocsdc.net:8999=Successfull Deployment of WAR file: extractsApp} [INFO ]: com.qpass.payment.multinodeCloud.DeployTest: Test:deployExtractsWar: Time Spent 1 min 23 secs 14 ms myWar from getWarUrl = nxtcomSampleApp-amp_i-SNAPSHOT.war [INFO ]: com.qpass.payment.multinodeCloud.DeployTest: Test: deployNxtSampleWar Result={0}: {ampait-back-1.opsdevna3.amdocsdc.net:8999=Successfull Deployment of WAR file: nxtcomServices} [INFO ]: com.qpass.payment.multinodeCloud.DeployTest: Test:deployNxtSampleWar: Time Spent 47 secs 410 ms myWar from getWarUrl = zmobileSampleApp-amp_i-SNAPSHOT.war [INFO ]: com.qpass.payment.multinodeCloud.DeployTest: Test: deployZmobileSampleWar Result={0}: {ampait-back-1.opsdevna3.amdocsdc.net:8999=Successfull Deployment of WAR file: zmobileServices} [INFO ]: com.qpass.payment.multinodeCloud.DeployTest: Test:deployZmobileSampleWar: Time Spent 31 secs 400 ms myWar from getWarUrl = mobilePaymentsWebServiceApp-amp_i-SNAPSHOT.war [INFO ]: com.qpass.payment.multinodeCloud.DeployTest: Test: deployWebServiceApp Result={0}: {ampait-front-1.opsdevna3.amdocsdc.net:8999=Successfull Deployment of WAR file: ROOT} [INFO ]: com.qpass.payment.multinodeCloud.DeployTest: Test:deployBackWarToSelectedEnv: Time Spent 1 min 33 secs 791 ms myWar from getWarUrl = paymentsReportingUiApplication-amp_i-SNAPSHOT.war This message and the information contained herein is proprietary and confidential and subject to the Amdocs policy statement, you may review at http://www.amdocs.com/email_disclaimer.asp - 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
RE: surefire plugin output changes
Thanks laird... I got 2.4.3. Do you know where I can find the release notes for the various versions to see the list of changes made between then and now? -Original Message- From: Laird Nelson [mailto:ljnel...@gmail.com] Sent: Tuesday, January 28, 2014 10:27 AM To: Maven Users List Subject: Re: surefire plugin output changes No, that's the latest version of maven-surefire-plugin. Run mvn help:effective-pom from a pom.xml in your project and look for the stanza that concerns the maven-surefire-plugin and that will tell you for sure. Best, Laird On Tue, Jan 28, 2014 at 10:06 AM, John Dix john@amdocs.com wrote: I got it... 2.16 -Original Message- From: John Dix Sent: Tuesday, January 28, 2014 9:45 AM To: Maven Users List Subject: RE: surefire plugin output changes Do you know which version Maven 2.1.0 had? -Original Message- From: Stephen Connolly [mailto:stephen.alan.conno...@gmail.com] Sent: Tuesday, January 28, 2014 12:56 AM To: Maven Users List Subject: Re: surefire plugin output changes 3.0.3 defaulted to surefire 2.7.2 if you did not specify a version 3.0.4 and 3.0.5 default to surefire 2.10 3.1.1 defaults surefire to 2.12.4 HTH On 28 January 2014 00:52, John Dix john@amdocs.com wrote: I should point out that I have run 3.0.3 against the build in question and I still received the same non-verbose output they are complaining about. At a loss at what to tell them other than a shoulder shrug and idunno I thought I would ask here to see if there was a change somewhere that could account for this. -Original Message- From: John Dix Sent: Monday, January 27, 2014 4:35 PM To: Maven Users List Subject: surefire plugin output changes Hello all, We have migrated our maven from version 3.0.3 to 3.0.5 and our developers are claiming now that they're not seeing the verbosity in the test outputs like they did before. The only see a synopsis and summary of the number of tests run, failed, and which ones failed. Servers are run in a CentOS 5.3 linux environment within Jenkins. I am being told that before this upgrade they had an extremely chatty output like below. What they haven't been able to confirm for me is whether this change happened after we moved from 2.1.0 to 3.0.3 or not as that was before my time. Can anyone please confirm if this output was/is handled by surefire and maybe a commandline switch in maven got lost, or from somewhere else? The output as from an old archived log the developer gave me. [INFO ]: com.qpass.payment.multinodeCloud.DeployTest: Connected to Mission Control Server on :: myWar from getWarUrl = mobilePaymentsApp-amp_i-SNAPSHOT.war objname = ampait/ ampait-control-1.opsdevna3.amdocsdc.net/5666/com.qpass:Type=Environm en t [INFO ]: com.qpass.payment.multinodeCloud.DeployTest: Test: deployAppWartoSelectedsEnv Result={0}: {machine-name=Successfull Deployment of WAR file: app} [INFO ]: com.qpass.payment.multinodeCloud.DeployTest: Test:deployAppWar: Time Spent 2 min 24 secs 324 ms myWar from getWarUrl = mobilePaymentExtractsApp-amp_i-SNAPSHOT.war [INFO ]: com.qpass.payment.multinodeCloud.DeployTest: Test: deployExtractsWar Result={0}: {ampait-back-1.opsdevna3.amdocsdc.net:8999=Successfull Deployment of WAR file: extractsApp} [INFO ]: com.qpass.payment.multinodeCloud.DeployTest: Test:deployExtractsWar: Time Spent 1 min 23 secs 14 ms myWar from getWarUrl = nxtcomSampleApp-amp_i-SNAPSHOT.war [INFO ]: com.qpass.payment.multinodeCloud.DeployTest: Test: deployNxtSampleWar Result={0}: {ampait-back-1.opsdevna3.amdocsdc.net:8999=Successfull Deployment of WAR file: nxtcomServices} [INFO ]: com.qpass.payment.multinodeCloud.DeployTest: Test:deployNxtSampleWar: Time Spent 47 secs 410 ms myWar from getWarUrl = zmobileSampleApp-amp_i-SNAPSHOT.war [INFO ]: com.qpass.payment.multinodeCloud.DeployTest: Test: deployZmobileSampleWar Result={0}: {ampait-back-1.opsdevna3.amdocsdc.net:8999=Successfull Deployment of WAR file: zmobileServices} [INFO ]: com.qpass.payment.multinodeCloud.DeployTest: Test:deployZmobileSampleWar: Time Spent 31 secs 400 ms myWar from getWarUrl = mobilePaymentsWebServiceApp-amp_i-SNAPSHOT.war [INFO ]: com.qpass.payment.multinodeCloud.DeployTest: Test: deployWebServiceApp Result={0}: {ampait-front-1.opsdevna3.amdocsdc.net:8999=Successfull Deployment of WAR file: ROOT} [INFO ]: com.qpass.payment.multinodeCloud.DeployTest: Test:deployBackWarToSelectedEnv: Time Spent 1 min 33 secs 791 ms myWar from getWarUrl = paymentsReportingUiApplication-amp_i-SNAPSHOT.war This message and the information contained herein is proprietary and confidential and subject to the Amdocs policy statement, you may review at http://www.amdocs.com
Re: surefire plugin output changes
On Tue, Jan 28, 2014 at 11:12 AM, John Dix john@amdocs.com wrote: Thanks laird... I got 2.4.3. Do you know where I can find the release notes for the various versions to see the list of changes made between then and now? This is the closest thing I found: http://jira.codehaus.org/browse/SUREFIRE#selectedTab=com.atlassian.jira.plugin.system.project%3Achangelog-panel Have fun digging manually. Best, Laird -- http://about.me/lairdnelson
surefire plugin output changes
Hello all, We have migrated our maven from version 3.0.3 to 3.0.5 and our developers are claiming now that they're not seeing the verbosity in the test outputs like they did before. The only see a synopsis and summary of the number of tests run, failed, and which ones failed. Servers are run in a CentOS 5.3 linux environment within Jenkins. I am being told that before this upgrade they had an extremely chatty output like below. What they haven't been able to confirm for me is whether this change happened after we moved from 2.1.0 to 3.0.3 or not as that was before my time. Can anyone please confirm if this output was/is handled by surefire and maybe a commandline switch in maven got lost, or from somewhere else? The output as from an old archived log the developer gave me. [INFO ]: com.qpass.payment.multinodeCloud.DeployTest: Connected to Mission Control Server on :: myWar from getWarUrl = mobilePaymentsApp-amp_i-SNAPSHOT.war objname = ampait/ampait-control-1.opsdevna3.amdocsdc.net/5666/com.qpass:Type=Environment [INFO ]: com.qpass.payment.multinodeCloud.DeployTest: Test: deployAppWartoSelectedsEnv Result={0}: {machine-name=Successfull Deployment of WAR file: app} [INFO ]: com.qpass.payment.multinodeCloud.DeployTest: Test:deployAppWar: Time Spent 2 min 24 secs 324 ms myWar from getWarUrl = mobilePaymentExtractsApp-amp_i-SNAPSHOT.war [INFO ]: com.qpass.payment.multinodeCloud.DeployTest: Test: deployExtractsWar Result={0}: {ampait-back-1.opsdevna3.amdocsdc.net:8999=Successfull Deployment of WAR file: extractsApp} [INFO ]: com.qpass.payment.multinodeCloud.DeployTest: Test:deployExtractsWar: Time Spent 1 min 23 secs 14 ms myWar from getWarUrl = nxtcomSampleApp-amp_i-SNAPSHOT.war [INFO ]: com.qpass.payment.multinodeCloud.DeployTest: Test: deployNxtSampleWar Result={0}: {ampait-back-1.opsdevna3.amdocsdc.net:8999=Successfull Deployment of WAR file: nxtcomServices} [INFO ]: com.qpass.payment.multinodeCloud.DeployTest: Test:deployNxtSampleWar: Time Spent 47 secs 410 ms myWar from getWarUrl = zmobileSampleApp-amp_i-SNAPSHOT.war [INFO ]: com.qpass.payment.multinodeCloud.DeployTest: Test: deployZmobileSampleWar Result={0}: {ampait-back-1.opsdevna3.amdocsdc.net:8999=Successfull Deployment of WAR file: zmobileServices} [INFO ]: com.qpass.payment.multinodeCloud.DeployTest: Test:deployZmobileSampleWar: Time Spent 31 secs 400 ms myWar from getWarUrl = mobilePaymentsWebServiceApp-amp_i-SNAPSHOT.war [INFO ]: com.qpass.payment.multinodeCloud.DeployTest: Test: deployWebServiceApp Result={0}: {ampait-front-1.opsdevna3.amdocsdc.net:8999=Successfull Deployment of WAR file: ROOT} [INFO ]: com.qpass.payment.multinodeCloud.DeployTest: Test:deployBackWarToSelectedEnv: Time Spent 1 min 33 secs 791 ms myWar from getWarUrl = paymentsReportingUiApplication-amp_i-SNAPSHOT.war This message and the information contained herein is proprietary and confidential and subject to the Amdocs policy statement, you may review at http://www.amdocs.com/email_disclaimer.asp - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org