custom pom.xml filename in maven multimodule

前端 未结 3 1009
暗喜
暗喜 2021-01-04 10:00

I have a maven3 multimodule project, and for a strange reason i need to customize POM filename for one of my child module (ie: module-pom.xml)

Is it possible to conf

3条回答
  •  一个人的身影
    2021-01-04 10:32

    I would suggest to change the folder structure into the following.

    root (pom.xml)
      +-- closed-core
      +-- closed-web
      +-- closed-webserver
      +-- closed-spring
      +-- lgpl-reactor
             +-- lgpl-lib
             +-- lgpl-dist
             +-- lgpl-etc..
    

    Than you don't need a separte module-pom.xml file. You can work with pom.xml as default.

    If you wan't to build lgpl-reactory you can simply give:

    mvn -pl lgpl-reactory clean package 
    

    if you have dependencies within the other modules to lgpl you can use:

    mvn -am -pl lgpl-reactory clean package 
    

    This will build also all dependent modules.

提交回复
热议问题