Maven check for updated dependencies in repository

后端 未结 6 717
借酒劲吻你
借酒劲吻你 2020-11-29 15:45

Is there a Maven plugin that allows you to check if there are newer versions of dependencies available in the repository?

Say, you are using dependency X with versio

6条回答
  •  离开以前
    2020-11-29 15:55

    The ideal way to do it is to set dependency versions as properties in pom.xml and then running the below command to get the updated versions for your specific/custom dependencies.

    
        1.8
        UTF-8
        UTF-8
        true
        1.2.3.RELEASE
        Hoxton.SR6
        2.2.1.RELEASE
        5.5.1
        1.10.0
        3.1.2
        2.9.2
        0.118.1-alpha
        3.0.6.RELEASE
    
    
    mvn versions:display-property-updates
    
    
    [INFO] The following version properties are referencing the newest available version:
    [INFO]   ${avro.version} .............................................. 1.10.0
    [INFO]   ${spring-cloud-stream-schema.version} ................. 2.2.1.RELEASE
    [INFO]   ${janino.version} ............................................. 3.1.2
    [INFO] The following version property updates are available:
    [INFO]   ${spring-cloud-gcp.version} .......... 1.2.3.RELEASE -> 1.2.5.RELEASE
    [INFO]   ${google-cloud-logging-logback.version}  0.118.1-alpha -> 0.118.2-alpha
    [INFO]   ${spring-cloud-stream-binder-kafka.version}  3.0.6.RELEASE -> 3.0.8.RELEASE
    [INFO]   ${confluent.version} ................................. 5.5.1 -> 6.0.0
    [INFO]   ${swagger.version} ................................... 2.9.2 -> 3.0.0
    [INFO]   ${spring-cloud.version} .................... Hoxton.SR6 -> Hoxton.SR8
    [INFO] 
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD SUCCESS
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time:  3.572 s
    [INFO] Finished at: 2020-10-06T09:35:08-07:00
    [INFO] ------------------------------------------------------------------------
    

    Another way to achieve this is by executing the command mvn versions:display-dependency-updates but the problem I face with this approach is that it also shows me updates for the nested dependencies which are not too useful for me.

提交回复
热议问题