【问题标题】:error: failed to read artifact descriptor for xalan错误:未能读取 xalan 的工件描述符
【发布时间】:2014-07-31 02:34:02
【问题描述】:

在命令提示符下使用“grails create-domain-class Employee”命令创建域类时,我收到错误“无法读取 xalan:serializer:jar 2.7.1 的工件描述符。我目前使用的是 Grails 2.3。 7. 请帮我解决我的错误。

提前致谢

【问题讨论】:

标签: grails xalan


【解决方案1】:

试试这个:

repositories {
    inherits true // Whether to inherit repository definitions from plugins

    grailsPlugins()
    grailsHome()
    mavenLocal()
    grailsCentral()
    mavenCentral()

    mavenRepo "https://repo1.maven.org/maven2/"
    
}

非常适合我。

【讨论】:

  • 这应该是上述问题的正确答案。像魅力一样工作。
【解决方案2】:

似乎是解决项目所需依赖项的问题。

在 BuildConfig.groovy 中,如果您有一个包含依赖项的存储库,请像这样引用它:

repositories {
    inherits true // Whether to inherit repository definitions from plugins

    mavenRepo "http://example.:8081/this/that/other/public/"
}

或者,尝试将依赖解析器更改为 ivy 而不是 maven。我认为这使得 grails 试图从它自己的库中获取它的依赖项......我可能错了。

grails.project.dependency.resolver = "ivy" 

【讨论】:

  • 将其更改为 ivy 解析器为我修复了它,这不是未来的推荐选项
【解决方案3】:

你可以试试BuildConfig.groovy

dependencies {  
 provided('xalan:xalan:2.7.1')
}

看看它对你有没有帮助!...

【讨论】:

    猜你喜欢
    • 2016-05-08
    • 2011-10-02
    • 2017-02-12
    • 1970-01-01
    • 2018-02-11
    • 1970-01-01
    • 2011-07-03
    • 2017-08-20
    • 1970-01-01
    相关资源
    最近更新 更多