Maven工程java -jar时提示xxx-SNAPSHOT.jar中没有主清单属性

pom.xml中添加以下内容,再重新mvn compile即可

<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>

 

猜你喜欢

转载自blog.csdn.net/sxf1061700625/article/details/108111973