In Jira, is it possible to have custom (e.g. groovy script class listeners) classes be outside the jira classpath (web-inf/classes)?

Sri Kanth February 27, 2014

I developed a custom groovy listener class and now my admin wants me to deploy it outside the jira classpath so that jira upgrade becomes easy. I can deploy the class in the classpath as @jamie echlindescribes in his groovy script listener doc and got it working. Elsewhere (from Jamies comment may 2013) I read it is not possible to deoploy the custom classes outside the classpath. Is there any solution/work around here?

1 answer

1 accepted

0 votes
Answer accepted
EddieW
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 28, 2014

Have you tried specifying an alternate path as the resource directory?

https://jamieechlin.atlassian.net/wiki/display/GRV/Script+Runner#ScriptRunner-Conditions,Validators,Post-Functions

If you would like to separate out your scripts from jira, as of 2.0.3 you can you use the system property plugin.resource.directories which is a comma-delimited list of paths. Eg in setenv.sh you might add:


Sri Kanth March 3, 2014

Hi Eddie, sorry for the delayed reply. But I'm sure I won't allowed to try those options on the production server. We have ~5K users and hard to convince those in charge to let me tweak around. I appreciate your answer. But the link you posted denied me permission to view the page the day you replied but today its opening fine (from home win7+chrome). Thx.

EddieW
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 3, 2014

Hi Sri - you can use "Continue Discussion" to add additional comments to this answer. (posting as new answers loses the "thread" of discussion).

As far as the change - we support 10,000+ users, but we have non-prod environments where we 'tweak around' things. I must assume the same about your company?


The directive I linked to is a pretty safe way to expand the list of OS Paths on the JVM's "classpath" (I think it is actually technically a distinct classpath used only for plugin bundles, so he chnage/risk is even smaller) -- I (even in a 50,000 employee company) am authorized to make those types of changes as long as they are tested, reviewed, and approved. Surely so is someone on your side.

You are looking for alternatives to move code out of the INSTAL_DIR for JIRA, and to do so you will need to _somehow_ alter the classpath used by JIRA due to the issue Jamie expressed.

Sri Kanth March 4, 2014

ah, my bad! new to the forums.

I do go thru the dev/test environments before deploying it in production, but getting reviewed takes time at least for now. I shall however, test it.

Thanks for a good explanation. I will run it by my PM for further action.

G' day.

Suggest an answer

Log in or Sign up to answer