How to display dependency updates only for release versions

后端 未结 2 774
说谎
说谎 2021-02-13 00:02

When I\'m running versions:display-dependency-updates, it will show all the newest beta / milestone versions of my dependencies. I prefer using \"release\" packages

2条回答
  •  Happy的楠姐
    2021-02-13 00:58

    Maybe I misunderstand a thing but if I use mvn versions:display-dependency-updates it will produce an output like this:

    ~/ws-git/test-project (two-module)$ mvn versions:display-dependency-updates
    [INFO] Scanning for projects...
    [INFO] ------------------------------------------------------------------------
    [INFO] Reactor Build Order:
    [INFO]
    [INFO] Project : Parent
    [INFO] Project : Mod-A
    [INFO] Project : Mod-B
    [INFO]
    [INFO] ------------------------------------------------------------------------
    [INFO] Building Project : Parent 0.1.0-SNAPSHOT
    [INFO] ------------------------------------------------------------------------
    [INFO]
    [INFO] --- versions-maven-plugin:2.2:display-dependency-updates (default-cli) @ project-parent ---
    [INFO] The following dependencies in Dependency Management have newer versions:
    [INFO]   com.beust:jcommander .................................... 1.35 -> 1.55
    [INFO]   com.google.guava:guava ................................ 16.0.1 -> 19.0
    [INFO]   junit:junit ............................................. 4.11 -> 4.12
    [INFO]   log4j:log4j ............................. 1.2.16 -> 1.2.17-atlassian-1
    [INFO]   org.apache.logging.log4j:log4j-api ...................... 2.1 -> 2.6.1
    [INFO]   org.apache.logging.log4j:log4j-core ..................... 2.1 -> 2.6.1
    [INFO]   org.mockito:mockito-core ........................ 1.9.5 -> 2.0.78-beta
    [INFO]   org.testng:testng .................................... 6.8.8 -> 6.9.12
    [INFO]
    [INFO]
    [INFO] ------------------------------------------------------------------------
    [INFO] Building Project : Mod-A 0.1.0-SNAPSHOT
    [INFO] ------------------------------------------------------------------------
    [INFO]
    [INFO] --- versions-maven-plugin:2.2:display-dependency-updates (default-cli) @ mod-a ---
    [INFO] The following dependencies in Dependency Management have newer versions:
    [INFO]   com.beust:jcommander .................................... 1.35 -> 1.55
    [INFO]   com.google.guava:guava ................................ 16.0.1 -> 19.0
    [INFO]   junit:junit ............................................. 4.11 -> 4.12
    [INFO]   log4j:log4j ............................. 1.2.16 -> 1.2.17-atlassian-1
    [INFO]   org.apache.logging.log4j:log4j-api ...................... 2.1 -> 2.6.1
    [INFO]   org.apache.logging.log4j:log4j-core ..................... 2.1 -> 2.6.1
    [INFO]   org.mockito:mockito-core ........................ 1.9.5 -> 2.0.78-beta
    [INFO]   org.testng:testng .................................... 6.8.8 -> 6.9.12
    [INFO]
    [INFO]
    [INFO] ------------------------------------------------------------------------
    [INFO] Building Project : Mod-B 0.1.0-SNAPSHOT
    [INFO] ------------------------------------------------------------------------
    [INFO]
    [INFO] --- versions-maven-plugin:2.2:display-dependency-updates (default-cli) @ mod-b ---
    [INFO] The following dependencies in Dependency Management have newer versions:
    [INFO]   com.beust:jcommander .................................... 1.35 -> 1.55
    [INFO]   com.google.guava:guava ................................ 16.0.1 -> 19.0
    [INFO]   junit:junit ............................................. 4.11 -> 4.12
    [INFO]   log4j:log4j ............................. 1.2.16 -> 1.2.17-atlassian-1
    [INFO]   org.apache.logging.log4j:log4j-api ...................... 2.1 -> 2.6.1
    [INFO]   org.apache.logging.log4j:log4j-core ..................... 2.1 -> 2.6.1
    [INFO]   org.mockito:mockito-core ........................ 1.9.5 -> 2.0.78-beta
    [INFO]   org.testng:testng .................................... 6.8.8 -> 6.9.12
    [INFO]
    [INFO] No dependencies in Dependencies have newer versions.
    [INFO]
    [INFO] ------------------------------------------------------------------------
    [INFO] Reactor Summary:
    [INFO]
    [INFO] Project : Parent ................................... SUCCESS [  0.791 s]
    [INFO] Project : Mod-A .................................... SUCCESS [  0.046 s]
    [INFO] Project : Mod-B .................................... SUCCESS [  0.019 s]
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD SUCCESS
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 1.671 s
    [INFO] Finished at: 2016-07-03T22:17:02+02:00
    [INFO] Final Memory: 20M/439M
    [INFO] ------------------------------------------------------------------------
    

    where you can see things like junit:junit from 4.11 to 4.12 etc. Furthermore the questions is how the versions looks like of your dependencies etc. ?

提交回复
热议问题