-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A required class was missing while executing org.assertj:assertj-assertions-generator-maven-plugin:2.1.0:generate-assertions: org.junit.rules.TestRule #57
Comments
We've hit the same problem with assertj-assertions-generator-maven-plugin:2.2.0. We found that a We're using JDK11/Maven 3.6.0/JUnit 5 in our tech stack. <plugin>
<groupId>org.assertj</groupId>
<artifactId>assertj-assertions-generator-maven-plugin</artifactId>
<version>2.2.0</version>
<executions>
<execution>
<goals>
<goal>generate-assertions</goal>
</goals>
</execution>
</executions>
<configuration>
....
</configuration>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13</version>
</dependency>
</dependencies>
</plugin> |
I run into the same error when running My running environment is
Any suggestions? Of course, I didn't get the same when I run the whole test suite through |
This is very interesting class loader problem, so I have investigated it more deeply and created repo to reproduce https://github.com/bedla/maven-assertj-generator-test-error There are two workarounds described. First to add JUnit4 to plugin dependencies: <plugin>
<groupId>org.assertj</groupId>
<artifactId>assertj-assertions-generator-maven-plugin</artifactId>
<version>2.2.0</version>
<executions>
<execution>
<goals>
<goal>generate-assertions</goal>
</goals>
</execution>
</executions>
<configuration>
<generateJUnitSoftAssertions>true</generateJUnitSoftAssertions>
<packages>
<param>cz.bedla.dto</param>
</packages>
</configuration>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
</dependency>
</dependencies>
</plugin> And second to disable JUnit soft assertion generation: <plugin>
<groupId>org.assertj</groupId>
<artifactId>assertj-assertions-generator-maven-plugin</artifactId>
<version>2.2.0</version>
<executions>
<execution>
<goals>
<goal>generate-assertions</goal>
</goals>
</execution>
</executions>
<configuration>
<generateJUnitSoftAssertions>false</generateJUnitSoftAssertions>
<packages>
<param>cz.bedla.dto</param>
</packages>
</configuration>
</plugin> |
I am facing this issue when migrating my application from JDK8 to JDK11.
Any idea?
The text was updated successfully, but these errors were encountered: