简体   繁体   English

Maven部署插件/阴影插件:不要部署uber jar

[英]Maven deploy plugin/shade plugin: don't deploy uber jar

I'm trying to both build an uber jar using the maven shade plugin (to build a docker image) and also deploy the project jars to a maven repository. 我正在尝试使用maven shade插件构建一个超级jar(以构建docker映像),还将项目jar部署到一个maven存储库。 I do not want to deploy the uber jar to the maven repo. 我不想将uber jar部署到Maven存储库。 Therefore, either I need to be able to exclude a particular file from the maven deploy plugin, or, make the maven shade plugin put the uber jar in a different location so it is not picked up by the deploy plugin. 因此,要么我需要能够从maven deploy插件中排除特定文件,要么使maven shade插件将uber jar放在不同的位置,以便它不会被deploy插件接收。

Is either of these two things possible? 这两种事情都有可能吗?

You can define two profiles: the default profile with shade plugin, and the other profile for deploy - without shade plugin. 您可以定义两个配置文件:带阴影插件的默认配置文件,以及用于部署的另一个配置文件-不带阴影插件。 The deploy profile should also contain repository for deployment. 部署配置文件还应包含用于部署的存储库。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM