CSS Builder Plugin

The CSS Builder plugin lets you compile Sass files in your project.


To use the plugin, include it in your project’s root pom.xml file:


You can view an example POM containing the CSS Builder configuration here.


The plugin adds one Maven goal to your project:

css-builder:buildCompiles the Sass files in the project.

Available Parameters

You can set the following parameters in the <configuration> section of the POM:

Parameter NameTypeDefault ValueDescription
appendCssImportTimestampsbooleantrueWhether to append the current timestamp to the URLs in the @import CSS at-rules.
baseDirFile"src/META-INF/resources"The base directory that contains the SCSS files to compile.
dirNamesList<String>["/"]The name of the directories, relative to baseDir, which contain the SCSS files to compile.
generateSourceMapbooleanfalseWhether to generate source maps for easier debugging.
importDirFilenullThe META-INF/resources directory of the Liferay Frontend Common CSS artifact. This is required in order to make Bourbon and other CSS libraries available to the compilation.
outputDirNameString".sass-cache/"The name of the sub-directories where the SCSS files are compiled to. For each directory that contains SCSS files, a sub-directory with this name is created.
precisionint9The numeric precision of numbers in Sass.
rtlExcludedPathRegexpsList<String> The SCSS file patterns to exclude when converting for right-to-left (RTL) support.
sassCompilerClassNameString"jni"The type of Sass compiler to use. Supported values are "jni" and "ruby". The Ruby Sass compiler requires com.liferay.sass.compiler.ruby.jar, com.liferay.ruby.gems.jar, and jruby-complete.jar to be added to the classpath.

You can also manage the com.liferay.frontend.css.common default theme dependency provided by the CSS Builder in your pom.xml. This can be modified by adding it as a project dependency:


There are additional Liferay theme-related dependencies you can manage this way that are provided by the Theme Builder. See this section for more information.

« Bundle Support PluginDB Support Plugin »
¿Fue útil este artículo?
Usuarios a los que les pareció útil: 1 de 1