resource files and plugin

In my search request view plugin I have a velocity template that has a reference to an xslt file i wrote, I'd like my plugin to install this xslt file automatically (ideally in "http://myserver:2990/jira/styles/)

I've tried adding a resource in atlassian-pugin.xml but I can't figure out which url to use to reference the xslt file.

2 answers

1 accepted

This widget could not be displayed.


<web-resource key="xslt-resources" name="Xslt Web Resources">
    <resource type="download" name="test.xslt" location="/xslt/test.xslt"/>

vm file:

<?xml version="1.0" encoding="UTF-8"?>

<?xml-stylesheet href="$webResourceManager.getStaticPluginResource("com.myplugin:xslt-resources","test.xslt")" type="text/xsl"?>


This widget could not be displayed.

You can take a look at

You can add param <param name="batch"value="false"/> and then refer to the resource using the url pattern given in the documentation:


Can I use the resource from the velocity template this way?

Yes, you can. I can provide you with some sample code for atlassian-plugin.xml and the vm file if you give me an example of what you want to achieve exactly.

Here is my velocity template (A modified version of the standard view issues xml) , I would like to have my xslt file instead of MYSTYLESHEET,

<?xml version="1.0" encoding="UTF-8"?>

<?xml-stylesheet href="MYSTYLESHEET" type="text/xsl"?>

<rss version="0.92">



## Ensure we have no spaces around the link tag and its value. JRA-16175



#if ($rssLocale)



#if ($totalissue)

<issue start="$!{startissue}" end="$!{endissue}" total="$!{totalissue}"/>







this is the configuration in atlassian-plugin.xml

<web-resource name="xslt" i18n-name-key="" key="xslt">

<description key="xslt.description">.xslt resources for search request plugins</description>

<resource name="GroupByCategoriesEdt" type="download" location="xslt/GroupByCategoriesEdt.xslt">

<param name="batch" value="false"/>


<resource name="GroupByDeveloppeur" type="download" location="xslt/GroupByDeveloppeur.xslt">

<param name="batch" value="false"/>



I tried with <?xml-stylesheet href="$webResourceManager.requireResource("xslt:GroupByDeveloppeur")" type="text/xsl"?> but It doesent seem to work, in the console it tells me "Cannot find we resource module for: xslt:GroupeByDeveloppeur"

Thanks for your help

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Aug 22, 2018 in Marketplace Apps

How a Marketplace app tech team is achieving gender diversity

Hello! My name is Genevieve Blanch, and I'm the Marketing Manager at RefinedWiki, creators of apps to give teams the tools to customize Atlassian platforms. Currently, 44% of the tech team at Re...

506 views 3 18
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