Le lun. 4 mai 2020 à 18:30, Stephane Nicoll <stephane.nic...@gmail.com> a
écrit :

> On Mon, May 4, 2020 at 5:55 PM Romain Manni-Bucau <rmannibu...@gmail.com>
> wrote:
>
> > Le lun. 4 mai 2020 à 17:23, Stephane Nicoll <stephane.nic...@gmail.com>
> a
> > écrit :
> >
> > > On Mon, May 4, 2020 at 5:17 PM Romain Manni-Bucau <
> rmannibu...@gmail.com
> > >
> > > wrote:
> > >
> > > > Le lun. 4 mai 2020 à 17:06, Stephane Nicoll <
> stephane.nic...@gmail.com
> > >
> > > a
> > > > écrit :
> > > >
> > > > > Thanks but that doesn't really answer my question. That version is
> > > picked
> > > > > up by dependency management of the project as far as I can tell.
> If a
> > > > > project does provide an older junit engine version the build will
> > > break.
> > > > >
> > > > > If you meant to "force" a single version then I'd argue that you
> > > > shouldn't
> > > > > resolve the one provided in dependency management for the project.
> I
> > > also
> > > > > find this change quite suspicious in a maintenance release.
> > > > >
> > > > >
> > > > Long story short the first jupiter integration contributed by junit
> > team
> > > > was supporting a single version.
> > > > This is what is in 2.x of surefire.
> > > > This maintenance release just upgraded the version as requested in a
> > > ticket
> > > > IIRC but didn't change the way it is loaded (which is done on
> master).
> > > >
> > >
> > > It is changing things in a non backward compatible way as you are now
> > > required to use  a more recent JUnit version in a maintenance release
> of
> > > the plugin. And given that the plugin loads the version from dependency
> > > management, you are not forcing the version that you require. If the
> > > project uses the junit bom (as it should be) and it does not match the
> > > requirement, the build fails with a NoClassDefFoundError. Surely that
> > can't
> > > be right?
> > >
> >
> > I - and all I guess - agree with you that this implementation is not the
> > expected one from an user perspective, this is why it got fixed on 3.x,
> > but it didn't change in 2.x, only the supported version and we likely
> > missed 1.5/1.6.1 were not compatible (think spring is using 1.6.0 btw).
> > Using user version was not a feature and is still not in 2.x.
> >
>
>
> OK. Why is our build failing with that error if we're importing the JUnit
> 5.5.2 bom and it does not fail if we're importing the JUnit 5.6.2 bom? Our
> test dependencies have "junit-jupiter" in test scope which brings the
> engine.
>
> That looks like Surefire is using the user version to me. Anyway, if it
> wasn't we wouldn't have the error above, wouldn't we?
>

AFAIK you don't import junit-platform-launcher in 1.5.2 so it fails.
So surefire uses user version but misses one dep which takes in its own pom.


>
>
>
> >
> >
> > >
> > > Just to make sure I understood your point. You are OK if users
> upgrading
> > to
> > > a maintenance release of this plugin are also forced to upgrade the
> JUnit
> > > version they are using? This is going to break pretty much all Spring
> > Boot
> > > users in 2.2.x as our policy is not upgrade to a new feature release of
> > > JUnit in a maintenance release of Spring Boot.
> > >
> >
> > Not exactly, I'm saying that it was the compromise selected for this
> > release - once again we can revise it.
> >
> > The workaround for 2.x is to add the junit platform in the test
> > dependencies and I guess it is this one for several pre-3 versions
> (recall
> > having done it for 1.3):
> >
> > <dependency>
> >   <groupId>org.junit.platform</groupId>
> >   <artifactId>junit-platform-launcher</artifactId>
> >   <version>1.5.2</version>
> > </dependency>
> > <dependency>
> >   <groupId>org.junit.platform</groupId>
> >   <artifactId>junit-platform-engine</artifactId>
> >   <version>1.5.2</version>
> > </dependency>
> >
> >
> >
> >
> > >
> > > Suffice to say, I don't think we can upgrade to this plugin. Have I
> > missed
> > > something?
> > >
> >
> > Once again if you want to do a PR or even handle the dev/test/merge
> > lifecycle since you are a committer, it would be welcomed and I would be
> > happy to help you.
> > I just wanted to highlight there is no structural change there and the
> > downside of supporting a single version is still there and users wanting
> to
> > use 1.6 will have the opposite issue than yours.
> >
> > @Tibor: if you read these lines, how far are we to do a 3.0.0, it is
> proven
> > pretty stable and saw the tcp work almost done, maybe we should estimate
> > when we can make it out if we want to reduce the load on 2.x. Wdyt?
> >
> >
> > >
> > >
> > >
> > > >
> > > >
> > > > >
> > > > >
> > > > > On Mon, May 4, 2020 at 5:03 PM Romain Manni-Bucau <
> > > rmannibu...@gmail.com
> > > > >
> > > > > wrote:
> > > > >
> > > > > > Hi Stephane,
> > > > > >
> > > > > > AFAIK the choice with 2.22 maintenance for now was to keep using
> a
> > > > single
> > > > > > junit5 version as originally and if only support more flexibility
> > > with
> > > > > 3.x.
> > > > > > Think it makes sense for now but if you want to PR 2.22 to
> backport
> > > 3.x
> > > > > > work I guess it can be discussed too in another thread.
> > > > > >
> > > > > > Romain Manni-Bucau
> > > > > > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > > > > > <https://rmannibucau.metawerx.net/> | Old Blog
> > > > > > <http://rmannibucau.wordpress.com> | Github <
> > > > > > https://github.com/rmannibucau> |
> > > > > > LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
> > > > > > <
> > > > > >
> > > > >
> > > >
> > >
> >
> https://www.packtpub.com/application-development/java-ee-8-high-performance
> > > > > > >
> > > > > >
> > > > > >
> > > > > > Le lun. 4 mai 2020 à 16:35, Stephane Nicoll <
> > > stephane.nic...@gmail.com
> > > > >
> > > > > a
> > > > > > écrit :
> > > > > >
> > > > > > > An update. This may be the other fixed issue in that release
> > > actually
> > > > > > > (SUREFIRE-1764). Is JUnit engine 1.6.1 now mandatory? What
> > happens
> > > > for
> > > > > > > projects that are using an older JUnit version?
> > > > > > >
> > > > > > > On Mon, May 4, 2020 at 3:59 PM Stephane Nicoll <
> > > > > > stephane.nic...@gmail.com>
> > > > > > > wrote:
> > > > > > >
> > > > > > > > I am not sure that SUREFIRE-1679 is fixed. I've ran the
> Spring
> > > Boot
> > > > > > build
> > > > > > > > with 2.22.2 and reproduced the error there. Upgrading to this
> > > > > candidate
> > > > > > > > release and I got this error.
> > > > > > > >
> > > > > > > > [ERROR] Failed to execute goal
> > > > > > > > org.apache.maven.plugins:maven-surefire-plugin:2.22.3:test
> > > > > > (default-test)
> > > > > > > > on project spring-boot-configuration-metadata: There are test
> > > > > failures.
> > > > > > > > [ERROR]
> > > > > > > > [ERROR] Please refer to
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> /Users/snicoll/workspace/work/spring-boot/2.2.x/spring-boot-project/spring-boot-tools/spring-boot-configuration-metadata/target/surefire-reports
> > > > > > > > for the individual test results.
> > > > > > > > [ERROR] Please refer to dump files (if any exist)
> [date].dump,
> > > > > > > > [date]-jvmRun[N].dump and [date].dumpstream.
> > > > > > > > [ERROR] There was an error in the forked process
> > > > > > > > [ERROR] java.lang.NoClassDefFoundError:
> > > > > > > > org/junit/platform/engine/EngineDiscoveryListener
> > > > > > > > [ERROR]
> > > > org.apache.maven.surefire.booter.SurefireBooterForkException:
> > > > > > > > There was an error in the forked process
> > > > > > > > [ERROR] java.lang.NoClassDefFoundError:
> > > > > > > > org/junit/platform/engine/EngineDiscoveryListener
> > > > > > > > [ERROR] at
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:656)
> > > > > > > > [ERROR] at
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:282)
> > > > > > > > [ERROR] at
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:245)
> > > > > > > > [ERROR] at
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1186)
> > > > > > > > [ERROR] at
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:1014)
> > > > > > > > [ERROR] at
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:860)
> > > > > > > >
> > > > > > > > See
> > https://github.com/spring-projects/spring-boot/issues/19631
> > > > > > > >
> > > > > > > > On Sun, May 3, 2020 at 11:44 PM Tibor Digana <
> > > > tibordig...@apache.org
> > > > > >
> > > > > > > > wrote:
> > > > > > > >
> > > > > > > >> Hi,
> > > > > > > >>
> > > > > > > >> We solved 2 issues:
> > > > > > > >>
> > > > > > > >>
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12317927&version=12345472
> > > > > > > >>
> > > > > > > >> There are still a couple of issues left in JIRA:
> > > > > > > >>
> > > > > > > >>
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> https://issues.apache.org/jira/issues/?jql=project%20%3D%20SUREFIRE%20AND%20status%20%3D%20Open%20ORDER%20BY%20priority%20DESC
> > > > > > > >>
> > > > > > > >> Staging repo:
> > > > > > > >>
> > https://repository.apache.org/content/repositories/maven-1572/
> > > > > > > >>
> > > > > > > >>
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> https://repository.apache.org/content/repositories/maven-1572/org/apache/maven/surefire/surefire/2.22.3/surefire-2.22.3-source-release.zip
> > > > > > > >>
> > > > > > > >> Source release checksum(s):
> > > > > > > >>
> > > > > > > >> surefire-2.22.3-source-release.zip sha512::
> > > > > > > >>
> > > > > > > >>
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> c1533ed45fd3119d028a4914ca7557acfbfea5218b5536bbafeed4b33845486b976f20b39334e2917636e3739240478ca46bd25a0dc011e5fb2aa85033e9e959
> > > > > > > >> surefire-2.22.3-source-release.zip sha1:
> > > > > > > >> 2db957105d2929911927482c8d2198bd6ef718a7
> > > > > > > >>
> > > > > > > >>
> > > > > > > >> Staging site:
> > > > > > > >> N/A - we do not want to override new site with old versions
> > > 2.22.x
> > > > > > > >>
> > > > > > > >> Guide to testing staged releases:
> > > > > > > >>
> > > > > >
> > > http://maven.apache.org/guides/development/guide-testing-releases.html
> > > > > > > >>
> > > > > > > >> Vote open for 72 hours.
> > > > > > > >>
> > > > > > > >> [ ] +1
> > > > > > > >> [ ] +0
> > > > > > > >> [ ] -1
> > > > > > > >>
> > > > > > > >> --
> > > > > > > >> Cheers
> > > > > > > >> Tibor
> > > > > > > >>
> > > > > > > >>
> > > > >
> ---------------------------------------------------------------------
> > > > > > > >> To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
> > > > > > > >> For additional commands, e-mail: dev-h...@maven.apache.org
> > > > > > > >>
> > > > > > > >>
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>

Reply via email to