Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 789
Ajay Thankiah Avatar asked Jul 21 '26 19:07

Ajay Thankiah


1 Answers

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.
like image 102
Mustafa Demir Avatar answered Jul 24 '26 16:07

Mustafa Demir



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!