如何使Grails从Maven存储库获取最新的本地jar? [英] How to make Grails get latest local jars from Maven repository?

查看:77
本文介绍了如何使Grails从Maven存储库获取最新的本地jar?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  1. 在我的Maven回购(.m2)中.我本地有一个jar,例如sub_app-0.1.jar.
  2. 我在常春藤缓存中具有相同的副本.
  3. 我在sub_app上运行maven install,然后创建了新的sub_app-0.1.jar文件.
  4. 之后,我运行grails clean,它没有从.m2中获取新的sub_app-0.1.jar.
  5. 但是,如果我从ivy-cache中删除(删除)sub_app-0.1.jar文件并运行grails clean,那么它将把新的sub_app-0.1.jar文件添加到ivy-cache中.

  1. In my Maven repo (.m2). there is one my local jar like sub_app-0.1.jar.
  2. I have same copy of the it in ivy-cache.
  3. I run maven install on sub_app then new sub_app-0.1.jar file created.
  4. After, I run grails clean and it not getting my new sub_app-0.1.jar from .m2.
  5. But, if I remove (delete) sub_app-0.1.jar file from ivy-cache and run the grails clean then it is getting new sub_app-0.1.jar file into ivy-cache.

如果我在sub-app pom和grails pom中更改版本,Grails将采用最新版本.再次安装即可.

If I change the version in sub-app pom and grails pom and Grails is taking latest one. install again it not taking.

即.如果有的话,Grails仅考虑常春藤缓存中的jar名称和版本-不需要.如果没有的话-它取自.m2.

ie. Grails considering only jar name and version in ivy-cache, if having - it not take. If not having - it taking from .m2.

但它不考虑新旧版本.

如何在第4步中也获得相同的行为(第5步)?

How can I get the same behavior (step 5) in step 4 also?

推荐答案

Grails不支持获取相同(组ID,工件ID,版本)jar的最新版本,甚至不支持SNAPSHOT jar.

Grails not supports to get latest of same (group-id, artifact-id, version) jar even SNAPSHOT jar also.

解决方案:

  1. 每次都要从ivy-cache中删除sub-app-version.jar.或
  2. 每次都将版本更改为pom.xml中子应用程序jar的下一个值(应大于当前值).

4配置-参考文档

请阅读:

4.7.6快照和其他变化的依存关系

4.7.6 Snapshots and Other Changing Dependencies

这篇关于如何使Grails从Maven存储库获取最新的本地jar?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆