I have around 10 Selenium/Java projects in Eclipse IDE and there is “utils” package and Automation framework classes that i manually copied to all projects and all those have different versions or code in it.
So, like ‘ExcelReader.java” utility class in my Automation framework has 10 different copies, each one in separate Project folder/structure. Now, all my code is hosted in Azure DevOps Git repos and i use eGit eclipse plugin to commit/push changes.
How can i keep just one copy of “Utils” package in Git repos and all individual projects just use that one central copy directly into it and if one tester updates central copy then all projects can “fetch’ lastest code automatically.
AutomationProject1 -> Utils package/customized classes [All projects have different copies of same class]
AutomationProject2 -> Utils package/customized classes
AutomationProject3 -> Utils package/customized classes
AutomationProject4 -> Utils package/customized classes
AutomationProject5 -> Utils package/customized classes
Source: Read More