[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [jakartaee-platform-dev] [External] : Re: Dependencies on both javax- and jakarta-versions of Spec APIs
|
On 11/29/21 10:37 AM, Jean-Louis Monteiro wrote:
Yes it should work with the javax version
It's worth to mention it depends on the particular compatible
implementation as well. If the one for jakarta namespace is able to
handle javax APIs, if there are only API dependencies or if
implementations in use do not collide with each other similar way (be it
maven coordinates or package names), then there should be no problem.
thanks,
--lukas
--
Jean-Louis Monteiro
http://twitter.com/jlouismonteiro
<https://urldefense.com/v3/__http://twitter.com/jlouismonteiro__;!!ACWV5N9M2RV99hQ!aUba0E2GPe8Mp7hPmOhtSnb9NElHlkvoSTCgq5MZWP7TsSTtaINeH6Qo_ZIZpzS4Mgs$>
http://www.tomitribe.com
<https://urldefense.com/v3/__http://www.tomitribe.com/__;!!ACWV5N9M2RV99hQ!aUba0E2GPe8Mp7hPmOhtSnb9NElHlkvoSTCgq5MZWP7TsSTtaINeH6Qo_ZIZxY4o1K8$>
On Wed, Nov 24, 2021 at 7:35 PM Ivar Grimstad
<ivar.grimstad@xxxxxxxxxxxxxxxxxxxxxx
<mailto:ivar.grimstad@xxxxxxxxxxxxxxxxxxxxxx>> wrote:
Since Maven picks the higher version of two dependencies with
identical groupId/artifactId, there is an issue for projects that
need to reference both the javax- and jakarta-versions of the same
API. Jakarta Messaging was put forward as an example.
With the following two dependencies in the pom.xml,
<!-- Jakarta EE 8 version -->
<dependency>
* <groupId>jakarta.jms</groupId>
<artifactId>jakarta.jms-api</artifactId>
* <version>*2.0.1*</version>
</dependency>
<!-- Jakarta EE 9 version -->
<dependency>
* <groupId>jakarta.jms</groupId>
<artifactId>jakarta.jms-api</artifactId>
* <version>*3.0.0*</version>
</dependency>
Version *3.0.0* will win, and only the jakarta-namespace version can
be used in the code.
We discussed the possibility of re-releasing the "Jakarta EE 8
version", the one on the javax-namespace under new
groupId/artifactId combination, or with a classifier that makes it
unique.
After the call, I came to think of another solution to avoid the
entire re-release.
Since the Java EE 8 and Jakarta EE 8 versions are identical,
wouldn't it also be possible to go around this problem by using the
Java EE 8 versions of the javax- version of the dependency?
Like this:
<!-- Java EE 8 version -->
<dependency>
* <groupId>javax.jms</groupId>
<artifactId>javax.jms-api</artifactId>
* <version>2.0.1</version>
</dependency>
<!-- Jakarta EE 9 version -->
<dependency>
* <groupId>jakarta.jms</groupId>
<artifactId>jakarta.jms-api</artifactId>
* <version>3.0.0</version>
</dependency>
Just a thought...
Ivar
--
Ivar Grimstad
Jakarta EE Developer Advocate | *Eclipse Foundation *Eclipse
Foundation
<https://urldefense.com/v3/__https://www.eclipse.org/__;!!ACWV5N9M2RV99hQ!aUba0E2GPe8Mp7hPmOhtSnb9NElHlkvoSTCgq5MZWP7TsSTtaINeH6Qo_ZIZH40y944$>-
Community. Code. Collaboration.
_______________________________________________
jakartaee-platform-dev mailing list
jakartaee-platform-dev@xxxxxxxxxxx
<mailto:jakartaee-platform-dev@xxxxxxxxxxx>
To unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/jakartaee-platform-dev
<https://urldefense.com/v3/__https://www.eclipse.org/mailman/listinfo/jakartaee-platform-dev__;!!ACWV5N9M2RV99hQ!aUba0E2GPe8Mp7hPmOhtSnb9NElHlkvoSTCgq5MZWP7TsSTtaINeH6Qo_ZIZ_nxZ7_w$>
_______________________________________________
jakartaee-platform-dev mailing list
jakartaee-platform-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://urldefense.com/v3/__https://www.eclipse.org/mailman/listinfo/jakartaee-platform-dev__;!!ACWV5N9M2RV99hQ!aUba0E2GPe8Mp7hPmOhtSnb9NElHlkvoSTCgq5MZWP7TsSTtaINeH6Qo_ZIZ_nxZ7_w$