Cannot include web-resources in my jira-plugin

Hello guys,

I try to include a web-resource in my velocity template to style an input field. Unfortunately nothing happens. These are the methods I tried so far:

$webResourceManager.requireResource(“de.company.jira.test:my-resource”)
This one does literally nothing

$webResourceManager.requireResourcesForContext(“de.company.jira.test”)
Same. Nothing happens

#requireResource(de.company.jira.test:my-resource)
This macro cannot be recognized and will be printed as a string in the html code

When I try to add a general context (atl.general or jira.general) to my web-resource everything breaks. A long javascript code will be printed on my jira site and the styling is completely broken.
I also recreated the plugin to reproduce this issue and it happens everytime…

Here’s my web-resource:
</web-resource>
<web-resource name=“MyResource” i18n-name-key=“my-resource.name” key=“my-resource”>
<description key=“my-resource.description”>The MyResource Plugin</description>
<resource namePattern=“MyRes” type=“download” location="/css/test.css"/>
<context>de.company.jira.test</context>
</web-resource>

Thank you in advance for your answer.

I don’t know if you still need this but this is what I use:

<web-resource key="my-resources" name="My Web Resources">
        <dependency>com.atlassian.auiplugin:ajs</dependency>
        <resource type="download" name="my.js" location="/js/my.js"/>
        <resource type="download" name="my.css" location="/css/my.css"/>
        <resource type="download" name="images/" location="/images"/>
        <context>mycontext</context>
    </web-resource>

in junction with this line on my template:

    $webResourceManager.requireResourcesForContext("mycontext")

I don’t know what namePattern exactly does, but I am using name to define the resource file with “.css” at the end of it where you just have this: