JIRA Groovy Script Coding With Auto-Completion In Eclipse

Do you like this?

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


Content:

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 {
	maven{
		url "https://maven.atlassian.com/repository/public"
	}
    mavenCentral()
    mavenLocal()
}

// 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