"no main manifest attribute" when trying to execute a fat jar

I have a simple spring-boot microservice project and am trying to deploy it to my maven repository.

When I create a jar file through

gradlew build

I can fulfill my fat can with

java -jar build/libs/tws-0.1.1-SNAPSHOT.jar

However, when I upload the jar to artifactory, via uploadArchives, this is the contents of my MANIFEST.MF:

Manifest-Version: 1.0

There is something wrong with Obvioulsy, and when I load an artifact and try to execute it, I get the error message "There is no main attribute of the manifest."

When I look at the uploadArchives debug log, I see that the jar has been rebuilt, and it may be that the spring boot plugin for gradle is somehow shorted out in this process.

+4
source share
1

gradle uploadArchives gradle build, , bootRepackage .

spring -boot gradle, bootRepackage jar:

https://github.com/spring-projects/spring-boot/issues/1113

gradle script:

uploadArchives.dependsOn bootRepackage
+3

Source: https://habr.com/ru/post/1548052/


All Articles