# yuicompressor-maven-plugin **Repository Path**: mirrors_codelibs/yuicompressor-maven-plugin ## Basic Information - **Project Name**: yuicompressor-maven-plugin - **Description**: No description available - **Primary Language**: Unknown - **License**: Unlicense - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-11-19 - **Last Updated**: 2026-04-11 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # YUI Compressor Maven Plugin [![CI](https://github.com/codelibs/yuicompressor-maven-plugin/actions/workflows/ci.yml/badge.svg)](https://github.com/codelibs/yuicompressor-maven-plugin/actions/workflows/ci.yml) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.codelibs.maven/yuicompressor-maven-plugin/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.codelibs.maven/yuicompressor-maven-plugin) [![License: Unlicense](https://img.shields.io/badge/license-Unlicense-blue.svg)](https://unlicense.org/) ## Overview Maven plugin to compress (minify/obfuscate/aggregate) JavaScript and CSS files using [YUI Compressor](http://yui.github.io/yuicompressor/). This project is a fork of [net.alchim31.maven:yuicompressor-maven-plugin](https://github.com/davidB/yuicompressor-maven-plugin) maintained by the [CodeLibs Project](https://www.codelibs.org/) for continued development and modern Maven support. ## Features - **JavaScript Compression**: Minification and obfuscation using YUI Compressor - **CSS Compression**: Minification of CSS files - **JSLint Integration**: Validate JavaScript files during build - **File Aggregation**: Concatenate multiple files before or after compression - **GZIP Support**: Automatically create gzipped versions - **Incremental Builds**: IDE integration with M2E incremental build support - **Selective Compression**: Skip already-minified files - **Compression Statistics**: Optional reporting of compression ratios ## Requirements - Maven 3.8.8 or later - Java 11 or later ## Usage ### Basic Configuration Add the plugin to your `pom.xml`: ```xml org.codelibs.maven yuicompressor-maven-plugin 2.0.0-SNAPSHOT compress ``` ### Configuration Options #### Common Parameters | Parameter | Default | Description | |-----------|---------|-------------| | `encoding` | UTF-8 | File encoding | | `suffix` | -min | Output filename suffix | | `nosuffix` | false | Skip suffix addition | | `linebreakpos` | -1 | Line break position | | `force` | false | Force recompression | | `gzip` | false | Create gzipped versions | | `statistics` | true | Show compression statistics | #### JavaScript-Specific Parameters | Parameter | Default | Description | |-----------|---------|-------------| | `nocompress` | false | Skip compression (copy only) | | `nomunge` | false | Minify only, no obfuscation | | `preserveAllSemiColons` | false | Keep unnecessary semicolons | | `disableOptimizations` | false | Disable micro optimizations | | `jswarn` | true | Display JavaScript warnings | ### Examples #### Compress with Custom Suffix ```xml .compressed ``` #### Create GZIP Versions ```xml true 9 ``` #### File Aggregation ```xml ${project.build.directory}/all.js file1.js file2.js true ``` #### JSLint Validation ```xml jslint ``` ## Build Instructions ### Prerequisites - JDK 11 or later - Maven 3.8.8 or later ### Build Commands ```bash # Build the plugin mvn clean install # Run tests mvn test # Run integration tests mvn verify # Skip tests mvn install -DskipTests # Generate site documentation mvn site ``` ## Migration from net.alchim31.maven If you're migrating from `net.alchim31.maven:yuicompressor-maven-plugin`, simply update your `pom.xml`: ```xml net.alchim31.maven yuicompressor-maven-plugin 1.5.1 org.codelibs.maven yuicompressor-maven-plugin 2.0.0-SNAPSHOT ``` All configuration options remain compatible. ## Issues Found a bug or have a feature request? Please report it to the [issue tracker](https://github.com/codelibs/yuicompressor-maven-plugin/issues). ## Contributing Contributions are welcome! Please feel free to submit a Pull Request. ## Credits ### Original Authors - [David Bernard](https://github.com/davidB) - Original author - [Piotr Kuczynski](https://github.com/pkuczynski) - Contributor ### CodeLibs Maintainers - [Shinsuke Sugaya](https://github.com/shinsuke-sugaya) - Lead maintainer ## License This project is released into the public domain under [The Unlicense](https://unlicense.org/). ## Links - [CodeLibs Project](https://www.codelibs.org/) - [YUI Compressor](http://yui.github.io/yuicompressor/) - [Original Project](https://github.com/davidB/yuicompressor-maven-plugin)