Is it possible to run a Bash script from Maven?

后端 未结 7 1748
無奈伤痛
無奈伤痛 2021-02-05 01:53

For creating configuration of my application I need to run bash script. Is it possible to integrate execution of Bash scripts in Maven, maybe there are some plugins?

7条回答
  •  无人及你
    2021-02-05 02:34

    Use the maven-antrun-plugin artifact. This way, you can execute several executables sequentially more easily than exec-maven-plugin. Example:

    * The tag is the important one here.

    
        org.apache.maven.plugins
        maven-antrun-plugin
        
            
                generate-sources
                
                    
                        
                            
                        
                        
                            
                        
                    
                
                
                    run
                
            
        
    
    

提交回复
热议问题