[Solved] Error: Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.4.4:repackage (repackage)

If you have come across this error when trying to build and deploy your Spring Boot Maven application then this post will help you! Error: Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.4.4:repackage (repackage) How to fix the Repackage Execute Goal Error You need to make sure you have the mainClass explicitly defined under your build->plugin as follows: <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration> <mainClass>com.example.apps.YourApplication</mainClass> </configuration> </plugin> </plugins> </build>

May 8, 2021 · 1 min · 66 words · Andrew

Spring Boot no main manifest attribute, in

You have created a ./target/.jar and have tried to run it using java -jar <app>.jar yet receive a spring boot no main manifest attribute, in <app>.jar error. Good thing is that this is really easy to solve! You can generate your jar as follows instead: mvn package spring-boot:repackage Or you could adjust your pom.xml so that you can generate your jar using a simple mvn package: <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration> <mainClass>com....

March 26, 2021 · 1 min · 94 words · Andrew