Skip to content

Instantly share code, notes, and snippets.

@chtz
Last active December 22, 2015 05:59
Show Gist options
  • Save chtz/6428094 to your computer and use it in GitHub Desktop.
Save chtz/6428094 to your computer and use it in GitHub Desktop.
Grade build file for Eclipse WTP (Indigo), Java EE 6 full-profile WAR, Flyway DB Migration
apply plugin: 'java'
apply plugin: 'war'
apply plugin: 'eclipse-wtp'
apply plugin: 'flyway'
sourceCompatibility = 1.6
version = '0.1'
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath group: 'com.googlecode.flyway', name: 'flyway-gradle-plugin', version:'2.2.1'
classpath group: 'mysql', name: 'mysql-connector-java', version:'5.1.26'
}
}
repositories {
mavenCentral()
}
jar {
manifest {
attributes 'Implementation-Title': 'EE6 Demo WAR', 'Implementation-Version': version
}
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.+'
providedCompile group: 'javax', name: 'javaee-api', version: '6.0'
}
flyway { /* gradle flywayMigrate -i */
url = 'jdbc:mysql://localhost/db'
user = 'user'
password = 'pass'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment