This page describes how you can use Backbone's Java API in your existing Jira app. It assumes that you're managing your dependencies with maven.
Access to the K15t repository
First add the K15t Maven repository to your project or Maven settings:
<repositories> <repository> <id>k15t</id> <url>https://nexus.k15t.com/content/repositories/releases</url> </repository> </repositories>
Define the dependency
Then add a dependency to the
pom.xml of your project:
<dependencies> ... <dependency> <groupId>com.k15t.backbone</groupId> <artifactId>backbone-public-api</artifactId> <version>4.0.1</version> <scope>provided</scope> </dependency> ... </dependencies>
Finally, add the following OSGi imports to the
maven-jira-plugin configuration in your
<plugin> <groupId>com.atlassian.maven.plugins</groupId> <artifactId>maven-jira-plugin</artifactId> <configuration> ... <instructions> <Import-Package> com.k15t.backbone.cfm.api.*;version="[4.0.0,5.0.0)", ... </Import-Package> <Export-Package> com.your.own.field.mapping.package.* </Export-Package> ... </instructions> ... </configuration> </plugin>
The version range
[4.0.0,5.0.0) declares your plugin is compatible with all versions of the Java API starting from version 4.0.0, to - but not including - 5.0.0.
New major versions of the API might include breaking changes, so you'll probably need to adapt your source code. Don't assume your code will work out of the box with the next major version of the API.
When declaring the version range:
- Use the version of the maven dependency as the lower bound
- Use the next major version as the excluded upper bound
Your implemented field mapping classes need to be accessible by Backbone. Therefore, you should list all packages in the