"webResourceManager.requireResource" is not working in Bitbucket

Hello Guys,

We are trying to create a .vm in our plugin and inside this .vm we need to use a .js. We did below:
In atlassian-plugin.xml, we put:

    <web-resource name="Plugin-Development Web Resources" key="resources">
        <resource type="download" name="admin.js" location="js/configs/admin.js"/>

In our admin.js, we only put below:

   AJS.toInit(function($) {
      console.log ("test");

In our .vm (admin.vm), we put the following, so, we can have our .js called there:


But, We didn’t get admin.js launched. Noting that we are doing exactly the same in Confluence and JIra. “webResourceManager.requireResource” is not working in Bitbucket? If not, what is the alternative solution?

Many thanks,

Hi @rosy.salame,

Could you try explicitly adding com.atlassian.plugins.atlassian-plugins-webresource-rest:web-resource-manager as a dependency in your web-resource entry? I think that’s technically also necessary on Jira and Confluence, but something else just pulls that in by default.


1 Like

Hi @tobitheo, thanks a lot :slight_smile: It is working perfectly!


1 Like