yuicompressor maven plugin and maven-war-plugin

前端 未结 7 1362
走了就别回头了
走了就别回头了 2020-12-24 03:34

I\'ve been struggling with getting this plugin to play nicely with the maven-war-plugin for a couple of hours now and I thought it was time to ask for help. I have the plugi

7条回答
  •  囚心锁ツ
    2020-12-24 03:52

    The approach I use is a bit different.

    First, I've configured my IDE to run mvn process-resources before the compilation/packaging. This way the files are created before the war is assembled.

    It is very important to set false and ${basedir}/src/main/resources/ so the files can be created in the same directory without replacing your original source files.

     
        net.alchim31.maven
        yuicompressor-maven-plugin
        1.3.2
        
            false
            
                **/*-min.js
                **/*.min.js
                **/*-min.css
                **/*.min.css
            
            false
            false 
            ${basedir}/src/main/resources/ 
            false
        
    
        
            
                compress_js_css
                    process-resources
                
                    compress
                
            
        
    
    

提交回复
热议问题