stash-page-objects version included with Stash 4.14.5

Good time of the day. 

I have created a plugin for Stash that fails to initialize in 4.14.5 build with unsatisfied dependency error message. Of course, locally I do not have the same problem but I also run the latest Stash version pulled by atlas-create-stash-plugin command. The error suggests that the branch package is not included in the provided version of the stash-page-objects. I've removed the code that references branch level events but the add-on failed to initialize again. Is there a specific version I need to target? I'd appreciate any suggestions. 

Version included in my plugin by default: 

com.atlassian.stash:stash-page-objects:jar:3.11.6:provided

Error on add-on initialization: 

Unable to resolve 151.0: missing requirement [151.0] osgi.wiring.package; (osgi.wiring.package=com.atlassian.stash.branch)

1 answer

Dennis,

There is no such thing as Stash 4.14.5. Starting from 4.0.0, the product is Bitbucket Server. I'm not pointing that out to be pedantic; it's important for answering your question.

You cannot use stash-page-objects with Bitbucket Server. You can only use them with Stash. In 4.0 the entire API was moved from com.atlassian.stash packages to com.atlassian.bitbucket.

The correct dependency is com.atlassian.bitbucket.server:bitbucket-page-objects:jar:4.14.5:test. If you have dependencies on, for example, bitbucket-api, you'll want to use the same version for bitbucket-page-objects as you used for those, so that everything references a consistent version of Bitbucket Server.

Note that my artifact locator is scope "test", not scope "provided". Bitbucket Server does not "provide" bitbucket-page-objects for plugins at runtime. (And Stash did not "provide" stash-page-objects.) Page objects are used to facilitate building browser-based integration tests using Selenium. They should never exist in a "production" Maven scope (e.g. "compile", "runtime" or "provided"). They should always be in "test" scope.

Best regards,
Bryan Turner
Atlassian Bitbucket

Edit: A small edit to expand a little on this. You can't use any dependencies from the "com.atlassian.stash" group ID with Bitbucket Server 4.0.0 or newer. In case you haven't seen it, our How to update your add-on page might be helpful if you need more information.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 06, 2018 in Bitbucket

Upgrade Best Practices

Hello! My name is Mark Askew and I am a Premier Support Engineer for products Bitbucket Server/Data Center, Fisheye & Crucible. Today, I want to bring the discussion that Jennifer, Matt, and ...

413 views 5 9
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you