Hi
I’ve been trying to prepare my Data Center app for Platform 7 and followed the documentation that says we need to migrate from javax
to jakarta
.
You can check everything I’ve tried in detail :
So my questions are:
- Is Jakarta actually supported in Platform 7 apps at this stage?
- We tested Jira versions 10.3.4 and 10.5.0, and found that Jira internally uses
javax
.
- As far as I know,
javax
and jakarta
cannot be used together.
- In that case, doesn’t it mean that Jakarta cannot be used on Platform 7?
- When exactly can we start using Jakarta?
- Am I misunderstanding the migration process?
Any clarification would be really appreciated!
Thanks.
From what I understand, it’s only a matter of updating the pom.xml with jakarta instead of javax. Updating the code with the new namespace will come later.
See Bitbucket
Did you try it out? Did it work for you? It’s not working on my end.
Thanks for apply.
As you suggested, I replaced javax
with jakarta
in the add-on’s pom.xml
.
The issue is that the add-on doesn’t work because Jira internally uses javax
.
It worked for me after using the platform 7 dependencies and replacing javax by jakarta in the pom.xml.
Add
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.atlassian.platform.dependencies</groupId>
<artifactId>platform-public-api</artifactId>
<version>${platform.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
Replace
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
<version>1.1.1</version>
<scope>provided</scope>
</dependency>
by
<dependency>
<groupId>jakarta.ws.rs</groupId>
<artifactId>jakarta.ws.rs-api</artifactId>
<scope>provided</scope>
</dependency>
Could you tell me which version of the platform you used?
7.3.3 for now with Java 17
Hmm… But I’m wondering, do we only change the dependencies in the pom.xml
? Because in the actual Java code, it seems like the imported libraries are still referring to ones that start with javax
. Am I missing something?
Changing imports will be needed when upgrading to Platform 9 only:
See UPGRADE_9_0_0.md