Slackbot
10/12/2023, 1:43 AMVampire
10/12/2023, 1:59 AMdependencyInsight or build --scan to find out where it comes from if you are curious.Caleb Cushing
10/12/2023, 2:08 AMCaleb Cushing
10/12/2023, 2:11 AMkarta.annotation:jakarta.annotation-api:2.1.1
Variant compile:
| Attribute Name | Provided | Requested |
|--------------------------------|----------|--------------|
| org.gradle.status | release | |
| org.gradle.category | library | library |
| org.gradle.libraryelements | jar | jar |
| org.gradle.usage | java-api | java-api |
| org.gradle.dependency.bundling | | external |
| org.gradle.jvm.environment | | standard-jvm |
| org.gradle.jvm.version | | 17 |
Selection reasons:
- By constraint: dependency was locked to version '2.1.1'
- By ancestor
- By constraint: rejected versions 1.3.5, 1.3.4, 1.3.3 because need the 1.0 api
- By conflict resolution: between versions 2.1.1 and 1.3.5
jakarta.annotation:jakarta.annotation-api:{strictly 2.1.1} -> 2.1.1
\--- compileClasspath
jakarta.annotation:jakarta.annotation-api:2.1.1
\--- org.springframework.boot:spring-boot-starter-parent:3.1.4
\--- compileClasspath (requested org.springframework.boot:spring-boot-starter-parent:3.+)
jakarta.annotation:jakarta.annotation-api:1.3.4 -> 2.1.1
\--- si.uom:si-units:2.1
+--- compileClasspath (requested si.uom:si-units:{strictly 2.1})
\--- systems.uom:systems-common:2.1
\--- compileClasspath (requested systems.uom:systems-common:2.+)
jakarta.annotation:jakarta.annotation-api:1.+ -> 2.1.1
\--- compileClasspathCaleb Cushing
10/12/2023, 2:18 AMconstraints {
implementation(libs.javax.annotation) {
version {
strictly("1.3.4")
}
because("need the 1.0 api")
}
}Vampire
10/12/2023, 2:19 AMCaleb Cushing
10/12/2023, 2:19 AMVampire
10/12/2023, 2:19 AMVampire
10/12/2023, 2:20 AM!! shortcut suffixCaleb Cushing
10/12/2023, 2:24 AMCaleb Cushing
10/12/2023, 2:26 AM1.+!!?Thomas Broyer
10/12/2023, 7:50 AMjavax.annotation classes that won't conflict with Jakarta EE 9+ artifact coordinates.
E.g. org.apache.tomcat:tomcat-annotations-api (according to https://github.com/gradlex-org/java-ecosystem-capabilities)Caleb Cushing
10/12/2023, 12:10 PMCaleb Cushing
10/12/2023, 12:11 PMCaleb Cushing
10/12/2023, 12:20 PMVampire
10/12/2023, 12:33 PMCaleb Cushing
10/12/2023, 12:35 PMVampire
10/12/2023, 12:38 PMCaleb Cushing
10/12/2023, 12:40 PMThomas Broyer
10/12/2023, 12:58 PMjavax and jakarta version at the same time in the classpath would break. If things can cohabit, then there's no reason they share the same Maven coordinates.
Some people go as far as changing their Java package and Maven coordinates whenever they ship a breaking change (https://jakewharton.com/java-interoperability-policy-for-major-version-updates/)Vampire
10/12/2023, 1:51 PMVampire
10/12/2023, 1:52 PMjavax CDI, and some library that provides beans with javax CDI.Vampire
10/12/2023, 1:52 PMjakarta CDI, then the beans are not found anymore as they use the wrong annotations.Vampire
10/12/2023, 1:53 PMVampire
10/12/2023, 1:53 PMThomas Broyer
10/12/2023, 2:14 PMjavax and jakarta packages in the same app still is possible if "upgrading" from javax to jakarta coordinates.
Also, there's a difference between "it's not what you'd want" vs. "it's impossible". Choosing the "it's impossible" path when technically they can coexist was a bad idea.
Anyway, that ship has sailed, Jakarta EE 8 was among the dumbest idea on earth (partly due to Oracle being a d*ck, partly due Jakarta not understanding dependency resolvers and usage of their technologies outside of "big-ass application servers") and we now have to live with it (until, one day, all those javax will be buried for good).Vampire
10/12/2023, 2:16 PMCaleb Cushing
10/12/2023, 4:02 PMThomas Broyer
10/12/2023, 4:20 PMProvider implementations and injected values, so it added complexity)
Wrt Weld, and "Jakarta EE application servers", it was envisioned that the application server could rewrite the bytecode on-the-fly. No idea if it actually happened.Caleb Cushing
10/12/2023, 4:21 PMVampire
10/12/2023, 4:26 PMwould simply be a flaw in weld not allowing it to continue to recognize Javax annotationsNo, a given Weld major version is about a given CDI version. CDI 2 hast javax. CDI 3 has jakarta.
Caleb Cushing
10/12/2023, 4:29 PMCaleb Cushing
10/12/2023, 4:29 PMVampire
10/12/2023, 4:30 PMCaleb Cushing
10/12/2023, 4:31 PMVampire
10/12/2023, 4:31 PMVampire
10/12/2023, 4:32 PMCaleb Cushing
10/12/2023, 4:32 PMCaleb Cushing
10/12/2023, 4:33 PMCaleb Cushing
10/12/2023, 4:33 PMVampire
10/12/2023, 4:33 PMVampire
10/12/2023, 4:34 PMAlso when you're doing a major upgrade you should always pay attention and test everythingIn an optimal worlds, yes. In reality, impossible. And besides that, fail-fast is imho always better than only finding things at runtime.
Vampire
10/12/2023, 4:35 PMCaleb Cushing
10/12/2023, 4:35 PMVampire
10/12/2023, 4:36 PMVampire
10/12/2023, 4:37 PM