2017年9月6日 | Leave a comment 问题: 解决: 加入 maven-dependency-plugin ,然后执行 mvn clean install package 就会在target/lib 看到所有依赖 jar <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> <version>2.1</version> <executions> <execution> <id>copy-dependencies</id> <phase>package</phase> <goals> <goal>copy-dependencies</goal> </goals> <configuration> <outputDirectory>target/lib</outputDirectory> </configuration> </execution> </executions> </plugin> </plugins> </build> 123456789101112131415161718192021 <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> <version>2.1</version> <executions> <execution> <id>copy-dependencies</id> <phase>package</phase> <goals> <goal>copy-dependencies</goal> </goals> <configuration> <outputDirectory>target/lib</outputDirectory> </configuration> </execution> </executions> </plugin> </plugins> </build> 参考: http://liugang594.iteye.com/blog/2093082