grails - grails Ant 脚本找不到 Spring jar

标签 grails ant ivy

我正在使用grails提供的ant脚本来构建我的grails 1.3.6应用程序,因为我们的构建服务器不支持与grails构建系统直接集成。 Ant 的构建在我的机器上运行良好,但是当它在构建服务器上运行时,ivy resolve任务存在问题。我们收到以下消息:

module not found: org.springframework#org.springframework.test;3.0.5.RELEASE
module not found: org.springframework#org.springframework.core;3.0.5.RELEASE
module not found: org.springframework#org.springframework.beans;3.0.5.RELEASE

对于所有各种 Spring jar ,此过程继续进行。这些jar通常作为grails分发的一部分提供,但是由于ant脚本使用ivy抓取grails-bootstrap,因此也需要抓取这些jar。尝试安装grails插件时,构建失败。

ivy.xml和ivysettings.xml文件与grails完全一样。

最佳答案

转至conf / BuildConfig.groovy并取消注释部分,该部分将从上述URL下载缺少的依赖项。

    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/"

关于grails - grails Ant 脚本找不到 Spring jar ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4565808/

相关文章:

grails - 如何将字符串形式的对象引用转换为该引用类对象?

Ant : find the last folder in a folder

gradle - Gradle:使用jar依赖项进行一场激烈的 war

Java NoClassDefFoundError 与 Ant

java - 在 netbeans 中构建项目时 Ivy 错误

caching - 如何在 Grails 1.2.5 上清除 Ivy 缓存

debugging - 使用Grails 2.4.3调试IntelliJ 2016.2中的问题

grails - 如何覆盖 ApplicationTagLib#createLink 和 g :link? 的标准行为

grails - 在Grails应用程序中将临时文件存储在哪里?

java - Ant 将堆栈跟踪放入标准输出中