multi artifact id in one pom

后端 未结 4 1526
不知归路
不知归路 2021-01-22 04:00

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         


        
4条回答
  •  迷失自我
    2021-01-22 04:36

    I am not sure if there is a possibility of having two tags in one POM, since it is unique. What you may do is, you can have two pom files, say, pom.xml, and pom_impl.xml, now

    • to deploy client do, mvn package deploy
    • to deploy impl do, mvn -f pom_impl.xml package deploy

    Never tried though.


    Clarification: The question seem ambiguous, seems like you have one project but you wanted to generated two artifacts (client, and impl) of the same code-base. On reading it again, I feel like you have two projects (two different code base) but you just wanted to unify it so that it behaves as two modules of the same project. My answer assumes the first case.

提交回复
热议问题