This is my gradle build script.
apply plugin: 'groovy'
project.group = "test.tree"
archivesBaseName = "tree"
project.version = "1.0"
manifest.mainAttributes("Main-Class" : "test.tree.App")
sourceCompatibility=1.6
targetCompatibility=1.6
repositories {
mavenCentral()
}
dependencies {
groovy group: 'org.codehaus.groovy', name: 'groovy', version: '1.8.6'
testCompile group: 'junit', name: 'junit', version: '4.8.2'
}
And this compiles just fine
The problem is that I can't run the created JAR, I get an exception
java.lang.NoClassDefFoundError: groovy/lang/GroovyObject
So I guess the groovy plugin doesn't include all the necessary classes inside the JAR.
How to I create a stand-alone JAR that I can simply .. run ;-)
question from:
https://stackoverflow.com/questions/9749032/create-a-groovy-executable-jar-with-gradle 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…