Groovy directory structure

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

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

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
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Published Apr 19, 2018 in Marketplace Apps

Calling all developers––You're invited to Atlas Camp 2018

 Atlas Camp   is our developer event which will take place in Barcelona, Spain  from the 6th -7th of   September . This is a great opportunity to meet other developers and get n...

366 views 0 6
Read article

Atlassian User Groups

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!

Find my local user group

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

Groups near you