我有Maven Eclipse Java项目。我想问一下maven将所有必需的库复制到aaa
文件夹durin Eclipse->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>
但是看起来添加此插件在打包期间不执行任何操作,也没有创建文件夹和文件。如何解决这个问题?
答案 0 :(得分:0)
配置看起来不错。确保它在POM的<build><plugins>
区域中,而不在<pluginManagement>
区域中。