About
This plugin compiles Less files to CSS stylesheets using extended version of the LessCSS Compiler.
The plugin was developed as an alternative version of the org.lesscss:lesscss-maven-plugin (by Marcel Overdijk) which is compatible with Less 1.7.5. It resolves all problems with imports options and adds extra features:
- two compiler types for lower disk usage
- inserts sources paths to CSS stylesheets (assists work on large files)
Read a migration page for information how to switch from the org.lesscss:lesscss-maven-plugin to this plugin.
Goals Overview
- lesscss:compile - compiles Less files to CSS stylesheets
Requirements
The plugin to run requires:
- Java 5.0 or higher
- Maven 2.0.11 or higher
Usage
General instructions on how to use the LessCSS Maven Plugin can be found on the usage page. Some more specific use cases are described in the examples given below. Last but not least, users occasionally contribute additional examples, tips or errata to the plugin's wiki page.
In case you still have questions regarding the plugin's usage, please have a look at the FAQ.
If you feel like the plugin is missing a feature or has a defect, you can fill a feature request or bug report in the issue tracker. When creating a new issue, please provide a comprehensive description of your concern. Especially for fixing bugs it is crucial that the developers can reproduce your problem. For this reason, entire debug logs, POMs or most preferably little demo projects attached to the issue are very much appreciated. Of course, patches are also welcome. Contributors can check out the project from the source repository and will find supplementary information in the guide to helping with Maven.
License
The plugin is distributed under open source and commercial friendly "BSD 3-Clause" license:
Copyright (c) 2015, Adam GabryĆ All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the gabrys.biz nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Download
You can download the plugin from docs pages or using various dependency management tools:
Example for Maven:
<project> ... <build> <plugins> ... <plugin> <groupId>biz.gabrys.maven.plugins</groupId> <artifactId>lesscss-maven-plugin</artifactId> <version>1.2.1</version> <executions> <execution> <id>default-compile</id> <goals> <goal>compile</goal> </goals> <configuration> <!-- put your configurations here --> </configuration> </execution> </executions> </plugin> </plugins> </build> <project>
Examples
To provide you with better understanding of some usages of the LessCSS Maven Plugin, you can take a look into the following examples:
- Using include/exclude patterns
- Multiple source/output directories
- Sources located only on local hard drive
Versions
LATEST docs - the newest version under development
List of all available releases: 1.2.1, 1.2.0, 1.1, 1.0.
Version | Changelog |
---|---|
1.2.1 (docs) |
Dependencies:
|
1.2.0 (docs) |
Dependencies:
|
1.1 (docs) |
Dependencies:
|
1.0 (docs) |
Initial release |