Skip to content
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

Upgrade jakarta.transaction-api from 2.0.0 to 2.0.1 #147

Open
chengfang opened this issue Oct 24, 2022 · 0 comments
Open

Upgrade jakarta.transaction-api from 2.0.0 to 2.0.1 #147

chengfang opened this issue Oct 24, 2022 · 0 comments

Comments

@chengfang
Copy link
Contributor

jakarta.transaction-api 2.0.1 is the version included in Jakarta EE 10:

diff between 2.0.0 and 2.0.1: jakartaee/transactions@2.0.0...2.0.1
tag: https://github.com/jakartaee/transactions/releases/tag/2.0.1

But after bumping to jakarta.transaction-api 2.0.1, ejb-api fails to build:

[INFO] --- maven-compiler-plugin:3.8.1:compile (compile-module-info) @ jakarta.ejb-api ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to /Users/cfang/dev/spec/enterprise-beans/api/target/classes
[parsing started SimpleFileObject[/Users/cfang/dev/spec/enterprise-beans/api/src/main/java/module-info.java]]
[parsing completed 15ms]
[loading /9-modules/java.rmi/module-info.sig]
[loading /9-modules/java.base/module-info.sig]
[loading /9-modules/java.logging/module-info.sig]
[loading /9-modules/java.naming/module-info.sig]
[loading /9-modules/java.security.sasl/module-info.sig]
[loading /Users/cfang/.m2/repository/jakarta/transaction/jakarta.transaction-api/2.0.1/jakarta.transaction-api-2.0.1.jar(/module-info.class)]
[total 89ms]
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] module not found: jakarta.cdi
[ERROR] module not found: java.transaction.xa
[INFO] 2 errors

jakarta.ejb module has a requires transitive on jakarta.transaction-api, which in turn has requires transitive on jakarta.cdi and java.transaction.xa. These 2 modules are not found by javac.

Changing requires transitive to requires in ejb does not help and it still fails with the same errors. But if I instead remove transitive from jakarta.transaction-api module, I was able to build ejb with the modified transaction-api. This is just an experiment and may not be the solution.

ejb-api only references the TransactionManager class from transaction-api, but the above chain of requires imposes some extra dependencies on ejb-api, and maybe some other consumer projects. So this may be something to consider for transaction-api project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant