【发布时间】:2020-12-27 05:19:26
【问题描述】:
我正在尝试将我的微服务推送到 nexus,同时部署到 openshift。
我的 pom 有这个:
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<classifier>exec</classifier>
</configuration>
</plugin>
这会导致在构建时创建两个 jar 文件。
my-service-exec.jar 我的服务.jar
我接受了https://docs.spring.io/spring-boot/docs/1.4.1.RELEASE/maven-plugin/examples/repackage-classifier.html 的建议,并在我的 pom 中添加了 exec 分类器
部署后和 pod 启动时,我看到以下错误消息:
ERROR Neither $JAVA_MAIN_CLASS nor $JAVA_APP_JAR is set and 2 JARs found in /deployments (1 expected)
并且 pod 没有启动。
非常感谢这方面的任何帮助。
【问题讨论】:
标签: java openshift maven-2 redhat kubernetes-helm