How do I find the latest version of an artifact from a maven repository

前端 未结 2 1651
孤城傲影
孤城傲影 2021-01-30 09:08

As part of an automated deployment I need a script to download the latest version of an artifact from our internal repository.

Ideally this script will be with ant or a

2条回答
  •  醉话见心
    2021-01-30 09:54

    You can use the Maven Dependency Plugin goal get together with LATEST as version for your artifact:

    mvn org.apache.maven.plugins:maven-dependency-plugin:2.8:get
        -DremoteRepositories=
        -Dartifact=::LATEST
        -Dpackaging=jar
        -Ddest=/.jar
    

提交回复
热议问题