maven插件,对js、css进行压缩插件配置:
<plugin> <groupId>net.alchim31.maven</groupId> <artifactId>yuicompressor-maven-plugin</artifactId> <version>1.3.0</version> <executions> <execution> <goals> <goal>compress</goal> </goals> </execution> </executions> <configuration> <encoding>UTF-8</encoding> <!-- 忽略 js 错误警告 --> <jswarn>false</jswarn> <nosuffix>true</nosuffix> <linebreakpos>-1</linebreakpos> <includes> <include>js/**/*.js</include> <include>css/**/*.css</include> </includes> <excludes> <exclude>**/**min.js</exclude> <exclude>js/ba/**/*.js</exclude> </excludes> </configuration> </plugin>