Upgrading from 4.1.1 to latest: problems with User class in custom plugins

Francesco R
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 15, 2017

I'm upgrading from Jira 4.1.1 to latest version.
I'm doing my first step modifying the source code of our custom plugins but I'm not able to get rid of the "deprecated" warning about the User class.

If I did no misunderstanding, I'm using the SDK 6.2.8 and in my my pom.xml I've the dependencies from jira-api-4.4.5 and jira-core-4.4.5.jar
So I modified the deprecated com.opensymphony.user.User to the new com.atlassian.crowd.embedded.api.User but, when I'm going to check classes extending  AbstractJiraCondition I have the shouldDisplay method still using deprecated com.opensymphony.user.User as described here in docs

Where am I wrong ? Am I missing something ?

Thanks for replying

1 answer

0 votes
Aleksandr Zuevich
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 15, 2017

Hi,

I suppose you should update your jira-api and -core dependencies at your pom.xml to the latest.

Francesco R
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 18, 2017

But they depends on jira.version tag.

In my pom.xml I have:

<dependency>
<groupId>com.atlassian.jira</groupId>
<artifactId>jira-api</artifactId>
<version>${jira.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.atlassian.jira</groupId>
<artifactId>jira-core</artifactId>
<version>${jira.version}</version>
<scope>provided</scope>
</dependency>

And in jira.version tag I set:

<jira.version>4.4.5</jira.version>

that is the version through which I'm trying to rebuild the old plugins.

I got the pom.xml executing atlas-create-jira-plugin

Suggest an answer

Log in or Sign up to answer