Jar running error no main manifest attribute
Solution:
After investigation, it was found that it was pom.xml is not added in Maven project:
<packaging>jar</packaging>
And the following configurations:
<build>
<!--maven-->
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
<resources>
<!-- pom.xml resources -->
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.properties</include>
</includes>
</resource>
<resource>
<!-- The *.xml file in the java directory will also be packaged when the project is packaged -->
<directory>src/main/resources</directory>
</resource>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.xml</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>
</build>
Read More:
- [Solved] Jar error on Linux: no main manifest attribute
- [Solved] tomcat Startup Error: java.lang.SecurityException: Invalid signature file digest for Manifest main attributes
- Springboot Project: How to Introduces Local Jar Package
- [Solved] Maven Project Packaging Error: Unable to find main class
- Tomcat Run Error: Can‘t find catalina.jar [How to Solve]
- [Solved] Error running ‘tomcat:run‘: Cannot run program “tomcat:run“
- [Solved] Hadoop Error: Exception in thread “main“ java.io.IOException: Error opening job jar: /usr/local/hadoop-2.
- Failed to configure a DataSource: ‘url‘ attribute is not specified and no embedded datasource could [Solved]
- OTA Pack Compile Error: ExternalError: Failed to run signapk.jar: return code 1:Error: A JNI error has occurred
- Failed to scan osdt_cert.jar & osdt_core.jar [How to Solve]
- Problems and causes of Java’s main function format (public static void main (string args()))
- [Solved] Springboot Package jar and Startup Error: It was loaded from the following location
- Java Error: No enclosing instance of type Main is accessible. Must qualify the allocation with an encl
- [Solved] Failed to configure a DataSource: ‘url‘ attribute is not specified and no embedded datasource could
- Error assembling War: webxml attribute is required
- [Solved] Failed to configure a DataSource: ‘url‘ attribute is not specified and no embedded datasource
- [Solved] SpringBoot Microservices: Failed to configure a DataSource: ‘url‘ attribute is not specified and no embedded dat
- [Solved] jar file Execute Error: power shell error: unable to access jarfile
- idea Error: Failed to configure a DataSource: ‘url‘ attribute is not specified and no embedded datasource
- How to Solve JasperFillManager.fillReport Stuck issue (No Error and No Processing)