Maven specific version of a snapshot dependency

前端 未结 4 1893
我在风中等你
我在风中等你 2020-12-14 14:22

Is there a way to get Maven to download a specific snapshot version of a dependency? I know that specifying the dependency like this will download the lastest snapshot avail

4条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-14 15:19

    To use a specific snapshot version of a dependency, the referenced artifact should be installed/deployed with a unique snapshot version number. See the uniqueVersion element in the POM reference/Repository. In this case you can reference it like:

    ...
    
    groupid
    artifact-id
    1.0.0-20090610.041042-5
    
    ...
    

    Maven repository manager servers may have additional related features, like overriding the pom.xml's uniqueVersion setting. For example see the Artifactory User Guide about this feature (additionally, you can read here some arguments against using unique snapshot version numbers).

提交回复
热议问题