Open xuanswe opened 10 months ago
could you also provide the pom?
demo> java --version
openjdk 17.0.2 2022-01-18 LTS
OpenJDK Runtime Environment Corretto-17.0.2.8.1 (build 17.0.2+8-LTS)
OpenJDK 64-Bit Server VM Corretto-17.0.2.8.1 (build 17.0.2+8-LTS, mixed mode, sharing)
demo> mvn --version
Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-17T20:33:14+02:00)
Java version: 17.0.2, vendor: Amazon.com Inc., runtime: C:\Users\...\.jdks\corretto-17.0.2
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
demo> mvn clean verify
...
ERROR org.springframework.boot.SpringApplication - Application run failed
java.lang.NoClassDefFoundError: org/junit/rules/ExternalResource
If remove junit 4 exclusion in pom.xml, mvn clean verify
works again.
@ybelMekk can you reproduce the error from the sample code?
Hello, the problem is the underlaying mockwebserver
that the mock-oauth2-server
project is using, we need to do some mixing, Im not sure you can fix this at your end.
@ybelMekk it seems https://github.com/square/okhttp/tree/master/mockwebserver-junit5 is relevant?
@ybelMekk junit5 is supported since mockwebserver 5 (currently alpha) See https://github.com/square/okhttp/issues/7987#issuecomment-1688344433
What do you think about the plan for mock-oauth2-server to catch up with mockwebserver 5?
Im not sure you can fix this at your end.
I tried to remove junit 4 and old mockwebserver, then follow https://github.com/square/okhttp/issues/7987#issuecomment-1688344433 but it doesn't work. Cannot bypass if mock-oauth2-server doesn't support it.
@xuan-nguyen-swe, Ive added a working exclusion of junit4
, try it out.
This issue is stale because it has been open for 60 days with no activity.
This issue is stale because it has been open for 60 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.
~@tommytroen should i merge this one? and release it in new minor?~
updated to new alpha.. no, so many changes, we wait to a stable release..
This issue is stale because it has been open for 60 days with no activity.
I use Spring Boot 2.7.14, JDK 17, Kotlin 1.8.22, JUnit 5 (JUnit 4 is forbidden), so I add this to our pom.xml.
Next I add MockOAuth2ServerInitializer.java in your example.
Then I get this error