maven 压缩js

<profile>
            <id>env.production</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-war-ant-plugin</artifactId>
                        <!-- configuration -->
                        <configuration>
                            <target>
                                <taskdef name="compress" classname="com.meizu.tools.yuicompress.YUICompressTask"/>
                                <compress linebreak="150" warn="false" 
                                    munge="false" charset="UTF-8" 
                                    skipError="false" preserveallsemicolons="true"
                                    outputfolder="${project.build.directory}/${project.artifactId}-${project.version}/yard/min">
                                     <fileset dir="${project.build.directory}/${project.artifactId}-${project.version}/yard">
                                        <include name="**/*.js" />
                                    </fileset>
                                </compress>                        
                            </target>
                        </configuration>
                    </plugin>
                    
                </plugins>
            </build>
        </profile>

 

posted @ 2013-10-15 11:00  J呆兔  阅读(445)  评论(0编辑  收藏  举报