Chr*_*ach 28 maven-plugin maven-3 maven
我想在命令行下载工件及其依赖项.即
mvn [some plugin]:[goal] -DartifactId=[artifactId] -DgroupId=[groupId] -Dversion=[version]
Run Code Online (Sandbox Code Playgroud)
我尝试过mvn依赖:get但这似乎需要一个远程存储库列表.我希望mvn使用settings.xml中已经指定的内容
我也尝试了maven-download-plugin但这似乎没有正常工作(它尝试下载xerces-impl作为ant的传递依赖并且无法解决它.xerces-impl和ant都不是我的工件的依赖项).
非常感谢您的帮助.
Gil*_*ili 37
这里的copy目标更合适,它也允许您指定输出目录(在get目标中已弃用):
mvn org.apache.maven.plugins:maven-dependency-plugin:2.8:copy -Dartifact=groupId:artifactId:version[:packaging][:classifier] -DoutputDirectory=[target] -Dmdep.useBaseVersion=true
mdep.useBaseVersion=true 将从快照构建中删除时间戳.
Guy*_*Guy 23
尝试使用最新版本的依赖项:get,它适用于我
mvn org.apache.maven.plugins:maven-dependency-plugin:2.4:get -DartifactId=[artifactId] -DgroupId=[groupId] -Dversion=[version]
Run Code Online (Sandbox Code Playgroud)
适合我
| 归档时间: |
|
| 查看次数: |
35727 次 |
| 最近记录: |