Skip to content

K0zka/maven-contentgzip-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

maven-contentgzip-plugin

A static content compressor for maven web applications. It runs through your web application at build time and compresses some of the static content, creating a .gz file for each such resource.

This allows the browsers to download compressed content, which saves bandwidth and more importantly saves time for the user and improves the overall experience of the webapplication.

Some of webjars also have this enabled and your webjar-packaged libraries will be compressed as well.

Container support

  • In jetty the support is built into the default servlet for quite some time and it is enalbled by default.
  • In tomcat support for compressed content first appeared in 8.0 and not enabled by default, you have to enable it in order to use it!

Basic usage

<build>
        <plugins>
                <plugin>
                        <groupId>com.github.K0zka</groupId>
                        <artifactId>maven-contentgzip-plugin</artifactId>
                        <version>0.0.7</version>
                        <executions>
                                <execution>
                                        <phase>prepare-package</phase>
                                        <goals><goal>process</goal></goals>
                                </execution>
                        </executions>
                </plugin>
        </plugins>
</build>

The default configuration compresses the following file types:

  • css
  • txt
  • htm,html
  • js
  • xml,xls
  • ico
  • pdf
  • doc

About

A static content compressor for maven web applications

Resources

Stars

Watchers

Forks

Packages

No packages published