yuicompressor maven plugin and maven-war-plugin

前端 未结 7 1398
走了就别回头了
走了就别回头了 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 04:00

    As Jakob Kruse say, you must deal with the *.js, but no *.min.js, so my configurations is below, please notice the use of %regex[] :

    			
    			    net.alchim31.maven
    			    yuicompressor-maven-plugin
    			    1.4.0
    			    
    			        
    			            compressyui
    			            process-resources
    			            
    			                compress
    			            
    			            
    			                true
    			                ${basedir}/WebContent
    			                ${project.build.directory}/min
    			                false		
    				        
    				            **/*-min.js
    				            **/*.min.js
    				            **/*-min.css
    				            **/*.min.css
    
    				            **/jquery.window.js
    				            ......
    				            **/compile.js
    				        
    			            
    			        
    			    
    			
    
    			
    				org.apache.maven.plugins
    				maven-war-plugin
    				2.4
    				
    					WebContent					
    					servlet-api*.jar,target/test-classes/*
    					test/**,%regex[.*(!min).js],%regex[.*(!min).css]
    				
    					
     					            
    					                ${project.build.directory}/min
    					            
    					
    				
    				
    			

提交回复
热议问题