依赖:copy-dependencies包括插件依赖

时间:2013-12-24 07:30:56

标签: maven

如何复制项目的插件依赖项?我跑

mvn -DuseRepositoryLayout=true -DoutputDirectory=projectRepo dependency:copy-dependencies

但只复制了项目依赖项,因此脱机构建失败:

D:\proj>mvn package -offline -Dmaven.repo.local=projectRepo 
[INFO] Scanning for projects...
...
[ERROR] Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its 
dependencies could not be resolved: Cannot access central (http://repo.maven.ap
ache.org/maven2) in offline mode and the artifact org.apache.maven.plugins:maven
-resources-plugin:jar:2.6 has not been downloaded from it before. -> [Help 1]
...

1 个答案:

答案 0 :(得分:3)

尝试使用dependency:go-offline

  
    

解决所有项目依赖项的目标,包括插件和报告及其依赖项。