According to the migration guide and java docs, since the java.transaction module that exports the javax.transaction package javax.transaction been marked as @Deprecated .
Ideally, you should port your code to javaee / javax.transaction . Currently, you can do this using an automatic module converted from a dependency:
<dependency> <groupId>javax.transaction</groupId> <artifactId>javax.transaction-api</artifactId> <version>1.2</version> </dependency>
and adding the following to module-info.java : -
requires javax.transaction.api;
Also, when using the maven-failsafe-plugin make sure that you are using the minimum compatible version 2.20.1 or higher, as indicated in the Maven progress document.
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-failsafe-plugin</artifactId> <version>2.20.1</version> </plugin>
@Deprecated (forRemoval = "after confirmation by OP")
On the other hand, a temporary workaround (as these modules will ultimately be removed from the JDK) can be used: -
--add-modules java.transaction
As mentioned in the comments, since the required dependency for javax.transaction-api already available in the classpath, you do not need to add any compiler parameter, otherwise you must block the current package using java.transaction exported javax.transaction module, which is perfect for your use, does not consist of a SystemException .
source share