开发者

groovy versus ivy

I notice that, by default, the groovy eclipse plugin sets up an ivy dependency.

开发者_StackOverflow中文版This tantalizingly suggests that there's a way to declare dependencies for a groovy script and resolve them from a repo.

However, the web page at codehaus that describes groovy+ivy is just a page of dead links to a dead domain.


Groovy has a handy @Grab annotation that allows including dependencies dynamically at runtime. It internally uses ivy and can access Ivy/Maven repositories. More information on that can be found here: http://groovy.codehaus.org/Grape

One example from the site:

@Grab(group='org.springframework', module='spring', version='2.5.6')
import org.springframework.jdbc.core.JdbcTemplate

Another option for ivy integration is at the build level. Gradle the groovy based build system can also include dependencies as part of a build.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜