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.
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