Hello,
We have developed a Jira Plugin that works perfectly fine on 2990 Port (Dev Environment ), but when we Upload plugin on JIRA server (Managed apps > Upload app > choose file > select project jar file)Jira Server(8080) port the CSS/JS/Images/Fonts/Icons doesn’t load at all .
We have tried the following workaround.
A) In atlassian-plugin.xml,
CSS as resource type=“download” name=“Test.css” location=“css/Test.css”
JS as resource type=“download” name=“Test.js” location=“js/Test.js”
In VM, we tried all combinations as below
#requireResources(“com.example.plugin.PluginName:PluginResource”)
#requireResourcesForContext(“com.example.plugin.PluginName:PluginResource”)
$webResourceManager.requireResourcesForContext(“com.example.plugin.PluginName:PluginResource”)
$webResourceManager.requireResources(“com.example.plugin.PluginName:PluginResource”)
In Servlet, we have included the below as per the instructions in web resource module
pageBuilderService.assembler().resources().requireWebResource(“example.plugin.helloworld:scriptaculous”);
Context, we have tried both the context
context… jira.general —close context
context… atl.general —close context
We have gone through the below links and followed all the required stuffs in it, when we check in 2990 it works as expected but somehow the plugin doesn’t seem to work on 8080 port.
- Including Javascript and CSS resources
- https://developer.atlassian.com/server/jira/platform/web-resource/
Attached the below snapshots
- atlassian-plugin.xml
resource type=“download” name=“googlefont.css” location=“css/googlefont.css”
resource type=“download” name=“spin.js” location=“js/spin.js”
Project Structure