I was opening a project last month and I came across this error in gradle when I was generating a jar … (I had already formatted the pc a few times)
In IntelliJ, build seems fine…
apply plugin: 'java'
apply plugin: 'application'
version '1.0.0'
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.12'
compile group: 'org.fusesource', name: 'sigar', version: '1.6.4'
compile 'com.fasterxml.jackson.core:jackson-core:2.7.1'
compile 'com.fasterxml.jackson.core:jackson-databind:2.7.1-1'
testCompile group: 'com.sun.net.httpserver', name: 'http', version: '20070405'
compile 'org.apache.httpcomponents:httpclient:4.5.5'
}
task uniqueJar(type: Jar) {
manifest {
attributes 'Implementation-Title': project.name,
'Implementation-Version': version,
'Main-Class': 'br.com.fulltime.infra.client.connection.ClientHTTP'
}
baseName = project.name
doFirst {
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
}
exclude 'META-INF/*.RSA', 'META-INF/*.SF','META-INF/*.DSA'
with jar
}
Any ideas? I had this error once, and it was because my JDK was installed wrong … now I removed the JDK and installed again (with purge and talz) and nothing …