JIRA Groovy Script Coding With Auto-Completion In Eclipse

Do you like this?

This tutorial shows you how to set up Eclipse projects for JIRA Scripts using Groovy.


Please make sure you have got groovy and gradle set up before proceeding. In this example, we are going to create a hello world application.
1) mkdir helloworld
2) cd helloworld
3) In console, run: gradle init
4) A build.gradle file will be created automatically
5) Edit build.gralde as follows:

def JIRA_VERSION= "6.3.12"

apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'groovy'

// In this section you declare where to find the dependencies of your project
repositories {
		url "https://maven.atlassian.com/repository/public"

// In this section you declare the dependencies for your production and test code
dependencies {
    compile 'org.slf4j:slf4j-api:1.7.5'
	compile "com.atlassian.jira:jira-core:$JIRA_VERSION"

    testCompile "junit:junit:4.11"

6) In console, run: gradle eclipse
7) Import the project to Eclipse
8) If you add more dependencies, re-run the command gradle eclipse and re-import the project to Eclipse.

comments powered by Disqus