I need to create a dependent maven project. The child one should be a jar, that would be called by the parent project which should be a war file. The steps should be like this. When I build the war, it should automatically build the jar file and include it and build the war and show output of the child jar (suppose a simple print statement).
Note: Build should be done only once and that is for building the final war. Need to edit the pom.xml accordingly.
I am new to maven,so a bit elaborate solution would be very helpful.