There is a maven project(jar), but now it needs to be spilt into two artifacts
I want to have two maven artifact like following
xxx>
This is called "multi module project" in the Maven world. You can find information on how to do this e.g. here. Indeed you need two separate POMs and an additional one to combine both.