使用javac编译时编译错误Groovy的

时间:2011-12-10 08:17:59

标签: groovy compilation gradle

编译 gradle idea 时出错 错误见屏幕 http://upwap.ru/1884422

apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'code-quality'
apply plugin: 'groovy'
apply plugin: 'eclipse'
apply plugin: 'project-reports'

sourceCompatibility = 1.6 archivesBaseName = 'opas-client'

ideaModule { downloadJavadoc = true }

buildscript {
    repositories {
        mavenRepo urls: "f:/dev/lib/"
    }
}

version = '0.1'

gradle.taskGraph.whenReady {taskGraph ->
    if (taskGraph.hasTask(':release')) {
        version = '0.1.2' //    } else { //        version = '1.0.624'
    }
}

repositories {
      mavenRepo urls: "f:/dev/lib/" 
}


dependencies {   
  groovy group: 'org.codehaus.groovy', name: 'groovy-all', version: '1.7.5'

  compile  'log4j:log4j:1.2.14',
       'com.caucho:hessian:4.0.7',
       'com.toedter:jcalendar:1.3.2',
       'org.springframework:spring-context-support:3.0.5.RELEASE',
       'org.springframework:spring-web:3.0.5.RELEASE',
       'com.jgoodies:looks:2.2.2',
       'com.jgoodies:animation:1.2.0',
       'com.jgoodies:binding:2.0.6',
       'com.jgoodies:forms:1.2.1',
       'com.jgoodies:validation:2.0.1'

  testCompile 'junit:junit:4.7',
             'org.unitils:unitils-spring:3.1',
             'org.unitils:unitils-easymock:3.1',
             'org.unitils:unitils-inject:3.1',
             'org.springframework:spring-test:3.0.5.RELEASE' 
}

manifest.mainAttributes(
    'Implementation-Title': 'victoria',
    'Implementation-Version': version,
    'Main-Class': 'com.sirius.opas.client.Client',
    'Class-Path':manifestClasspath() )

task release(dependsOn: 'jar') << {
    ant.delete(dir:releaseDir, quiet:"true" )
    ant.mkdir(dir:releaseDir)

    copy {
       from configurations.compile
       into "${releaseDir}/${releaseLibDir}"            
     }

    copy {
       from "$libsDir/${archivesBaseName}-${version}.jar"
       from "dist/start.sh"
       from "dist/start.cmd"
       into "${releaseDir}"
    } 
}

String manifestClasspath() {
    String classes = ""
    configurations.compile.files.each { file ->
        classes += " ${releaseLibDir}/${file.name}"
    }
    return classes   
}

1 个答案:

答案 0 :(得分:0)

我认为你只是缺少提供BeanDefinition类的依赖项。尝试将'org.springframework:spring-beans:3.0.5.RELEASE'添加到compile依赖项列表中。