Hello,
I manage a version upgrade from Jira 7 to Jira 8.2. I’m working on upgrading existing JIRA plugin written in the company.
In the atlassian-plugin.xml file, there are many atlassian conditions classes used :
<condition class="com.atlassian.jira.plugin.webfragment.conditions.IsIssueEditableCondition" />
<condition class="com.atlassian.jira.plugin.webfragment.conditions.SubTasksEnabledCondition" />
<condition class="com.atlassian.jira.plugin.webfragment.conditions.IsSubTaskCondition" invert="true" />
<condition class="com.atlassian.jira.plugin.webfragment.conditions.HasProjectPermissionCondition">
<param name="permission">create</param>
</condition>
<condition class="com.atlassian.jira.plugin.webfragment.conditions.HasSubTasksAvailableCondition" />
These classes are contained in the jira-core library.
First, I added in the POM file :
<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>
In the atlassian maven repository, I found the version :
https://packages.atlassian.com/mvn/maven-external/com/atlassian/jira/jira-core/8.2.3/
Second, still in POM, in the Import-Package section of jira-maven-plugin, I added :
<Import-Package>
*;version="0";resolution:=optional
</Import-Package>
Third, in the atlassian-plugin.xml file, in the plugin-info section, I added :
<bundle-instructions>
<Import-Package>com.atlassian.jira.plugin.webfragment.conditions,*</Import-Package>
</bundle-instructions>
When I deploy the plugin into JIRA 8.2 instance, I get stacktrace exception :
2019-07-03 17:52:42,892 JIRA-Bootstrap There was an error loading the descriptor 'View Issue Ops Bar Create Subtask Link' of plugin 'fr.icdc.dei.dn1.DarwinPlugin'. Disabling.
java.lang.RuntimeException: Unable to enable web fragment
....
Caused by: com.atlassian.plugin.PluginParseException: Unable to load the module's display conditions: Could not load 'com.atlassian.jira.plugin.webfragment.conditions.IsIssueEditableCondition' in plugin fr.icdc.dei.dn1.DarwinPlugin
....
Caused by: com.atlassian.plugin.web.conditions.ConditionLoadingException: Could not load 'com.atlassian.jira.plugin.webfragment.conditions.IsIssueEditableCondition' in plugin fr.icdc.dei.dn1.DarwinPlugin
....
Caused by: java.lang.ClassNotFoundException: com.atlassian.jira.plugin.webfragment.conditions.IsIssueEditableCondition not found by fr.icdc.dei.dn1.DarwinPlugin [195]
I don’t find the jira-core library in the server instance directories.
How can I fix this problem ?
Thanks in advance for your help.