In Maven, can a profile override the modules (to not include any)

前端 未结 3 489
孤街浪徒
孤街浪徒 2021-01-11 16:39

In maven, once you define your modules in you pom.xml all profiles aggregate the modules defined in them: (relevant part only)

3条回答
  •  攒了一身酷
    2021-01-11 16:59

    While the question is old, Google still ranks it highly, so it makes sense to add a new answer.

    You can use the activation by absence of a property trick to achieve what you want.

    
            
            
                full-build
                
                    
                    
                        !skip-modules
                    
                
                
                    module1
                    module2
                    module3
                
            
    
            
            
                no-modules
                
                    
                    
                        skip-modules
                    
                
                
                
            
        
    

提交回复
热议问题