在工程的pom文件里加上下面plugin, 然后执行mvn clean package -Dmaven.test.skip=true
命令,就可以lib包收集起来了
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> <version>3.0.1</version> <executions> <execution> <id>copy-dependencies</id> <phase>package</phase> <goals> <goal>copy-dependencies</goal> </goals> <configuration> <outputDirectory>lib</outputDirectory> <overWriteSnapshots>true</overWriteSnapshots> </configuration> </execution> </executions> </plugin>