简体   繁体   English

在Jenkins中使用Maven构建多模块项目

[英]Build Multi Module project with Maven in Jenkins

we're using jenkins and i'm wondering if it's possible to build all my modules using maven in 1 Job, our project structure is like this: 我们正在使用jenkins,我想知道是否有可能在1 Job中使用maven构建我的所有模块,我们的项目结构如下:

Web
├── Server
│   ├── moduleA
│   │   └── pom.xml <--- Module A POM
│   ├── moduleB
│   │   └── pom.xml <--- Module B POM
│   └── moduleC
│        └── pom.xml <--- Module C POM      
│
|──  Client 
        ├── Pom.xml       

The way we're working now is that we have a jenkins job for every module in Server and 1 jenkins job for client Side , is it possible to create only one job and build All the Client and Server modules ? 现在我们的工作方式是,对于服务器中的每个模块都有一个jenkins作业,对于客户端有1个jenkins作业,是否可以仅创建一个作业并构建所有的Client和Server模块?

you can create a parent pom that will contain all modules , than Jenkins will build this parent pom. 您可以创建一个包含所有模块的父pom,然后Jenkins将构建该父pom。

another option is to trigger several MVN commands ( but the first option is much better) 另一个选择是触发几个MVN命令(但第一个选择要好得多)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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