Grails - 如何让grails从maven仓库获取最新的本地jar文件 [英] Grails - How to make grails get latest local jars from maven repository

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

问题描述


  1. 在我的maven回购(.m2)中。有一个像sub_app-0.1.jar这样的本地jar。
  2. 我在ivy-cache中拥有相同的副本。

  3. 我运行maven安装在sub_app上,然后创建新的sub_app-0.1.jar文件。

  4. 之后,我运行grails clean,它没有从.m2中获得新的sub_app-0.1.jar。但是,如果我从ivy-cache中删除(删除)sub_app-0.1.jar文件并运行grails clean,那么它会将新的sub_app-0.1.jar文件变为常春藤-cache。


  5. 如果我在子应用程序pom和grails pom中更改版本,并且grails采用最新版本。再次安装它没有采取。


  6. 我尝试通过添加SNAPSHOT甚至支持应用程序jar。相同的结果,它第一次采取后,没有。

即。只考虑ivy-cache中的jar名称和版本的Grails,如果有的话 - 不需要。
如果没有 - 它取自.m2。



但它不考虑新建/旧建。



请帮助在步骤4中获得相同的行为(步骤5)。

解决方案

Grails不支持获取最新的相同的(group-id,artifact-id,版本)jar甚至SNAPSHOT jar也是。

解决方案:



  1. 每次,从ivy-cache中删除sub-app-version.jar。或

  2. 每次,将版本更改为pom.xml中的子应用程序jar的下一个值(应该大于当前值)。



请阅读:



4.7.6快照和其他更改的依赖关系



  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.

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

  7. I tryed by adding SNAPSHOT to sup-app jar even. same result, first time it is taking, after not.

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

But it not considering new/old build.

Please help to get same behavior(step 5) in step 4 also.

解决方案

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

Solutions:

  1. Every-time, delete the sub-app-version.jar from ivy-cache. or
  2. Every-time, change the version to next value(should be greater than current value) of the sub-app jar in pom.xml.

4 Configuration - Reference Documentation

Please read:

4.7.6 Snapshots and Other Changing Dependencies

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

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