How to disable nexus-staging-maven-plugin in sub-modules

后端 未结 3 1138
无人共我
无人共我 2021-01-11 19:19

I\'m looking into replacing the maven-deploy-plugin with the nexus-staging-maven-plugin.

Now some of the sub-modules of my project (e.g. integration test modules) ar

3条回答
  •  北海茫月
    2021-01-11 20:22

    The easiest way I found to deal the limitations of nexus-staging-maven-plugin is to isolate any module you do not want to deploy into a separate Maven profile, and exclude it when a deploy occurs. Example:

    
        no-deploy
        
        
            
                !deploy
            
        
        
            test
            benchmark
        
    
    

    In the above example, I avoid building and deploying the "test" and "benchmark" modules. If you want to run unit tests without deploying them, use separate runs:

    mvn test
    mvn -Ddeploy deploy
    

提交回复
热议问题