[英]Maven build 2 versions of war with different versions of dependencies
I have a maven war project which needs to be build with different versions of a dependency due to target environments.我有一个 maven 战争项目,由于目标环境,该项目需要使用不同版本的依赖项进行构建。
Currently I am doing it with maven profiles(having different versions of dependency as property).目前我正在使用 maven 配置文件(具有不同版本的依赖项作为属性)。
Below are the issues currently having:以下是目前遇到的问题:
I saw below solution but it needs to create separate modules: EAR with WARs containing different versions of dependencies我看到了下面的解决方案,但它需要创建单独的模块: EAR with WARs contains different versions of dependencies
Create a multi-module project that contains two WAR modules and an additional commons
module that contains all the common code.创建一个包含两个 WAR 模块和一个包含所有公共代码的附加commons
模块的多模块项目。
This allows you to create two very similar WARs in one build.这允许您在一个构建中创建两个非常相似的 WAR。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.