Can't install OBR plugin bundle into jira

Juergen Krieger
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.
May 19, 2015

While trying to bundle plugins into OBR i have troubles installing it.

 

I get following error:

Plugin installation failed: Failed to resolve plugin dependencies within OBR.

 

And by now I ran out of ideas where there could be a problem.

Any advice?

 

additional:

when i install the support-jira.jar out of the OBR package I can install the plugin, but cannot enable it.

After I further install the helloworld.jar plugin, this plugin installs and start.

Followed by this installation i can then enable the support-jira plugin.

 

 

After adding another import-package block into the pom.xml:

<Import-Package>
com.xxx.jira.test.helloworld*;version="${plugin.helloworld.version}"
</Import-Package>

(yeap, just the asterisk is different)

 

The obr bundle is install-able, but it does not register any eventlisteners on the bundled plug-ins

 

 

Informations about my test setup:

trying to install it on JIRA 6.2.7 running on ubuntu 14.04 LTS

 

pom.xml

 

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.xxx.jira.bundle</groupId>
<artifactId>support-jira</artifactId>
<version>0.0.1</version>
<properties>
<java.version>1.7</java.version>
<jira.version>6.2.7</jira.version>
<amps.version>5.0.13</amps.version>
<plugin.testrunner.version>1.2.3</plugin.testrunner.version>
<testkit.version>5.2.26</testkit.version>
<maven.compiler-plugin.version>3.3</maven.compiler-plugin.version>
<!-- BEGIN OBR versioning -->
<!-- version of included plugins -->
<plugin.helloworld.version>0.0.1</plugin.helloworld.version>
<!-- BEGIN OBR versioning -->
</properties>

<organization>
<name>example</name>
<url>http://www.example.com/</url>
</organization>
<name>Bundle: support-jira</name>
<description>This is the :support-jira plugin bundle for Support JIRA.
Including (future):
* validation
* customfields
* customer LDAP sync
* JQL functions
</description>
<packaging>atlassian-plugin</packaging>
<dependencies>
<dependency>
<groupId>com.atlassian.jira</groupId>
<artifactId>jira-api</artifactId>
<version>${jira.version}</version>
<scope>provided</scope>
</dependency>
<!-- BEGIN OBR dependency -->
<dependency>
<groupId>com.xxx.jira.test</groupId>
<artifactId>helloworld</artifactId>
<version>${plugin.helloworld.version}</version>
<scope>provided</scope>
</dependency>
<!-- END OBR dependency -->
</dependencies>
<build>
<plugins>
<plugin>
<groupId>com.atlassian.maven.plugins</groupId>
<artifactId>maven-jira-plugin</artifactId>
<version>${amps.version}</version>
<extensions>true</extensions>
<configuration>
<productVersion>${jira.version}</productVersion>
<productDataVersion>${jira.version}</productDataVersion> 
<!-- BEGIN now we have an OBR \o/ -->
<instructions>

<Import-Package>
com.xxx.jira.test.helloworld;version="${plugin.helloworld.version}"
</Import-Package>
<CONF_COMM/>
</instructions>
<pluginDependencies>
<pluginDependency>
<groupId>com.xxx.jira.test</groupId>
<artifactId>helloworld</artifactId>
</pluginDependency> 
</pluginDependencies>
<!-- END now we have an OBR \o/ -->
</configuration>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
<version>${maven.compiler-plugin.version}</version>
</plugin>
</plugins>
</build>
</project>

 

obr.xml

<repository lastmodified='20150520094513.830'>
<resource id='com.xxx.jira.bundle.support-jira/0.0.1' symbolicname='com.xxx.jira.bundle.support-jira' presentationname='Bundle: support-jira' uri='support-jira-0.0.1.jar' version='0.0.1'>
<description>This is the :support-jira plugin bundle for Support JIRA. Including (future): * validation * customfields * customer LDAP sync * JQL functions</description>
<size>11158</size>
<documentation>http://www.dynatrace.com/</documentation>
<capability name='bundle'>
<p n='symbolicname' v='com.xxx.jira.bundle.support-jira'/>
<p n='presentationname' v='Bundle: support-jira'/>
<p n='version' t='version' v='0.0.1'/>
<p n='manifestversion' v='2'/>
</capability>
<require name='package' filter='(&(package=com.dynatrace.jira.test.helloworld)(version>=0.0.1))' extend='false' multiple='false' optional='false'>Import package com.xxx.jira.test.helloworld;version=0.0.1</require>
</resource>
</repository>

 

contents of obr:

obrFileContents.jpg

in dependencies is the helloworld-0.0.1.jar

10 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Juergen Krieger
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.
May 27, 2015

Seems, I can't bundle multiple plugins into one. (Well, as soon as one needs something like an event listener)

At least, not without specifying a parent in the plugins inside.

Which would be troublesome because those plugins get used in different bundles.

 

Exporting functionality spread over multiple plugins, works fine though.

0 votes
Juergen Krieger
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.
May 22, 2015

Thank you for advices, I will try some different configurations on tuesday and post the outcome.

0 votes
Dmitry_Zharikhin May 22, 2015

I see in logs env.ARG_=--debug Private-Package=com.dynatrace.jira.bundle,com.dynatrace.jira.mods.customfields.fieldtype.definitions,com.dynatrace.jira.mods.customfields.fieldtype,com.dynatrace.jira.mods.customfields,com.dynatrace.jira.mods.ldap,com.dynatrace.jira.mods.ldap.config,com.dynatrace.jira.mods.properties,com.dynatrace.jira.plugin.customerldapsync,<b>com.dynatrace.jira.test.helloworld</b>,com.sun.jndi.ldap,com.sun.jndi.url.ldap That means com.dynatrace.jira.test.helloworld is not exported So I think, you'd rather focus on export, than on import

0 votes
Juergen Krieger
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.
May 21, 2015

atlas-mvn package --debug looks fine imo. http://pastebin.com/ngqcFfPP

0 votes
Dmitry_Zharikhin May 21, 2015

Here should be written packages to import/export. But its'not. That means there are some issues in obr build process. you might see anything strange in maven build logs(run in debug mode)

0 votes
Juergen Krieger
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.
May 20, 2015

META-INF/MANIFEST.MF (support-jira container) Manifest-Version: 1.0 Archiver-Version: Plexus Archiver Created-By: Apache Maven Built-By: cwat-jkrieger Build-Jdk: 1.7.0_79 META-INF/MANIFEST.MF (helloworld plugin) Manifest-Version: 1.0 Archiver-Version: Plexus Archiver Created-By: Apache Maven Built-By: cwat-jkrieger Build-Jdk: 1.7.0_79 Atlassian-Build-Date: 2015-05-20T09:37:57+0200

0 votes
Dmitry_Zharikhin May 20, 2015

Could you please provide META-INF/MANIFEST.MF from each plugin

0 votes
Juergen Krieger
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.
May 20, 2015

main reason is that we have different jira instances running not all of them need all the plugins. So every instance gets its own bundle

0 votes
Juergen Krieger
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.
May 20, 2015

it is a bundle of own plugin, of which every one is working fine. Errors: * Plugin installation failed: Failed to resolve plugin dependencies within OBR. when not importing * of that package *no error when adding all. But eventlisteners get not registered * timeout at enabling but no error when using Export-Package

0 votes
Timothy
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.
May 20, 2015

Are you creating your own add on? What is the error in the log?

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events