简体   繁体   中英

How to create executable jar file from springboot - maven application?

When I tried to create a jar file using maven plugin in eclipse, I got thus error while trying to execute that jar:

Exception in thread "main" java.lang.IllegalStateException: Failed to get nested archive for entry BOOT-INF/lib/spring-boot-starter-actuator-2.0.3.RELEASE.jar

This seems to be a bug in 2017. Is there any solution for this now?

Your executable jar file doesn't contain above jar file.You should build jar with dependencies.

  • Right click project then click ' Run As '
  • Maven Build
  • And you should type ' package ' in input area then run .
  • /path/your/project/target/ there is your .jar file with dependencies.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM