Hi,
I have a jira plugin, worked on Jira 9.X.X
Tried to make it compatable for Jira 10.X.X with no luck.
The app have no API, there is only 1 Java file that is a custom condition
extends AbstractWebCondition
the rest are all JS files
when trying to install the plugin in Jira getting this error in logs:
com.atlassian.plugin.osgi.container.OsgiContainerException: Cannot start plugin: com.company.jira.myPlugin
at com.atlassian.plugin.osgi.factory.OsgiPlugin.enableInternal(OsgiPlugin.java:423)
at com.atlassian.plugin.impl.AbstractPlugin.enable(AbstractPlugin.java:260)
...
Caused by: org.osgi.framework.BundleException: Unable to resolve com.company.jira.myPlugin [261](R 261.0): missing requirement [com.company.jira.myPlugin [261](R 261.0)] osgi.wiring.package; (osgi.wiring.package=org.python.util) Unresolved requirements: [[com.company.jira.myPlugin [261](R 261.0)] osgi.wiring.package; (osgi.wiring.package=org.python.util)]
...
...
this is my pom:
<dependencies>
<!--suppress VulnerableLibrariesLocal -->
<dependency>
<groupId>com.atlassian.jira</groupId>
<artifactId>jira-api</artifactId>
<version>${jira.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.atlassian.plugin</groupId>
<artifactId>atlassian-spring-scanner-annotation</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>jakarta.inject</groupId>
<artifactId>jakarta.inject-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.atlassian.velocity.htmlsafe</groupId>
<artifactId>velocity-htmlsafe</artifactId>
<version>5.0.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
<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>
<build>
<plugins>
<plugin>
<groupId>com.atlassian.maven.plugins</groupId>
<artifactId>jira-maven-plugin</artifactId>
<version>${amps.version}</version>
<extensions>true</extensions>
<configuration>
<productVersion>${jira.version}</productVersion>
<productDataVersion>${jira.version}</productDataVersion>
<enableQuickReload>true</enableQuickReload>
<!-- See here for an explanation of default instructions: -->
<!-- https://developer.atlassian.com/docs/advanced-topics/configuration-of-instructions-in-atlassian-plugins -->
<instructions>
<Atlassian-Plugin-Key>${atlassian.plugin.key}</Atlassian-Plugin-Key>
<!-- Add package to export here -->
<Export-Package>com.company.jira.myPlugin.api,</Export-Package>
<!-- Add package import here -->
<Import-Package>
org.python.util,
org.jspecify.annotations,
*
</Import-Package>
<!-- Ensure plugin is spring powered -->
<Spring-Context>*</Spring-Context>
</instructions>
</configuration>
</plugin>
<plugin>
<groupId>com.atlassian.plugin</groupId>
<artifactId>atlassian-spring-scanner-maven-plugin</artifactId>
<version>${atlassian.spring.scanner.version}</version>
<executions>
<execution>
<goals>
<goal>atlassian-spring-scanner</goal>
</goals>
<phase>process-classes</phase>
</execution>
</executions>
<configuration>
<scannedDependencies>
<dependency>
<groupId>com.atlassian.plugin</groupId>
<artifactId>atlassian-spring-scanner-external-jar</artifactId>
</dependency>
</scannedDependencies>
<verbose>false</verbose>
</configuration>
</plugin>
</plugins>
</build>
<properties>
<jira.version>10.3.0</jira.version>
<amps.version>9.1.1</amps.version>
<platform.version>7.2.4</platform.version>
<plugin.testrunner.version>2.0.9</plugin.testrunner.version>
<!-- This key is used to keep the consistency between the key in atlassian-plugin.xml and the key to generate bundle. -->
<atlassian.plugin.key>${project.groupId}.${project.artifactId}</atlassian.plugin.key>
<!-- TestKit version 6.x for JIRA 6.x -->
<testkit.version>6.3.11</testkit.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
Can anyone please point me to what is wrong?
what am i missing?
Thanks.