springboot 打包jar 无法运行
maven 包
https://mvnrepository.com/.
https://central.sonatype.com/artifact/co.elastic.apm/apm-agent-api
jar xf rlogin-kpi-report-batch-0.0.1-SNAPSHOT.jar META-INF/MANIFEST.MF && cat META-INF/MANIFEST.MF
没有:
Manifest-Version: 1.0
Main-Class: com.example.MainClass
添加了plugins没有生效
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.6.0</version>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
<configuration>
<mainClass>com.yourcompany.rlogin.kpi.report.MainClass</mainClass>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
强刷依赖也不好用:../maven3.6/bin/mvn clean install -U
可以使用../maven3.6/bin/mvn clean package spring-boot:repackage 打包

浙公网安备 33010602011771号