How to use correctly Atlassian License Support

Akira Tsuchiya
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.
March 3, 2013

1. A simple JIRA plugin, which only displays a Project Tab Panel, is created.

Refer to the attached screemshot.

2. Atlassian License Support is added to the plugin by using 'atlas-create-jira-plugin-module'.

In this case, upm.license.compatibility.version is 2.8.2.

<upm.license.compatibility.version>2.8.2</upm.license.compatibility.version>

3. Install the .obr file using UPM in the JIRA Administration panel.

At this point, no license key is input in order to test that the plugin does not work.

Refer to the attached screenshot.



4. But unexpectedly, the Project Tab Panel is shown.
It means that the plugin works without any license key.

I want to know how to correctly configure Atlassian License Support.

1 answer

0 votes
codelab expert
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.
March 4, 2013

Please follow this tutorial which will help you to integrate full license support: https://developer.atlassian.com/display/UPM/Tutorial%3A+Adding+Licensing+Support+to+Your+Add-on

Akira Tsuchiya
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.
March 4, 2013

I found what is missing.

In my .obr file, the '/dependencies/plugin-license-storage-plugin-2.4.1.jar' is missing.

I want to know how to include the plugin-license-storage-plugin-2.4.1.jar in my release package.

This step is missing in the Atlassian tutorial page above.

In my case, the command of 'atlas-package' is used, but it is not sufficient.

Joe Clark
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 5, 2013

You are probably missing a configuration element from your pom.xml - have a look at the completed tutorial code and see what you are missing - https://bitbucket.org/atlassian_tutorial/upm-licensing-compatibility/src/36e123f3dffedc72cde843dcffc30331bf807215/pom.xml?at=master

Akira Tsuchiya
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.
March 5, 2013

1. The online tutorial pom.xml does not help.

I guess if '${project.build.outputDirectory}' below is not correctly set,

plugin-license-storage-plugin.jar is not embedded in the .obr file.

<plugin>

<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy-storage-plugin</id>

...
<configuration>
<outputDirectory>${project.build.outputDirectory}</outputDirectory>
<includeArtifactIds>plugin-license-storage-plugin</includeArtifactIds>

The <project.build.outputDirectory> is missing in the <properties> section.

I want to know the value for the attribute.

2. I guess if plugin-license-storage-plugin.jar is missing in the obr file,

ThirdPartyPluginLicenseStorageManager cannot be injected in the Controller class.

Akira Tsuchiya
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.
March 5, 2013

I summarized the steps that lead to a problem.

I want to know the workaround for this issue.

1. Create a JIRA Plugin.

d:\work> atlas-create-jira-plugin

2. Issue the command below for Eclipse compatibility.

D:\work\[artifactId]> atlas-mvn eclipse:eclipse

3. Add the Atlassian License Support to the Plugin.

D:\work\[artifactId]> atlas-create-jira-plugin-module

Select 11 of LicenseServlet.

4. Issue the command below for Eclipse compatibility.

D:\work\[artifactId]> atlas-mvn eclipse:eclipse

5. Create the project of [artifactId] in the Eclipse.

6. Edit the pom.xml as below in the 'maven-dependency-plugin' section.

<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<configuration>
<outputDirectory>target/obr/dependencies</outputDirectory>
<includeArtifactIds>plugin-license-storage-plugin</includeArtifactIds>
<stripVersion>false</stripVersion>
</configuration>
</execution>

7. Create the obr file.

D:\work\[artifactId]> atlas-package

At this time, [artifactId]-1.0.obr is created under the D:\work\[artifactId]\target

The contents of the [artifactId]-1.0.obr are as below.

dependencies/plugin-license-storage-plugin-2.4.1.jar
obr.xml
[artifactId]-1.0.jar

8. Install the obr file into JIRA.

The error below appears.

Caused by: java.lang.ClassNotFoundException:

com.atlassian.upm.license.storage.lib.ThirdPartyPluginLicenseStorageManagerImpl

In the atlassian-plugin.xml, the line below is added.

<component key="thirdPartyPluginLicenseStorageManager" class="com.atlassian.upm.license.storage.lib.ThirdPartyPluginLicenseStorageManagerImpl"/>

It may be that the plugin-license-storage-plugin-2.4.1.jar cannot be accessed from the atlassian-plugin.xml.

Suggest an answer

Log in or Sign up to answer