currently i have added maven profile concept to parent pom.xml which is creating custom client jars across the child modules.
But am getting default jar and client jars both, i need to get them separately on execution of maven package commnad, like mvn package -Pclient - only
client jars should be cretaed without default jars. Also i need to exclude or skip a module, please suggest.
My actual reuirement is i need to skip all the test packages from the child module 1 to 5, except child module 6. I need to create the module jars excluding test packages for 1to5 modules. So added the profile "client" in parent pom.xml, am able to get the custom jars but am also getting default jar with all the packages. jars are present in target folder.
Why don't you use the standard Maven layout for test packages? Don't put them in src/main/java, put them in src/test/java instead. Maven will automatically run your tests when you compile, and exclude them from the packaging. An added bonus is that your test classes can be in the same package as the classes they're testing (e.g. com.pages.abc), and they can test package private methods.