Maven 项目生成jar运行时提示“没有主清单属性”
Maven 项目生成jar运行时提示“没有主清单属性”
学习了:https://blog.csdn.net/cloume/article/details/51969740
<build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId> <version>1.2.1</version> <executions> <execution> <phase>package</phase> <goals> <goal>shade</goal> </goals> <configuration> <transformers> <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> <mainClass>com.cloume.project.App</mainClass> </transformer> </transformers> </configuration> </execution> </executions> </plugin> </plugins> </build>