Hello,
Try as I might I cannot get my plugin’s web-item in the sidebar of the Repository context to display the specified icon. I’ve scoured the developer community, stack overflow, the source code … nothing I try works.
My atlassian-plugin.xml looks like this
<?xml version="1.0" encoding="UTF-8"?>
<atlassian-plugin key="${atlassian.plugin.key}" name="${project.name}" plugins-version="2">
<plugin-info>
<description>My plugin</description>
<version>${project.version}</version>
<vendor name="${project.organization.name}" url="${project.organization.url}" />
<param name="plugin-icon">images/logo-16.png</param>
</plugin-info>
<resource type="i18n" name="i18n" location="bitbucket-plugin"/>
<web-resource
key="bitbucket-plugin-resources"
name="Web Resources"
i18n="bitbucket-plugin-resources.name"
>
<dependency>com.atlassian.auiplugin:ajs</dependency>
<resource type="soy" name="soyui" location="/templates/servlets.soy"/>
<resource type="download" name="images/" location="/images"/>
<context>bitbucket-plugin</context>
</web-resource>
<servlet
key="plugin-servlet"
name="Plugin Servlet"
i18n-name-key="plugin-servlet.name"
class="com.mycompany.servlet.PluginServlet"
>
<url-pattern>/myplugin/*</url-pattern>
</servlet>
<web-item
key="repo-plugin-web-item"
name="Repository Plugin Web Item"
i18n-name-key="repo-plugin-web-item.name"
section="bitbucket.web.repository.header.buttons"
weight="1000"
>
<label key="repo-plugin-web-item.label">MyPlugin</label>
<icon height="16" width="16">
<link linkId="repo-plugin-web-item.icon">/download/resources/com.mycompany.bitbucket-plugin:bitbucket-plugin-resources/images/logo-16.png</link>
</icon>
<link linkId="repo-plugin-web-item.link">/plugins/servlet/myplugin/repo/$repository.id/</link>
</web-item>
</atlassian-plugin>
I’ve tried any number of url permutations:
${baseUrl}/download/resources/com.mycompany.bitbucket-plugin:bitbucket-plugin-resources/images/logo-16.png
/download/resources/${atlassian.plugin.key}:bitbucket-plugin-resources/images/logo-16.png
/images/logo-16.png
Nothing works. I always get the aui-dialog close icon instead (no idea why - seems a strange default). However if I manually enter the full url (as shown in the atlassian-plugin.xml file above) into my browser, the icon is displayed! What gives?
Any ideas?
Many thanks in advance…