Step 1 : I have a Utils.jar that I have to include in my Project1. I need the Utils.jar to contain all the maven dependencies within itself so that I don't have to specify the same in Project1 pom.xml.
Step 2 : I need to create Project1.jar and include it in Project2. I again need a way such that I do not replicate the pom of Project1.jar in Project2 pom.xml. Also, I need the Project1.jar to include Utils.jar so that I don't have to add Utils.jar to Project2.
What is the right way to do this?
I looked into the Maven assembly plugin, but it requires specifying the Main class. I do not have a main class in my Utils project. I am not sure what I am missing.