js压缩打包

<!-- js压缩 -->
            <plugin>
                <groupId>net.alchim31.maven</groupId>
                <artifactId>yuicompressor-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>compress</id>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>compress</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <encoding>UTF-8</encoding>
                    <nosuffix>true</nosuffix>
                    <jswarn>false</jswarn>
                    <linebreakpos>-1</linebreakpos>
                    <excludes>
                        <exclude>**/*.min.js</exclude>
                        <exclude>**/*-min.js</exclude>
                    </excludes>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <configuration>
                    <warSourceExcludes>**/js/**,**/css/**</warSourceExcludes>
                </configuration>
            </plugin>

你可能感兴趣的:(js)