如何将项目的运行时依赖项复制到target/lib文件夹中?
target/lib
现在,mvn clean install该target文件夹仅包含我项目的jar,但没有包含任何运行时依赖项。
mvn clean install
target
这对我有用:
<project> ... <profiles> <profile> <id>qa</id> <build> <plugins> <plugin> <artifactId>maven-dependency-plugin</artifactId> <executions> <execution> <phase>install</phase> <goals> <goal>copy-dependencies</goal> </goals> <configuration> <outputDirectory>${project.build.directory}/lib</outputDirectory> </configuration> </execution> </executions> </plugin> </plugins> </build> </profile> </profiles> </project>