依赖jar

http://maven.apache.org/plugins/maven-assembly-plugin/

可运行jar

脚本运行

POM

  1. <plugin>
  2. <groupId>org.apache.maven.plugins</groupId>
  3. <artifactId>maven-assembly-plugin</artifactId>
  4. <version>2.4</version>
  5. <configuration>
  6. <descriptors><!--描述文件路径-->
  7. <descriptor>src/main/assembly/assembly.xml</descriptor>
  8. </descriptors>
  9. </configuration>
  10. <executions><!--执行器 mvn assembly:assembly-->
  11. <execution>
  12. <id>make-assembly</id><!--名字任意 -->
  13. <phase>package</phase><!-- 绑定到package生命周期阶段上 -->
  14. <goals>
  15. <goal>single</goal><!-- 只运行一次 -->
  16. </goals>
  17. </execution>
  18. </executions>
  19. </plugin>
文档更新时间: 2019-06-21 12:02   作者:admin