How to make maven use the latest release version within version range?

后端 未结 2 1966
不知归路
不知归路 2020-12-18 19:13

In my maven project I use dependencies like this:


    org.apache.httpcomponents
    httpc         


        
相关标签:
2条回答
  • 2020-12-18 19:44

    Maven 3 supports versioning for alpha, beta and snapshots as well with the following order alpha < beta < snapshot

    0 讨论(0)
  • 2020-12-18 19:55

    Looking at the documentation for Maven range selections, I notice the comment:

    Resolution of dependency ranges should not resolve to a snapshot (development version) unless it is included as an explicit boundary.

    Unless the artifact version ends with -SNAPSHOT, Maven is going to consider it a valid release build. As far as I know, -alpha1 has no special meaning to Maven. It's just another random qualifier.

    I would strongly recommend you forgo the version range, anyway. Predictable builds should be the goal of any stable project and version ranges fly in the face of that.

    0 讨论(0)
提交回复
热议问题