简体   繁体   English

如何使用Maven 1复制项目依赖项?

[英]How to copy project dependencies using maven 1?

Is there a way to copy dependencies of a project into some directory when maven 1 (not maven 2) is used as build tool? 当将maven 1(不是maven 2)用作构建工具时,是否可以将项目的依赖项复制到某个目录中?

I know that for Maven 2 there exists a dependency plugin but I cannot find one for maven 1. 我知道对于Maven 2,存在一个依赖插件,但是我找不到针对Maven 1的插件。

What is the simplest way to copy all dependency jars to a folder? 将所有依赖项jar复制到文件夹的最简单方法是什么?

You will have to use Jelly to do that, using something like this: 您将必须使用Jelly来执行此操作,如下所示:

<j:forEach var="lib" items="${pom.artifacts}">
    <ant:copy todir="${your.target.dir}" file="${lib.path}"/>
</j:forEach>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM