How to activate a Maven profile per pom.xml?

前端 未结 3 1930
后悔当初
后悔当初 2021-01-27 02:39

I have a large Maven project with one master module and lots of children, organized in a nice tree structure. However, some of the modules need special settings which would caus

3条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-27 03:14

    If you want to configure maven profile for each project(module) then you have to add profile setting in the project(module) pom.xml file

    
      
        
          1.4
        
        
      
    
    

    Also if you do not want to execute some profile then you have to add

        mvn groupId:artifactId:goal -P !profile-1,!profile-2
    

    in the project pom.xml file

提交回复
热议问题