Files got overwritten in maven project when building a war

后端 未结 4 1785
时光取名叫无心
时光取名叫无心 2020-12-04 02:20

I\'m building a web application project using maven, and packaging is set to \"war\". I also use YUI compressor plugin to compress javascript codes in the webapp directory.

4条回答
  •  执念已碎
    2020-12-04 02:36

    Here is my solution, simply add an antrun plugin which updates the packaged war file using the processed outputs, which binds to the package phase:

            
                org.apache.maven.plugins
                maven-antrun-plugin
                
                    
                        package
                        package
                        
                            
                                
                                
                            
                        
                        
                            run
                        
                    
                
            
    

提交回复
热议问题