Switching branches in Git with external dependencies

Anyone had to solve the problems of switching git branches in a project with Maven (or any other external) dependencies? For example, suppose I have a maven dependency on one branch and not on another (or a different version is required). Do I have to re-import maven dependencies every time I switch branches, or is there a better approach?

+3


source to share


1 answer


It actually depends on the IDE you are using. I haven't noticed any problem with this when using IntelliJ IDEA. It handles any changes pom.xml

at the file system level very smoothly.



However, a while ago when I was using Eclipse, I believe I saw the kind of problem you are talking about. Then it became necessary to re-submit the Maven projects so that the IDE would be aware of the Maven model changes. I'm not sure how mature Eclipse support for Maven is these days.

+1


source







All Articles