Fork me on GitHub

Code compression

The plugin supports code compression using YUI Compressor You can enable minification by settng the compress parameter to true:

<project>
   ...
   <build>
      <plugins>
         ...
         <plugin>
            <groupId>biz.gabrys.maven.plugins</groupId>
            <artifactId>css-splitter-maven-plugin</artifactId>
            <version>1.2.1</version>
            <executions>
               <execution>
                  <goals>
                     <goal>split</goal>
                  </goals>
                  <configuration>
                     <compress>true</compress>
                  </configuration>
               </execution>
            </executions>
         </plugin>
      </plugins>
   </build>
<project>

Additionaly you can set the column number after which the plugin will insert a line break by settng the compressLineBreak parameter. From YUI Compressor documentation:

Some source control tools do not like files containing lines longer than, say 8000 characters. The line break option is used in that case to split long lines after a specific column.
<project>
   ...
   <build>
      <plugins>
         ...
         <plugin>
            <groupId>biz.gabrys.maven.plugins</groupId>
            <artifactId>css-splitter-maven-plugin</artifactId>
            <version>1.2.1</version>
            <executions>
               <execution>
                  <goals>
                     <goal>split</goal>
                  </goals>
                  <configuration>
                     <compress>true</compress>
                     <compressLineBreak>100</compressLineBreak>
                  </configuration>
               </execution>
            </executions>
         </plugin>
      </plugins>
   </build>
<project>