1

我正在尝试获取 .classpath 文件中的源引用,因此我删除了我的 webapp/.classpath、webapp/.project 和 webapp/.settings 的东西,但 gradle 每次都会打印这个...

:eclipseClasspath
:eclipseJdt
:eclipseProject
:eclipse
:master:eclipseClasspath
:master:eclipseJdt
:master:eclipseProject
:master:eclipse
:webapp:eclipse UP-TO-DATE

不,它显然不是最新的,因为它没有 .classpath 文件!!!!grrrrrrr,我的 webapp 依赖项是这样定义的......(主项目使用 ivy 来定义很多依赖项

    dependencies {
        compile project(':master')

        compile fileTree(dir: '../webapp/play-1.2.5/framework/lib', include: '*.jar')
                                                                                    //, excludes: ['*log4j*','slf4j*'])
        compile fileTree(dir: '../webapp/play-1.2.5/framework', include: 'play-*.jar')
    }

我的主依赖是这样的

 project(':master') {
    project.ext.genLibDir = file('../webapp/lib')
    project.ext.fixedLibDir = file('libother')

    configurations {
        compile.exclude module: 'commons'
    all*.exclude group: 'org.springframework'
    all*.exclude module: 'log4j'
    all*.exclude module: 'slf4j-log4j12'
    all*.exclude module: 'junit'
    all*.exclude module: 'antlr'
    all*.exclude module: 'snakeyaml'
    }

    dependencies {
            compile group: 'org.acegisecurity',  name: 'acegi-security',          version: '1.0.7'

            //compile group: 'org.hibernate',    name: 'hibernate-entitymanager', version: '4.1.4.Final'
            //compile group: 'org.slf4j',          name: 'slf4j-api',               version: '1.6.6'
            compile 'org.slf4j:log4j-over-slf4j:1.6.6'
            compile 'org.slf4j:jcl-over-slf4j:1.6.6'
            compile 'com.ning:async-http-client:1.7.6'
            //ERASE this one as this client seems to suck usability-wise!!!
            compile 'org.apache.httpcomponents:httpasyncclient:4.0-beta3'

            compile group: 'ch.qos.logback',     name: 'logback-core',            version: '1.0.6'
            compile group: 'ch.qos.logback',     name: 'logback-classic',         version: '1.0.6'
            //compile group: 'joda-time',         name: 'joda-time',               version: '2.1'
            compile group: 'org.codehaus.jackson', name: 'jackson-mapper-asl',    version: '1.9.8'

有什么想法可能是错的吗?为什么它不会生成我的 .classpath 文件???

我正在运行“gradle eclipse”

在 webapp:eclipse 的这些日志中打开调试结果

07:34:13.822 [LIFECYCLE] [org.gradle.TaskExecutionLogger] :webapp:eclipse
07:34:13.822 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Starting to execute task ':webapp:eclipse'
07:34:13.823 [INFO] [org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter] Skipping task ':webapp:eclipse' as it has no actions.
07:34:13.823 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Finished executing task ':webapp:eclipse'
07:34:13.823 [LIFECYCLE] [org.gradle.TaskExecutionLogger] :webapp:eclipse UP-TO-DATE

我应该提到的构建文件的另一部分是我将 eclipse 插件应用于所有项目,就像这样

 allprojects {
    apply plugin: 'java'
    apply plugin: 'eclipse'

项目结构简单

SDI
   master
   webapp

在我看来,日志记录不够好,因此本身就是一个错误,因为任何最新的东西都应该真正告诉你为什么,所以我可以继续。无论如何要打开更多日志记录?

谢谢,院长

4

0 回答 0