maven js css圧縮
5498 ワード
<build>
<finalName>arts</finalName>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<!-- delete dir="${basedir}/target/" />
<mkdir dir="${basedir}/target/drift/" /> -->
<copy todir="${basedir}/target/drift/">
<fileset dir="${basedir}/drift/">
<include name="**/*.*" />
</fileset>
</copy>
</tasks>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>yuicompressor-maven-plugin</artifactId>
<version>1.1</version>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>compress</goal>
</goals>
</execution>
</executions>
<configuration>
<encoding>UTF-8</encoding>
<jswarn>false</jswarn>
<!-- , , -->
<force>false</force>
<!-- , seajs false -->
<nomunge>true</nomunge>
<nosuffix>true</nosuffix>
<!-- -->
<linebreakpos>-1</linebreakpos>
<!-- , -->
<sourceDirectory>${basedir}/drift/</sourceDirectory>
<!-- js css -->
<includes>
<include>**/*.js</include>
<include>**/*.css</include>
</includes>
<!-- -->
<excludes>
<!-- , -->
<exclude>**/*.min.js</exclude>
<exclude>**/*.min.css</exclude>
<exclude>dist/js/ueditor/third-party/video-js/video.dev.js</exclude>
<exclude>script/ArtJS/lib/angular.js</exclude>
</excludes>
<!-- -->
<outputDirectory>${basedir}/target/drift</outputDirectory>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2.1</version>
<configuration>
<descriptors>
<descriptor>assembly.xml</descriptor>
</descriptors>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<?xml version="1.0" encoding="UTF-8"?>
<assembly
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
<id>static</id>
<includeBaseDirectory>false</includeBaseDirectory>
<formats>
<format>zip</format>
</formats>
<fileSets>
<fileSet>
<directory>${basedir}/target/drift/</directory>
<outputDirectory>/drift</outputDirectory>
<excludes />
</fileSet>
<fileSet>
<includes>
<include>${basedir}/*.*</include>
<include>${basedir}/activity/**</include>
<include>${basedir}/editor/**</include>
<include>${basedir}/order/**</include>
<include>${basedir}/search/**</include>
<include>${basedir}/svg/**</include>
<include>${basedir}/user/**</include>
<include>${basedir}/userLogin/**</include>
</includes>
<excludes>
<exclude>${basedir}/.settings</exclude>
<exclude>${basedir}/.idea</exclude>
<exclude>${basedir}/drift</exclude>
</excludes>
</fileSet>
</fileSets>
</assembly>