我尝试记录 compileClasspath 但它是空集(注意 allprojects 中的构建任务会记录日志)。为什么这没有记录我放入依赖项的所有内容?(试图在这里学习如何钓鱼/调试我的 gradle 问题,因为我真正的问题是编译没有为我的子项目找到我的 jar)。
请注意,构建输出以下行......数组中没有元素:(
MASTER:我现在正在构建 classpath=[]
allprojects {
apply plugin: 'java'
apply plugin: 'eclipse'
buildDir = 'output'
task hello << { task -> println "I'm $task.project.name" }
build << { task -> println "MASTER: I'm building now classpath=$sourceSets.main.compileClasspath.files" }
}
subprojects {
version = 'Developer-Build'
project.ext.genLibDir = file('lib')
project.ext.fixedLibDir = file('libother')
repositories {
mavenCentral()
}
//configurations.compile {
// exclude group: 'javax.jms', module: 'jms'
// exclude group: 'com.sun.jdmk', module: 'jmxtools'
// exclude group: 'com.sun.jmx', module: 'jmxri'
//}
dependencies {
compile group: 'org.hibernate', name: 'hibernate-entitymanager', version: '4.1.4.Final'
compile group: 'org.slf4j', name: 'slf4j-api', version: '1.6.6'
compile group: 'org.slf4j', name: 'log4j-over-slf4j', version: '1.6.6'
compile group: 'ch.qos.logback', name: 'logback-core', version: '1.0.6'
compile group: 'joda-time', name: 'joda-time', version: '2.1'
compile group: 'com.google.inject',name: 'guice', version: '3.0'
compile group: 'com.google.protobuf',name: 'protobuf-java', version: '2.4.1'
//to be erased soon
compile group: 'commons-configuration',name:'commons-configuration',version: '1.8'
compile group: 'org.jboss.netty', name: 'netty', version: '3.2.7.Final'
//compile group: 'org.asteriskjava',name: 'asterisk-java', version: '1.0.0.M3'
compile fileTree(dir: project.ext.fixedLibDir, include: '*.jar')
compile fileTree(dir: 'webserver/play-1.2.4/framework/lib', include: '*.jar')
compile fileTree(dir: 'webserver/play-1.2.4/framework', include: '*.jar')
}