Java Grails未解析的依赖项错误

Java Grails未解析的依赖项错误,java,eclipse,spring,grails,springsource,Java,Eclipse,Spring,Grails,Springsource,我希望有人能帮助我。我正试图在我的Windows7 Prof.机器上安装STS/grails,这台机器有64位操作系统。我也在同一台机器上安装了Ubuntu(双启动),但出现了同样的错误。当我用我的应用程序运行IDE时,我得到一个错误。有人能告诉我如何让它工作吗?该错误与未解析的依赖项有关 My BuildConfig is as folllows: grails.servlet.version = "2.5" // Change depending on target container c

我希望有人能帮助我。我正试图在我的Windows7 Prof.机器上安装STS/grails,这台机器有64位操作系统。我也在同一台机器上安装了Ubuntu(双启动),但出现了同样的错误。当我用我的应用程序运行IDE时,我得到一个错误。有人能告诉我如何让它工作吗?该错误与未解析的依赖项有关

My BuildConfig is as folllows:

grails.servlet.version = "2.5" // Change depending on target container compliance (2.5 or 3.0)
grails.project.class.dir = "target/classes"
grails.project.test.class.dir = "target/test-classes"
grails.project.test.reports.dir = "target/test-reports"
grails.project.target.level = 1.6
grails.project.source.level = 1.6
grails.project.war.file = "target/${appName}-${grails.util.Environment.current.name}-${appVersion}.war"

grails.project.dependency.resolution = {
    // inherit Grails' default dependencies
    inherits("global") {
        // uncomment to disable ehcache
        // excludes 'ehcache'
    }
    log "warn" // log level of Ivy resolver, either 'error', 'warn', 'info', 'debug' or 'verbose'
    checksums true // Whether to verify checksums on resolve

    repositories {
        inherits true // Whether to inherit repository definitions from plugins
        grailsPlugins()
        grailsHome()
        grailsCentral()

        // uncomment these to enable remote dependency resolution from public Maven repositories
        mavenLocal()
        mavenCentral()
        //mavenRepo "http://uk.maven.org/maven2"
        //mavenRepo "http://snapshots.repository.codehaus.org"
        //mavenRepo "http://repository.codehaus.org"
        //mavenRepo "http://download.java.net/maven/2/"
        //mavenRepo "http://repository.jboss.com/maven2/"
    }
    dependencies {      
        compile ('org.apache.tika:tika-core:1.0')
        compile ('org.apache.tika:tika-parsers:1.0') { excludes "xercesImpl", "xmlParserAPIs", "xml-apis", "log4j" }
        runtime ('mysql:mysql-connector-java:5.1.20') { excludes "commons-logging" }
        build ('org.apache.httpcomponents:httpcore:4.1.2')
        build ('org.apache.httpcomponents:httpclient:4.1.2')
        build ('org.apache.httpcomponents:httpmime:4.1.2')
        runtime ('org.apache.httpcomponents:httpcore:4.1.2')
        runtime ('org.apache.httpcomponents:httpclient:4.1.2')
        runtime ('org.apache.httpcomponents:httpmime:4.1.2')
    }

    plugins {
        runtime ":hibernate:$grailsVersion"
        runtime ":jquery:1.7.2"
        runtime ":resources:1.2-RC1"

        test ":spock:0.6"

        build ":tomcat:$grailsVersion"
    }
}
以下是错误:

命令以错误代码终止(请参阅输出的详细信息)

系统输出 org.apache.tomcat#com.springsource.org.apache.tomc at.jdbc;1.0

看起来有一个空间?我想Tomc应该是tomcat吧?因此,修复依赖项拼写错误,您应该会没事的


org.apache.tomcat#com.springsource.org.apache.tomcat.jdbc;1.0可能是插件的依赖关系。发布你的application.properties

要解决此问题,请在存储库中的BuildConfig.groovy中添加以下行:

grails.project.dependency.resolution = {
    repositories {
        mavenRepo "http://repository.springsource.com/maven/bundles/release"
        mavenRepo "http://repository.springsource.com/maven/bundles/external"
    }
}

我怎样纠正拼写?这只是错误的输出。此外,我想这正是出于某种原因粘贴进来的原因。你能粘贴你的buildconfig.groovy文件吗?是的,我会将它添加到原始的postHello,我将上述代码添加到我的buildconfig.grooy文件中,但得到以下错误:|找不到错误要求的Grails构建依赖项。GRAILS\u HOME未设置,或者您的依赖项在GRAILS app/conf/BuildConfig.groovy中配置错误。我知道grails have变量已设置(在commnad提示符中,我可以使用grails-version命令获取版本)。在哪里可以找到application.properties?在application的根目录中,您是添加这些mavenRepos还是替换已有的mavenRepos?应该是这样的:
grails.project.dependency.resolution = {
    repositories {
        mavenRepo "http://repository.springsource.com/maven/bundles/release"
        mavenRepo "http://repository.springsource.com/maven/bundles/external"
    }
}