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

stash-page-objects version included with Stash 4.14.5

Dennis Vysotskiy June 1, 2017

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

0 votes
Bryan Turner
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 2, 2017

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
TAGS
AUG Leaders

Atlassian Community Events