How to invoke the same maven build twice in one call

后端 未结 1 2031
醉话见心
醉话见心 2020-12-03 17:27

Is it possible to invoke the same maven build a number of times with different configuration parameters?

I have a maven build that creates a number RPMs with the rpm

1条回答
  •  长情又很酷
    2020-12-03 17:55

    I believe the only way to achieve that during one maven execution is to bind several executions of the plugin (with different configurations) to a lifecycle phase, like this:

    
        
            
                maven-surefire-plugin
                
                    
                        test
                        test-1
                        
                            ...
                        
                        test
                    
                    
                        test
                        test-2
                        
                            ...
                        
                        test
                    
                
            
        
        ...
    
    

    You can attach this configuration to some profile triggered by one property (e.g. by mvn package -Denvironment=all).

    0 讨论(0)
提交回复
热议问题