I tried to upgrade rest-assured from 3.3.0 to latest 4.0.0 but I get collision on hamcrest-core
Dependency convergence error for org.hamcrest:hamcrest-core:1.3 paths to dependency are:
+-io.quarkus:quarkus-hibernate-orm-deployment:999-SNAPSHOT
+-junit:junit:4.12
+-org.hamcrest:hamcrest-core:1.3
and
+-io.quarkus:quarkus-hibernate-orm-deployment:999-SNAPSHOT
+-io.rest-assured:rest-assured:4.0.0
+-org.hamcrest:hamcrest-core:2.1
and
+-io.quarkus:quarkus-hibernate-orm-deployment:999-SNAPSHOT
+-io.rest-assured:rest-assured:4.0.0
+-org.hamcrest:hamcrest-library:2.1
+-org.hamcrest:hamcrest-core:2.1
JUnit 4 is used in several Quarkus modules and attached independent-projects.
When excluding hamcrest-core from junit or rest-assured I see compilation errors.
Feels like we will be stuck with rest-assured 3.3.0.
Any idea how to solve this collision?
Maybe one way of fixing this would be to upgrade our tests to use JUnit 5?
That's partial fix, we provide JUnit 4 extension - https://github.com/quarkusio/quarkus/tree/master/test-framework/junit4
Yes, and you wouldn't be able to use it with REST Assured.
Is there a reason why the JUnit4 extension is needed (besides migration from existing projects to Quarkus)? Depending on a library that's no longer maintained feels wrong to me :)
To cause more confusion, Rest assured 4.1.1 depends on hamcrest only, which is a Uberjar from hamcrest-core and hamcrest-library :)
I would not be opposed to make a stand and only support JUnit 5
quarkus-junit4 removed via https://github.com/quarkusio/quarkus/pull/3940
I will look into updating rest-assured and eliminating hamcrest-core deps
@rsvoboda Please ban them entirely to avoid conflicts. Thanks!
We still have them in various places :(
Updating rest-assured and awaitility eliminates some hamcrest 1.3 apperance, but we still have junit4 used in various places. Junit4 brings in hamcrest 1.3.
git grep '>junit<'
independent-projects/arc/pom.xml: <groupId>junit</groupId>
independent-projects/arc/pom.xml: <artifactId>junit</artifactId>
independent-projects/arc/processor/pom.xml: <groupId>junit</groupId>
independent-projects/arc/processor/pom.xml: <artifactId>junit</artifactId>
independent-projects/arc/runtime/pom.xml: <groupId>junit</groupId>
independent-projects/arc/runtime/pom.xml: <artifactId>junit</artifactId>
independent-projects/arc/tests/pom.xml: <groupId>junit</groupId>
independent-projects/arc/tests/pom.xml: <artifactId>junit</artifactId>
integration-tests/maven/src/it/setup-on-existing-pom-it/pom.xml: <groupId>junit</groupId>
integration-tests/maven/src/it/setup-on-existing-pom-it/pom.xml: <artifactId>junit</artifactId>
integration-tests/maven/src/it/setup-with-custom-quarkus-version-it/pom.xml: <groupId>junit</groupId>
integration-tests/maven/src/it/setup-with-custom-quarkus-version-it/pom.xml: <artifactId>junit</artifactId>
test-framework/arquillian/pom.xml: <groupId>junit</groupId>
test-framework/arquillian/pom.xml: <artifactId>junit</artifactId>
I would push PR for rest-assured and awaitility update now and continue with the remaining stuff continuously. @gsmet works for you ?
Note: Using mvn dependency:tree | grep -B 10 hamcrest-core to find hamcrest 1.3 usage.
@mkouba do you plan to say bye bye to JUnit 4 in Arc ?
https://github.com/quarkusio/quarkus/blob/master/independent-projects/arc/pom.xml#L40
do you plan to say bye bye to JUnit 4 in Arc ?
Well, I don't think this would bring any benefits but I wouldn't mind if @manovotn is willing to take care of it ;-).
Well, I don't think this would bring any benefits but I wouldn't mind if @manovotn is willing to take care of it ;-).
If you mean completely drop, then we'd need to rewrite ArcTestContainer into junit5 extension and then obviously rewrite all the tests.
Since you so nicely volunteered me, I've already assigned #4105 to myself
@mkouba @rsvoboda here is the Arc PR - https://github.com/quarkusio/quarkus/pull/4112
you are quick!
I suppose this issue can be closed or is there something missing?