1第一步:idea中指定Main方法
具体步骤:file->project structrue->Aritifacts->±>jar->from models with dependencies。截图如下
第二步:pom文件中指定主程序入口
应该就没问题了
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>cn.edu.bjtu.Main</mainClass>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>