开发者

grails ant script can't find spring jars

I am using the grails provided ant script to build my grails 1.3.6 application because our build server doesn't support direct integration with the grails build system. The ant builds run fine on my machine, but there is an issue with the ivy resolve task when it runs on the build server. We get the following messages:

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

This continues on for all the various spring jars. Those ja开发者_如何学Crs are normally provided as part of the grails distribution, but as the ant script is using ivy to grab grails-bootstrap, it needs to grab these jars as well. The build fails when it tries to install the grails plugins.

The ivy.xml and ivysettings.xml files are exactly as provided by grails.


Go to conf/BuildConfig.groovy and uncomment part below which will download missing dependencies from URLs mentioned.

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


I think you've incorrectly declared your dependencies in the ivy.xml file. Try this instead:

<dependencies>
    <dependency org="org.springframework" name="spring-core" rev="3.0.5.RELEASE"/>
    <dependency org="org.springframework" name="spring-beans" rev="3.0.5.RELEASE"/>
    <dependency org="org.springframework" name="spring-test" rev="3.0.5.RELEASE"/>
</dependencies>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜