简体   繁体   中英

Use Maven to aggregate projects

I am asking about parent pom etc. I have one or more common kind of projects.. let's call them C1, C2, ... . 问父pom等。我有一个或多个常见项目。我们称它们为C1,C2,...。 I have some projects with use these common projects. Let's call them P1, P2, ... These projects P... have common maven dependencies. I want to extract it into a separate pom rather than repeat it. I am not interested in parent pom solution. IMO parent pom is when you run a single build in parent, and it builds all children which are related.. eg a war, a common jar, a rest jar, a data access jar, a buss logic jar etc. My projects P... are independent of each other. So I want to to a common pom. 常见的pom。 How to do? Thanks.

Extract your P... projects common dependencies into another Maven project. Then add this new project into your of your P... projects with type pom and scope import.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM