[Solved] Jar error on Linux: no main manifest attribute

1: Running jar package in Linux environment, unable to find main

Reason: pom is missing configuration

Add the following to the pom file

<build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>repackage</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

Read More: