I'm in the process of upgrading a custom plugin we created in order to move into jira 7. The plugin is currently in jira 6.4 and using some now deprecated code, example WebResourceManager.
The whole web resources management process is detailed in the documentation here: https://developer.atlassian.com/jiradev/jira-platform/building-jira-add-ons/jira-plugins2-overview/jira-plugin-module-types/web-resource-plugin-module
If your resources needs to be loaded from a velocity template, the webresourcesmanager seems to be the currently recommended solution. From within a servlet you might want to use PageBuilderService as explained in the above mentioned page.
I also advise you to set a specific context for your resources to avoid loading resources which are not needed in certain modules!
Hope this helps!
Thank you for the assistance. I found a reference that used the PageBuilderService.assembler().resources().requireWebResource().
Micky - great point.
I found this:
The tutorial focuses on Jira 7. This is a basic, but great tutorial that walks through Webwork, REST, and JS files, something we all need these days. It even goes through some basic testing setups.
I was able to create a web-item that lives in the system.top.navigation.bar section, and references the webwork that contains the actions for the input and post velocity pages. Finally I have the web-resource holding the JS file and it launches with the correct pages.
I think the biggest issue was understanding the web-resources and how they work together. I still need to set up dependencies to clean up the code a bit, but I'm getting there.
Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...
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!
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