简体   繁体   English

Maven基于多模块项目构建多个rpm

[英]maven build multiple rpms basing on multimodule project

I'm trying to set up maven to build my project in the specific way. 我正在尝试设置Maven以特定方式构建我的项目。 I have the following structure: 我有以下结构:

  • pom.xml pom.xml
    • module1 模块1
      • pom.xml pom.xml
    • module2 模块2
      • pom.xml pom.xml
      • module2.1 模块2.1
        • pom.xml pom.xml
      • module2.2 模块2.2
        • pom.xml pom.xml
      • module2.3 模块2.3
        • pom.xml pom.xml

I actually want to build separate rpms based on module1, module2.2 and module2.3 and want all these rpms be included into root one. 我实际上想基于module1,module2.2和module2.3构建单独的rpm,并希望所有这些rpm都包含在root一中。 Could, please, anybody help me with that if there is any ways to do this using maven and it's plugin only. 如果有任何方法可以使用maven并且仅是插件,可以有人帮我解决这个问题。 Also I want this to be done via profiles, if it's possible. 另外,如果可能的话,我希望通过配置文件完成此操作。 All my tryings led me to nothing. 我所有的尝试使我一无所获。

Thanks in advance! 提前致谢!

It looks like you need the maven-assembly-plugin . 看来您需要使用maven-assembly-plugin You should use it and define <moduleSets/> in your assembly descriptor. 您应该使用它并在程序集描述符中定义<moduleSets/>

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

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