Background:
I have multiple projects that utilize the same logic across their business so I decided to split the shared part and reference it in both projects.
Example:
Suppose there is an HR application and an Accounting application that require a shared business in this case let's say count hours which is part of calculations class (let's call it calc).
Both applications (HR & Accounting) have their own repository on gitlab. Also have independent deployment and utilize the calc package which is uploaded on nexus repository.

Question:
I would like to know if there is a way to find projects using calc package through the package name across the repositories.
If you have the projects that you want checked out locally, you could find the dependency-tree for each project:
mvn depedency:tree
This gives you all the (transitive) dependencies that are used the projects. If you do this for each project and then grep your package-name, this should find you all projects that use it, or at least have a dependency on it.
I am not sure how to calculate dependencies through package names. But:
/META-INF/maven/*/*/pom.xml and check the dependenciesEither way you should be able to find jar files making use of Calc.
There is no way to ask Calc where it got used from.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With