Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

plugin.resource.directories

Pradeep A
Contributor
July 12, 2021

Can anyone tell me more about this " plugin.resource.directories.". I want to use this to add javascript to my Jira. And i'm unable to find it and have no idea about what it is.

2 answers

0 votes
Tommaso Scorteccia March 20, 2022

Hi everyone, I solved it my self the problem with windows by writing the folder in the tomcat setting. Here the procedure:

  1. Open cmd
  2. tomcat8w.exe //ES//JIRASoftware140619081519
  3. Go to Java tab
  4. In the JavaOptioon write (whitout quote) -Dplugin.resource.directories=C:\Program Files\Atlassian\Application Data\JIRA\scripts
  5. Restat Jira service
0 votes
Ram Kumar Aravindakshan _Adaptavist_
Community Champion
July 12, 2021 edited

Hi @Pradeep A,

Have you tried to read through the steps provided in the ScriptRunner Documentation?

In order to set the plugin.resource.directories, you need to open the <JIRA_HOME>/bin/setenv.sh or <JIRA_HOME>/bin/setenv.bat file depending on your OS and add the parameters to the JVM_REQUIRED_ARGS section.

Below is an example of the parameter:-

JVM_REQUIRED_ARGS='-Dplugin.resource.directories=/opt/atlassian/application-data/jira/javascripts -Djava.awt.headless=true -Datlassian.standalone=JIRA -Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true -Dmail.mime.decodeparameters=true -Dorg.dom4j.factory=com.atlassian.core.xml.I nterningDocumentFactory'

You also need to ensure that the javascript folder is created in the path which you are specifying in the setenv file.

Make sure that your Jira instance is down when you modify the file. You will then need to execute the setenv file and restart your Jira instance for the change to take effect.

I hope this helps to solve your question. :)

Thank you and Kind Regards,

Ram

Tommaso Scorteccia March 19, 2022

Hi @Ram Kumar Aravindakshan _Adaptavist_ ,

I'm using the jira server on Windows, I modified the setenv.bat like this:

set JVM_REQUIRED_ARGS=-Dplugin.resource.directories="C:\Program Files\Atlassian\Application Data\JIRA\scripts" 

I put my custom css (custom.css)

I restarted the jira service

but in the scriptrunner have the error: "Could not find custom.css in configured resource directories..." How can I fix it?

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, team '25 europe, atlassian event, barcelona 2025, jira, confluence, atlassian intelligence, rovo, ai-powered collaboration, developer tools, agile teams, digital transformation, teamwork solutions, atlassian conference, product announcements

🌆 Team '25 Europe registration is now open!

Join the largest European gathering of the Atlassian Community and reimagine what’s possible when great teams and transformative technology come together. Plus, grab your Super Fan ticket now and save over €1,000 on your pass before prices rise on 3 June.

Register now
AUG Leaders

Atlassian Community Events