java - 在单独的文件夹中获取所有库 jar
问题描述
我有 Maven Eclipse Java 项目。我想问 maven 将所有需要的库复制到aaa
文件夹 durinEclipse->Run->Run as->Maveven build-> package
进程。我为此目的配置了插件:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>prepare-package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/aaa</outputDirectory>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>false</overWriteSnapshots>
<overWriteIfNewer>true</overWriteIfNewer>
</configuration>
</execution>
</executions>
</plugin>
但是看起来添加这个插件在打包过程中没有任何动作,也没有创建文件夹和文件。如何解决这个问题呢?
解决方案
配置看起来不错。确保它在<build><plugins>
POM 的区域中,而不是在<pluginManagement>
.