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

Bamboo building a jira-plugin which depends on an other plugin

trouff September 17, 2015

Hi folks!

For several hours I try to build my JIRA-plugin which in depending on public classes of an other plugin developed by me with bamboo. But I am not able to get it to work.

On my local computer, where I am able to succesfully build the plugin, I installed the other plugin locally by using this command:

atlas-mvn install:install-file -Dfile=... -DgroupId=... -DartifactId=... -Dpackaging=...

in the pom.xml the dependency is declared as:

<dependency>

            <groupId>[groupId]</groupId>

            <artifactId>[artifactId]</artifactId>

            <scope>provided</scope>

            <version>1.0.1</version>

 </dependency>

and later:

<build>

        <plugins>

            <plugin>

                    [...]

                     <instructions>

                         <DynamicImport-Package>

                             com.easesolutions.pmo.services;version="1.0.1"

                         </DynamicImport-Package>

                     </instructions>

The scope is given as provided, because the usage of the plugin shall not be mandatorial, which works like a charm locally.

But on the bamboo build server I get the following error message:

ould not resolve dependencies for project [Project-Name]: Could not find artifact [plugin-name] in atlassian-public (https://maven.atlassian.com/repository/public) -> [Help 1]

Does anybody have any suggestions?

Thanks a lot!

Regards trouff

Edit:

The solution:

I solved my problem. It is maybe not the prettiest solution, but it works for now:

On bamboo now I am doing the same, what I have done before on my local pc. I even tried it before, but a mispelling of a package name was the problem.

So the building works like this:

In the tasks of the stage, where the build is executed I add two tasks:

  1. I make an artifact download of an artifact of the plugin on which my plugin depends.
  2. I add an second script-task, which is used to install the plugin on the build server:
    1. atlas-mvn install:install-file -Dfile="[...]" -Dversion=[...] -DartifactId=[...] -DgroupId=[...] -Dpackaging=jar
    2. this step is not that nice, because i need to specify the complete name of the package to install here, which will chane if the other plugin will be updated. So here it would be nice to be more flexible. Any suggestions?

And thats it. Now my plugin will be built correctly!

Any further tips, critics and suggestions are welcome.

 

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Mike Friedrich
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.
September 17, 2015

I might be wrong, but I dont think the scope "provided" makes it optional. You might want to check the generated manifests and other meta data of your compiled plugin.

TAGS
AUG Leaders

Atlassian Community Events