如何在不包含所有spring-boot库的情况下将spring-boot应用程序部署到nexus?

问题描述 投票:0回答:1

我正在寻找能够在nexus(我们公司的maven存储库)中部署spring-boot应用程序作为人工制品的能力。应用程序运行得非常好,我不想将其重构为标准的spring应用程序。

问题如下。通过执行~> maven deploymaven部署了target/transformation.excel.input-XXX.RELEASE.jar存档非常好。但:

  1. 部署jar非常重量级
  2. jar包含BOOT-INF/classes/com/ ...文件夹中的项目类。你可以在这里看到它:

enter image description here

从终端启动这个启动应用程序肯定是很好的,但在我的情况下它是不可接受的。

最重要的是

  1. 由于jar-archive的实际结构,第三个项目(它依赖于此transformation.input.excel-artefact)无法看到源类,编译器显示错误。

我相信有一些机会可以让nexus(maven)-repository更加舒适地使用spring-boot artefact。也许可以有一个jar-plugin解决方案,但我没有任何经验去做。

我非常感谢协助/帮助如何解决它。所以,有些时候我必须从终端运行这个应用程序,有时候应用程序可以用作功能提供者

对不起我的英语不好

问候

spring maven spring-boot jar nexus
1个回答
3
投票

解决方案在这里:

		 		<plugins>

		<plugin>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-maven-plugin</artifactId>
			<configuration>
				<classifier>exec</classifier>
			</configuration>
		</plugin>
© www.soinside.com 2019 - 2024. All rights reserved.