Is there a simple way to port plugin to Jira 8? I have a plugin created with the CLI tool that shows version 7.13.0 in the POM file. My production server is 8.x. I cannot use my plugin because of the API incompatibility in SearchResult.getIssues vs getResults. So I wanted to move to 8 but don’t know how to do that. Is there a clear description of the process? I understand that I need to change the versions in POM. But how and to what? Is there a sample POM file I can use?
The steps are:
- Upgrade the API version: Upgrade the API version to match the Jira version you want.
The two main dependencies you need to upgrade arejira-api
andjira-core
.
Ex: If you want to upgrade your plugin for Jira 8.0.0, so your dependency should look like this:
<dependencies>
<dependency>
<groupId>com.atlassian.jira</groupId>
<artifactId>jira-api</artifactId>
<version>8.0.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.atlassian.jira</groupId>
<artifactId>jira-core</artifactId>
<version>8.0.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
-
Fix the breaking java code: After upgrading your API version, in your case, you will not be able to compile your code anymore because of the
SearchResult.getIssues
andSearchResult.getResults
.
So you need to go to the place where you have the dead code and fix them by using the alternative one. -
Once you are done with fixing your code. You can make new jar by
mvn package
and install it in Jira 8.0.0.
Note: The new jar (with the API version 8.0.0) might only compatible with Jira 8.0.0, and incompatible with Jira 7.13.0. So you have to use 2 different jar files for two Jira versions.
Thanks a lot. An outstanding answer