使用 java 构建 grails 2.3.11 时出错 1.7 解决获取依赖项的错误:无法读取工件描述符

Error on Building grails 2.3.11 with java 1.7 Resolve error obtaining dependencies: Failed to read artifact descriptor

我的项目构建正确,但今天我在使用 Mac 构建时似乎遇到了问题: 我用 grails 2.3.11 和 java 1.7 构建。 构建时出现此错误:

Resolve error obtaining dependencies: Failed to read artifact descriptor for org.multiverse:multiverse-core:jar:0.7.0 (Use --stacktrace to see the full trace) Error | Failed to read artifact descriptor for org.apache.ant:ant:jar:1.8.4 |Run 'grails dependency-report' for further information.

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.work.dir = "target/work"
grails.project.target.level = 1.6
grails.project.source.level = 1.6

grails.project.war.exploded.dir = "C:/test"
//grails.war.exploded=true
grails.gsp.view.dir="C:/test/WEB-INF/grails-app/view"
//grails.project.war.file = "target/${appName}-${appVersion}.war"
grails.project.war.file = "target/test.war"
grails.project.dependency.resolver = "maven"
grails.project.dependency.resolution = {
    
    inherits( "global" ) {
      
    }
  
    repositories {        
        grailsPlugins()
        grailsHome()
        grailsCentral()

        // uncomment the below to enable remote dependency resolution
        // from public Maven repositories
        mavenLocal()
        mavenCentral()
        // mavenRepo "http://snapshots.repository.codehaus.org"
        // mavenRepo "http://repository.codehaus.org"
        // mavenRepo "http://download.java.net/maven/2/"
        // mavenRepo "http://repository.jboss.com/maven2/"
        mavenRepo "http://repo.grails.org/grails/plugins"
//mavenCentral()    // As of Grails 2.4.4 this defaults to https
        mavenRepo "http://repo1.maven.org/maven2"
    

    }
    dependencies {
        // specify dependencies here under either 'build', 'compile', 'runtime', 'test' or 'provided' scopes eg.

        // runtime 'mysql:mysql-connector-java:5.1.5'

        runtime 'net.sf.opencsv:opencsv:1.8'
        runtime 'org.apache.httpcomponents:httpclient:4.2.3'
        runtime 'org.apache.httpcomponents:httpcore:4.2.3'
        runtime 'org.bouncycastle:bcprov-jdk16:1.44'
        runtime 'postgresql:postgresql:8.4-702.jdbc3'
    }
    
    plugins {
        runtime ":hibernate4:4.3.6.1"
        build ":tomcat:7.0.55"
        
        compile ':famfamfam:1.0.1'
        runtime ":jquery:1.11.1"
        compile ":jquery-ui:1.10.4"
        compile ":mail:1.0.4"
        compile ":quartz:1.0.1"
        compile ':spring-security-core:1.2.7.3'
        compile ':spring-security-ui:0.2'
        compile ":scaffolding:2.1.2"
        compile ":postgresql-extensions:0.6.1"
    }

}

我尝试了所有配置,但似乎无法正常工作,如果有人能帮助我,我将不胜感激。

“正确构建”是什么意思?您的应用已成功 运行 来自其他设备?

当你移动到 mac 不工作? 如果我的假设是正确的,我会建议您手动复制从旧设备生成的插件文件夹,并且您必须跳过 grails refresh-dependencies.

插件:

  1. .config
  2. .gradle
  3. .groovy
  4. .m2
  5. .p2