How can I display a message in Maven

前端 未结 4 1738
佛祖请我去吃肉
佛祖请我去吃肉 2021-02-01 12:17

How can I display a message in Maven?

In ant, we do have \"echo\" to display a message, but in maven, how can I do that?

4条回答
  •  孤街浪徒
    2021-02-01 12:32

    You can use Groovy Maven Plugin for this.

                                                             
        org.codehaus.gmaven                       
        groovy-maven-plugin                 
        2.0                                       
                                                         
                                                          
                validate                              
                                                              
                    execute                             
                                                             
                                                      
                                                             
                        log.info('Test message: {}', 'Hello, World!')
                                                            
                                                     
                                                         
                                                        
                                                            
    

    The configuration above will produce the following output:

    [INFO] Test message: Hello, World!
    

提交回复
热议问题