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:
- [Maven] maven filtering OTS parsing error incorrect file size in WOFF head [Two Methods to Solve]
- Springboot Project: How to Introduces Local Jar Package
- [Solved] SpringBoot Pack Project: Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources
- [Solved] ‘build.plugins.plugin.version‘ for org.springframework.boot:spring-boot-maven-plugin is missing.
- [Solved] Spring Boot Package Error: Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0
- [Solved] ### Error building SqlSession. ### The error may exist in com/atguigu/dao/SysUserMapper.xml ### Caus
- [Solved] SpringBoot Error: Property ‘mapperLocations‘ was not specified.
- [Solved] Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.4:install (default-cli) on
- Maven plugin development report error- plugin:3.2 :descriptor fai
- Resources is configured in the build of Maven project to prevent the failure of resource export
- [Solved] Failed to start bean ‘documentationPluginsBootstrapper’; nested exception is java.lang.NullPointerException
- How to Solve Mybatis error: invalid bound statement (not found)
- maven.TestGenerateMojo.execute(TestGenerateMojo.java:65) [How to Solve]
- Failed to configure a DataSource: ‘url‘ attribute is not specified and no embedded datasource could [Solved]
- [Solved] jooq Customize GeneratorStrategy Error: ClassNotFoundException
- [Solved] The war package Error: The reason why the XSD file could not be found
- [How to Solve] Invalid bound statement (not found)
- [Solved] Error:java: Compilation failed: internal java compiler error
- Errorjava Compilation failed internal java compiler error [Solved]
- [Solved] O2oa compile error: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin