How to incluede Custom JavaScript into Confluence Plugin


I know this question has been asked several times... but I get nightmares already, i can't get my javascript in my Plugin. Here is resources definition in my atlassian-plugin.xml:

<web-resource key="skilldatenbank.resources" name="Skilldatenbank Plugin Web Resources" >
        <resource type="download" name="confluence-skilldatenbank-plugin.css" location="/css/confluence-skilldatenbank-plugin.css" >
            <property key="content-type" value="text/css" />
        <resource type="download" name="confluence-skilldatenbank-plugin.js" location="/js/confluence-skilldatenbank-plugin.js" >
            <property key="content-type" value="text/javascript"/>
        <resource type="download" name="images/" location="/images"/>


and so i try to reference this resources in my .vm page.


but there are neither javacsript nor styles in my page...

what is even more strange, it is not a self-defining <script> rendered in the template...

        &lt;script type="text/javascript"&gt;

            function fnSendAssessment(arg) {


if i start my "plugin" with: atlas-debug it does't work.

Please HELP!!! :-)

2 answers

1 accepted

What is your groupID and your artefactID in your pom.xml and the atlassian-plugin-key in atlassian-plugin.xml?

Maybe "de.twt.confluence.plugins:skilldatenbank.resources" is wrong.




&lt;atlassian-plugin key="${project.groupId}.${project.artifactId}" name="${}" plugins-version="2"&gt;

        &lt;vendor name="${}" url="${project.organization.url}" /&gt;
        &lt;param name="plugin-icon"&gt;images/pluginIcon.png&lt;/param&gt;
        &lt;param name="plugin-logo"&gt;images/pluginLogo.png&lt;/param&gt;



Thanks, I'll try that out. Whether you know why javascript is not displayed on the page... i have included javascript in the VM Page at the header section, but it doesn't work!

&lt;script type="text/javascript"&gt;

            function fnSendAssessment(arg) {

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Apr 13, 2018 in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

364 views 20 10
Join discussion

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