如何解决带有自定义父POM的Spring Boot Thin Jar
我一直在尝试使用Spring Boot瘦罐子,在本地它很好用,JAR的大小很小,但是当我将服务JAR部署到远程服务器时,它没有用。我读过一篇文章,如果您想使其工作,那么POM必须继承Spring Boot Parent,并且我正在使用Custom parent pom,在远程服务器上它说未找到POM(parent pom)。 Thin Jar和Maven Boot的配置如下
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<release>11</release>
</configuration>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${spring-boot.version}</version>
<configuration>
<executable>true</executable>
</configuration>
<dependencies>
<dependency>
<groupId>org.springframework.boot.experimental</groupId>
<artifactId>spring-boot-thin-layout</artifactId>
<version>1.0.25.RELEASE</version>
</dependency>
</dependencies>
</plugin>
此POM如下继承父级
<parent>
<artifactId>delivery-drivers</artifactId>
<groupId>com.delivery</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>drivers-service</artifactId>
父级从Spring Boot Parent继承如下
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.3.1.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.delivery</groupId>
<artifactId>delivery-drivers</artifactId>
<packaging>pom</packaging>
<version>1.0-SNAPSHOT</version>
<modules>
<module>drivers-api</module>
<module>drivers-service</module>
</modules>
以下是服务器错误
[FATAL] Non-resolvable parent POM for com.delivery:drivers-service:[unknown-version]: Could not find artifact com.delivery:delivery-drivers:pom:1.0-SNAPSHOT in spring-snapshots (https://repo.spring.io/libs-snapshot) @ line 5,column 13
对于项目com.farsh:drivers-service:[unknown-version]
有什么建议解决此问题吗?
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。