Is there a way to separate long running (e.g. stress tests) out so they're not run by default in Maven 2?

后端 未结 4 1462
难免孤独
难免孤独 2021-02-02 03:12

We\'ve had an ongoing need here that I can\'t figure out how to address using the stock Maven 2 tools and documentation.

Some of our developers have some very long runni

4条回答
  •  孤独总比滥情好
    2021-02-02 03:35

    Adding to krosenvold's answer, to ensure no unexpected behavior, make sure you also have a default profile that is active by default that excludes the integration or stresstests you want to run in your special profile.

    
        normal
        
            
                
                    org.apache.maven.plugins
                    maven-surefire-plugin
                    
                        
                            **/**/*IntTest.java
                        
                    
                
            
        
        
            true
        
    
    

    You will need to create a profile like this, simply listing the surefire-plugin outside of a profile will override the profile should it be selected with:

    mvn -P integrationtest clean install
    

提交回复
热议问题