Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

new plugin accessing a bundled bamboo plugin

dapak January 11, 2013

So for a new plugin that I am working on, I need to be able to access/import the bundled Bamboo brokenbuildtracker plugin functionality. I've tried using compoents and dependencies with varying degrees of no success. Even when I include the bundled plugin to META-INF maven tries to download what I'm talking about to no avail. I'm not even sure I have the package in the right place due to SDK documentation not lining up with newer SDK versions.

Is there a way to import and utilize functions of brokenbuildtracker, like so:

import com.atlassian.bamboo.brokenbuildtracker.data.TrackingEntry;
import com.atlassian.bamboo.brokenbuildtracker.data.TrackingEntryManager;

I'm relatively new to Bamboo plugin development and the plugin development guides aren't too forthcoming on topics of this nature and some aren't accurate for recent versions of the SDK.

3 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Answer accepted
dapak January 11, 2013

I figured it out after google turned up the following articles/answers:

Here's the snipit from my pom.xml:

<dependency>
            <groupId>com.atlassian.bamboo.plugins.brokenbuildtracker</groupId>
            <artifactId>atlassian-bamboo-plugin-brokenbuildtracker</artifactId>
            <version>4.2.1</version>
            <scope>provided</scope>
        </dependency>

Here's the snipit from my atlassian-plugin.xml where part of my problem was importing the brokenbuildtracker with "plugins" in the path, which was incorrect:

<bundle-instructions>
          <Import-Package>
              com.atlassian.bamboo.brokenbuildtracker.*;
              com.atlassian.bamboo.builder.*;
              com.atlassian.templaterenderer.*;
              com.intellij.*;
              com.google.common.collect.*;
              com.opensymphony.webwork.*;
              org.apache.commons.lang.*;
              org.apache.log4j.*;
          </Import-Package>
        </bundle-instructions>

0 votes
dapak January 11, 2013

Updated my atlassian-plugin.xml to this (updated pom to specifically require 4.2.1):

<bundle-instructions>
          <Import-Package>com.atlassian.bamboo.plugins.brokenbuildtracker;version=4.2.1</Import-Package>
        </bundle-instructions>

Still getting a version of that error:

Unable to resolve 57.0: missing requirement [57.0] package; (&(package=com.atlassian.bamboo.plugins.brokenbuildtracker)(version>=4.2.1)).

0 votes
dapak January 11, 2013

I have this in my pom.xml file:

<dependency>
            <groupId>com.atlassian.bamboo.plugins.brokenbuildtracker</groupId>
            <artifactId>atlassian-bamboo-plugin-brokenbuildtracker</artifactId>
            <version>[4.2,)</version>
            <scope>provided</scope>
        </dependency>

This is in my atlassian-plugiin.xml file under plugin-info:

<bundle-instructions>
          <Import-Package>com.atlassian.bamboo.plugins.brokenbuildtracker,*;resolution:=optional</Import-Package>
        </bundle-instructions>

Whenever I try to execute atlas-run this occurs:

2013-01-12 12:02:19,851 ERROR [main] [OsgiPlugin] Detected an error (BundleException) enabling the plugin 'com.domain.derp' : Unresolved constraint in bundle com.domain.derp [57]: Unable to resolve 57.0: missing requirement [57.0] package; (package=com.atlassian.bamboo.brokenbuildtracker).  This error usually occurs when your plugin imports a package from another bundle with a specific version constraint and either the bundle providing that package doesn't meet those version constraints, or there is no bundle available that provides the specified package. For more details on how to fix this, see http://confluence.atlassian.com/x/1xy6D

...of which that link is not helpful as it is defunct.

TAGS
AUG Leaders

Atlassian Community Events