0
点赞
收藏
分享

微信扫一扫

maven编译正常,运行报错:中没有主清单属性

maven编译正常,运行报错:中没有主清单属性_apache

 

maven编译正常,运行报错:中没有主清单属性_apache_02

 

 

 在pom.xml添加插件

<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.xxx.spider.Main</mainClass>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>

maven编译正常,运行报错:中没有主清单属性_maven_03

 

执行命令重新编译:

@echo off
mvn package -DskipTests
pause

 

 编译生成文件

maven编译正常,运行报错:中没有主清单属性_apache_04

 

举报

相关推荐

0 条评论