Closed Alice52 closed 11 months ago
packaging tag
dependencyManagement and dependencies
父 POM
maven 打包没有 jar, no main manifest attribute, in xx.jar 或者 SpringApplication ClassNotFound
parent
<build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <version>2.1.7.RELEASE</version> <executions> <execution> <goals> <goal>repackage</goal> </goals> </execution> </executions> </plugin> </plugins> </build>
common: 两个注释的地方2选1吧
两个注释的地方2选1吧
<!-- Failed to execute goal repackage failed: Unable to find main class -> [Help 1] --> <properties> <spring-boot.repackage.skip>true</spring-boot.repackage.skip> </properties> <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <!-- 可运行的 jar --> <configuration> <classifier>exec</classifier> </configuration> </plugin> </plugins> </build>
module: 正常使用
packaging tag
dependencyManagement and dependencies
父 POM
maven 打包没有 jar, no main manifest attribute, in xx.jar 或者 SpringApplication ClassNotFound
parent
common:
两个注释的地方2选1吧
module: 正常使用
Reference