是否应该认为Maven依赖版本范围已被弃用? [英] Should Maven dependency version ranges be considered deprecated?

查看:226
本文介绍了是否应该认为Maven依赖版本范围已被弃用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

鉴于很难在官方文档中找到有关依赖版本范围的任何信息(我能提供的最好的方法是解决方案

从正式意义上讲,不建议弃用它们,因为它们在将来的版本中将被删除.但是,它们的局限性(以及随之而来的缺乏广泛采用的情况)意味着它们不如最初预期的那样有用,并且如果不进行大量重新思考,就不可能获得改进.

这就是为什么文档仅以设计文档的形式存在的原因-它们存在,但是重要的用例从未完成过,以至于我建议通常使用它们.

如果您有一个目前可用的用例,并且可以适应这些限制,则可以期望它们在可预见的将来继续有效,但是在工作中除此以外没有什么.

Given that it's very hard to find anything about dependency version ranges in the official documentation (the best I could come up with is http://docs.codehaus.org/display/MAVEN/Dependency+Mediation+and+Conflict+Resolution), I wonder if they're still considered a 1st class citizen of Maven POMs.

I think most people would agree that they're a bad practice anyway, but I wonder why it's so hard to find anything official about it.

解决方案

They are not deprecated in the formal sense that they will be removed in a future version. However, their limitations (and the subsequent lack of wide adoption), mean that they are not as useful as originally intended, and also that they are unlikely to get improvements without a significant re-think.

This is why the documentation is only in the form of the design doc - they exist, but important use cases were never finished to the point where I'd recommend generally using them.

If you have a use case that works currently, and can accommodate the limitations, you can expect them to continue to work for the forseeable future, but there is little beyond that in the works.

这篇关于是否应该认为Maven依赖版本范围已被弃用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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