尝试将Maven-dependency-plugin与目标副本相关性
<project>[...]<build><plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> <executions> <execution> <id>copy-dependencies</id> <phase>package</phase> <goals> <goal>copy-dependencies</goal> </goals> <configuration> <outputDirectory>${project.build.directory}/alternateLocation</outputDirectory> <overWriteReleases>false</overWriteReleases> <overWriteSnapshots>false</overWriteSnapshots> <overWriteIfNewer>true</overWriteIfNewer> </configuration> </execution> </executions> </plugin></plugins></build>[...]</project>PS。
您是否知道maven和IDE集成(针对Eclipse pe)?Maven可以为特定的IDE生成项目,并将所有相关的jar包含为变量(指向本地存储库中的这些jar),因此无需将复制依赖项用于子文件夹。



