maven: generating several “artifacts” with a same pom file?

后端 未结 4 1935
栀梦
栀梦 2021-01-04 11:30

I have a project here which, currently, uses one pom.xml (link) to generate one \"artifact\".

What I\'d like to do is split the project, let\'s call it p, into:

4条回答
  •  情话喂你
    2021-01-04 11:58

    You should create two separated projects (two separated POMs), but probably a good idea would be to create common parent for them that also aggregate them as modules. Look at Project Inheritance and Project Aggregation sections of Introduction to the POM for some basics.

    In Maven, it's never a good idea to try to hack it so it produces many different artifacts from one POM.

提交回复
热议问题