Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
54 lines (44 sloc) 1.33 KB
apply plugin: 'eclipse-wtp'
apply plugin: 'war'
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
compileJava.options.encoding = 'UTF-8'
compileTestJava.options.encoding = 'UTF-8'
ext {
projectName = 'rename_me'
}
repositories {
mavenCentral()
}
dependencies {
compile 'ch.qos.logback:logback-classic:1.1.3'
compile 'org.flywaydb:flyway-core:3.2.1'
compile 'com.fasterxml.jackson.core:jackson-databind:2.6.4'
providedCompile 'fish.payara.extras:payara-micro:4.1.1.162'
testCompile 'junit:junit:4.12', {transitive = false}
testCompile 'de.bechte.junit:junit-hierarchicalcontextrunner:4.12.1'
testCompile 'org.assertj:assertj-core:3.2.0'
testCompile 'org.jmockit:jmockit:1.21'
}
war {
baseName = projectName
}
eclipse {
project.name = projectName
}
task payara(type: Exec, dependsOn: war) {
def payaraJar = configurations
.providedCompile
.find {it.name =~ /payara-micro.*\.jar/}
.absolutePath
def warFile = war.archivePath
commandLine(
'java',
'-Xdebug',
'-Xrunjdwp:transport=dt_socket,server=y,address=18000,suspend=n',
'-jar', payaraJar, '--deploy', warFile
)
}
task wrapper(type: Wrapper) {
gradleVersion = '2.10'
}