Forums

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

Groovy directory structure

Holger Buhr
Contributor
March 2, 2016

Hi,

and another question smile

I downloaded the maven froject from https://bitbucket.org/Adaptavist/scripts-repository.git

As I understand it the src/main/resource dir is for all my scripts and goes to JiraHome/Scripts later on production.

 

Is there a common dir structure for other files like config, velocity templates (thx for the hint in another question), my own library etc?

Or can I organize that stuff myself like:

src/main/resource/config

src/main/resource/library

src/main/resource/src   <- for my other classes which do not belong in library

src/main/resource/view <- email templates etc

 

Or am I totally off and I can go outside resources and have to put all the stuff there?

1 answer

0 votes
Kristian Walker _Adaptavist_
Community Champion
March 10, 2016

Hi Marc,

Their is no standard defined structure which is published and advised to follow.

I would personally organise my code in my development environment in a very similar way that the Atlassian plugin structure is defined which would be as shown below:

src/main/resources/groovy <-  Store all of the main groovy scripts here

src/main/resources/config  <- Store all config files here

src/main/resources/templates <- Store all templates here

src/main/resources/images <- Store all images here

src/main/resource/library <- Store all third parties librays here.

I hope this helps

Thanks

Kristian

Holger Buhr
Contributor
March 13, 2016

Ah, I see, I have something similar now, but whith module "support":

http://i.imgur.com/5bc4ucQ.png

When the ressources dir is the JiraHome/scripts dir, can I execute files in /groovy from Script Runner->Script Listeners->Custom listener?

 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events