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
I would like to add the configuration which worked for me:
First, to fix m2e complaining about the 'Plugin execution not covered by lifecycle' I added the following in the parent pom taken from this post:
org.eclipse.m2e
lifecycle-mapping
1.0.0
net.alchim31.maven
yuicompressor-maven-plugin
[1.0.0,)
compress
Then in the war pom I put:
net.alchim31.maven
yuicompressor-maven-plugin
1.4.0
compress
300
**/*-min.js
**/*.min.js
**/*-min.css
**/*.min.css
true
maven-war-plugin
2.4
**/*.css,**/*.js
This generates the minified css and js files in the project build target directory while excluding the original files.
I hope this saves someone time.