apply plugin: 'java' apply plugin: 'eclipse' apply plugin: 'eclipse-wtp' apply plugin: 'war' sourceCompatibility = 1.6 version = '1.1' war { manifest { attributes provider: 'EGIZ', 'Specification-Version': getCheckedOutGitCommitHash(), 'Implementation-Title': 'Einfach Signieren', 'Implementation-Version': version } } repositories { mavenCentral() } def getCheckedOutGitCommitHash() { def gitFolder = "$projectDir/../.git/" def takeFromHash = 40 def head = new File(gitFolder + "HEAD").text.split(":") // .git/HEAD def isCommit = head.length == 1 if(isCommit) return head[0].trim().take(takeFromHash) def refHead = new File(gitFolder + head[1].trim()) refHead.text.trim().take takeFromHash } dependencies { compile group: 'commons-collections', name: 'commons-collections', version: '3.2' compile group: 'commons-fileupload', name: 'commons-fileupload', version: '1.2' compile group: 'org.apache.commons', name: 'commons-io', version: '1.3.2' compile group: 'org.slf4j', name: 'slf4j-log4j12', version: '1.7.5' compile "commons-codec:commons-codec:1.9" //compile group: 'org.apache.pdfbox', name: 'pdfbox', version: '1.8.5' compile 'com.lowagie:itext:4.2.0' providedCompile 'javax.servlet:javax.servlet-api:3.1.0' testCompile group: 'junit', name: 'junit', version: '4.+' } test { systemProperties 'property': 'value' } uploadArchives { repositories { flatDir { dirs 'repos' } } }