Hot to disable buildnumber-maven-plugin through cmd

前端 未结 4 745
故里飘歌
故里飘歌 2021-01-18 20:02

I have question about maven. How can I disable buildnumber-maven-plugin through command line option. I want to run \"mvn test\" command on our continuous integration server,

4条回答
  •  我在风中等你
    2021-01-18 20:40

    One approach would be to use a property in your pom to specify the execution phase of the build number plugin, as shown below.

    
      ..
      
        validate
        ..
      
      ..
      
        
          org.codehaus.mojo
          buildnumber-maven-plugin
          1.2
          
            
              ${buildnumber.plugin.phase}
              
                create
              
            
          
          
            ..
          
        
      
      ..
    
    

    Then provide the property on the command line to disable the plugin, as shown in the following example.

    mvn install -Dbuildnumber.plugin.phase=none
    

提交回复
热议问题