eclipse-vertx / vertx-junit5

Testing Vert.x applications with JUnit 5
Apache License 2.0
44 stars 32 forks source link

Regression due to RxJava1 and RxJava2 deps being optional #93

Closed tsegismont closed 3 years ago

tsegismont commented 3 years ago

In #92, vertx-rx-java and vertx-rx-java2 have been marked as optional in the POM files, but the extension code loads rxified Vertx and WebClient classes. The test suite passed because Maven Surefire Plugin is not configured to exclude these dependencies while running tests.

All user projects that depend on vertx-junit5 but not on both vertx-rx-java and vertx-rx-java2 will no longer build after upgrading to 3.9.5.

As a workaround, the vertx-rx-java and vertx-rx-java2 dependencies must be added back manually, in the scope that fits the project.

For Maven:

<dependency>
  <groupId>io.vertx</groupId>
  <artifactId>vertx-rx-java</artifactId>
  <version>3.9.5</version>
  <scope>test</scope> <!-- remove this line if Vert.x RxJava 1 is used in the project -->
  <test>
</dependency>
<dependency>
  <groupId>io.vertx</groupId>
  <artifactId>vertx-rx-java2</artifactId>
  <version>3.9.5</version>
  <scope>test</scope> <!-- remove this line if Vert.x RxJava 2 is used in the project -->
</dependency>

For Gradle:

testImplementation("io.vertx:vertx-rx-java:3.9.5") // change to implementation(...) if Vert.x RxJava 1 is used in the project
testImplementation("io.vertx:vertx-rx-java2:3.9.5") // change to implementation(...) if Vert.x RxJava 2 is used in the project
tsegismont commented 3 years ago

Fixed in #94