root @ ubuntu:/ usr / local / hipi#gradle
失败:构建因异常而失败。
其中: 构建文件'/usr/local/hipi/core/build.gradle'行:8
出了什么问题: 评估项目':core'时出现问题。
无法在项目':core'上找到参数[build_7msgs7jcv6q1ci90h6pi2434k3 $ _run_closure2 @ 39d1aa64]的方法分配()。
尝试: 使用--stacktrace选项运行以获取堆栈跟踪。使用--info或--debug选项运行以获得更多日志输出。
建立失败
总时间:7.635秒
Build.gradle code :
defaultTasks 'install'
allprojects {
apply plugin: 'eclipse'
}
subprojects {
apply plugin: 'java'
repositories {
mavenCentral()
}
dependencies {
compile 'org.apache.hadoop:hadoop-common:2.7.1'
compile 'org.apache.hadoop:hadoop-mapreduce-client-core:2.7.1'
compile 'com.googlecode.json-simple:json-simple:1.1.1'
compile 'com.drewnoakes:metadata-extractor:2.8.1'
compile 'com.twelvemonkeys.imageio:imageio-jpeg:3.1.1'
compile 'com.twelvemonkeys.imageio:imageio-pnm:3.1.1'
compile 'com.twelvemonkeys.imageio:imageio-tiff:3.1.1'
compile group: 'org.bytedeco', name: 'javacpp', version: '1.0'
compile group: 'org.bytedeco', name: 'javacv', version: '1.0'
compile group: 'org.bytedeco.javacpp-presets', name: 'opencv', version: '3.0.0-1.0'
compile group: 'org.bytedeco.javacpp-presets', name: 'opencv', version: '3.0.0-1.0', classifier: 'macosx-x86_64'
compile group: 'org.bytedeco.javacpp-presets', name: 'opencv', version: '3.0.0-1.0', classifier: 'linux-x86_64'
compile group: 'org.bytedeco.javacpp-presets', name: 'opencv', version: '3.0.0-1.0', classifier: 'windows-x86_64'
testCompile "junit:junit:4+"
}
}
task install {
dependsOn(':tools:hibImport:jar')
dependsOn(':tools:hibDownload:jar')
dependsOn(':tools:hibInfo:jar')
dependsOn(':tools:hibToJpeg:jar')
dependsOn(':tools:hibDump:jar')
dependsOn(':tools:covar:jar')
doLast {
println '\nFinished building the HIPI library along with all tools and examples.'
}
}
答案 0 :(得分:0)
问题出在核心文件夹的gradle文件中。你能告诉我那个档案吗? 核心目录gradle文件的内容应为:
apply plugin: 'java-library-distribution'
jar {
baseName = 'hipi'
version = '2.1.0'
}
distributions {
main{
baseName = 'hipi'
version = '2.1.0'
}
}
javadoc {
title = "HIPI - Hadoop Image Processing Interface"
options.links("http://docs.oracle.com/javase/8/docs/api/",
"http://hadoop.apache.org/docs/stable/api/",
"http://javadoc.metadata-extractor.googlecode.com/git/2.7.0/",
"http://bytedeco.org/javacpp-presets/opencv/apidocs/")
}
test {
testLogging.showStandardStreams = true
}