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)
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.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.