To Compress every js and css files and generate a gzipped version (gzip option doesn't remove input file):
<project> ... <build> <plugins> ... <plugin> <groupId>net.alchim31.maven</groupId> <artifactId>yuicompressor-maven-plugin</artifactId> <executions> <execution> <goals> <goal>compress</goal> </goals> </execution> </executions> <configuration> <gzip>true</gzip> </configuration> </plugin> ... </plugins> </build> ... </project>