最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

java - How can maintain two maven projects individually in two separate folder with same dependency library? - Stack Overflow

programmeradmin4浏览0评论

I would like to have two independent maven projects in two different folder like c:\test\ProjectOne and c:\test\ProjectTwo. In both maven project i would like to have a dependency library, for eg; selenium, with two different versions. In ProjectOne, would want to have selenium with version 3.141.0 and in ProjectTwo, would want to have selenium with version 4.26.0. As even though both are two different maven projects,

  1. will it be a problem to have this kind of setup?
  2. As our maven dependencies will be in our c:\user\<user>\.m2 folder, how does both the projects selenium version will be present. Will it override one over other? or does it harm in any of the projects?

please help me understand the logic here.

I would like to have two independent maven projects in two different folder like c:\test\ProjectOne and c:\test\ProjectTwo. In both maven project i would like to have a dependency library, for eg; selenium, with two different versions. In ProjectOne, would want to have selenium with version 3.141.0 and in ProjectTwo, would want to have selenium with version 4.26.0. As even though both are two different maven projects,

  1. will it be a problem to have this kind of setup?
  2. As our maven dependencies will be in our c:\user\<user>\.m2 folder, how does both the projects selenium version will be present. Will it override one over other? or does it harm in any of the projects?

please help me understand the logic here.

Share Improve this question asked Mar 19 at 16:12 mmarmmar 2,0408 gold badges30 silver badges47 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 2

No, it will not be a problem with your setup. You can have the setup like you have mentioned with 2 separate projects.

Each project will have it's own pom.xml, describing the dependencies necessary for those projects respectively, so you will have versions defined in each of their own pom files.

Your local repository

c:\user\<user>\.m2

can have multiple versions, they get anized under folders with version number. Good luck!

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论