Fork me on GitHub

lesscss:compile

Full name:

biz.gabrys.maven.plugins:lesscss-maven-plugin:1.0:compile

Description:

Compiles Less files to CSS stylesheets using extended version of the LessCSS Compiler.

Attributes:

  • Requires a Maven project to be executed.
  • The goal is thread-safe and supports parallel builds.
  • Since version: 1.0.
  • Binds by default to the lifecycle phase: generate-sources.

Optional Parameters

Name Type Since Description
addCommentsWithPaths boolean 1.0 Defines whether the plugin should add comments with sources paths at the beginning and end of each source.
Notice: always false when compiler type is equal to local or compress is equal to true.
Notice: you must clear the working directory if you change this parameter.
Default value is: false.
User property is: lesscss.addCommentsWithPaths.
addCommentsWithPathsClassPrefix String 1.0 Restricted class name prefix used to create comments with sources paths.
Notice: you must clear the working directory if you change this parameter.
Default value is: gabrys-biz-comment-with-path-marker-class.
User property is: lesscss.addCommentsWithPathsClassPrefix.
alwaysOverwrite boolean 1.0 Defines whether the plugin should always overwrite destination files (also if sources did not changed).
Notice: always true when force is equal to true.
Default value is: false.
User property is: lesscss.alwaysOverwrite.
compilerOptions String[] 1.0 List of options passed to the compiler. See Less options
Notice: you must clear the working directory if you change this parameter.
Default value is: [].
compilerType String 1.0 Defines compiler type used in compilation process. Available options:
  • full - designed to compile files placed on a local hard drive and in the network
  • local - designed to compile files placed on a local hard drive

Default value is: full.
User property is: lesscss.compilerType.
compress boolean 1.0 Whether the compiler should minify the CSS code.
Notice: you must clear the working directory if you change this parameter and force is equal to false.
Default value is: false.
User property is: lesscss.compress.
encoding String 1.0 Sources encoding.
Notice: you must clear the working directory if you change this parameter and force is equal to false.
Default value is: ${project.build.sourceEncoding}.
User property is: lesscss.encoding.
excludes String[] 1.0 List of files to exclude. Specified as fileset patterns which are relative to the source directory. See available fileset patterns formats.
Default value is: [].
filesetPatternFormat String 1.0 Defines inclusion and exclusion fileset patterns format. Available options:
  • ant - Ant patterns
  • regex - regular expressions (use '/' as path separator)

Default value is: ant.
User property is: lesscss.filesetPatternFormat.
force boolean 1.0 Forces the Less compiler to always compile the Less sources. By default Less sources are only compiled when modified (including imports) or the CSS stylesheet does not exists.
Notice: always false when watch is equal to true.
Default value is: false.
User property is: lesscss.force.
includes String[] 1.0 List of files to include. Specified as fileset patterns which are relative to the source directory. See available fileset patterns formats.
Default value is: ["**/*.less"] for ant or ["^.+\.less$"] for regex.
outputDirectory File 1.0 The directory for compiled CSS stylesheets.
Default value is: ${project.build.directory}.
User property is: lesscss.outputDirectory.
outputFileFormat String 1.0 Destination files naming format. {fileName} is equal to source file name without extension.
Default value is: {fileName}.css.
User property is: lesscss.outputFileFormat.
skip boolean 1.0 Defines whether to skip the plugin execution.
Default value is: false.
User property is: lesscss.skip.
sourceDirectory File 1.0 The directory which contains the Less sources.
Default value is: ${project.basedir}/src/main/less.
User property is: lesscss.sourceDirectory.
verbose boolean 1.0 Defines whether the plugin runs in verbose mode.
Notice: always true in debug mode.
Default value is: false.
User property is: lesscss.verbose.
watch boolean 1.0 Defines whether the plugin should watch for changes in source files and compile if it detects any.
Default value is: false.
User property is: lesscss.watch.
watchInterval int 1.0 The interval in seconds between the plugin searching for changes in source files.
Default value is: 5.
User property is: lesscss.watchInterval.
workingDirectory File 1.0 The plugin working directory.
Default value is: ${project.build.directory}/gabrys-biz-lesscss-maven-plugin.
User property is: lesscss.workingDirectory.

Parameter Details

addCommentsWithPaths:

Defines whether the plugin should add comments with sources paths at the beginning and end of each source.
Notice: always false when compiler type is equal to local or compress is equal to true.
Notice: you must clear the working directory if you change this parameter.
  • Type: boolean
  • Since: 1.0
  • Required: No
  • User Property: lesscss.addCommentsWithPaths
  • Default: false

addCommentsWithPathsClassPrefix:

Restricted class name prefix used to create comments with sources paths.
Notice: you must clear the working directory if you change this parameter.
  • Type: java.lang.String
  • Since: 1.0
  • Required: No
  • User Property: lesscss.addCommentsWithPathsClassPrefix
  • Default: gabrys-biz-comment-with-path-marker-class

alwaysOverwrite:

Defines whether the plugin should always overwrite destination files (also if sources did not changed).
Notice: always true when force is equal to true.
  • Type: boolean
  • Since: 1.0
  • Required: No
  • User Property: lesscss.alwaysOverwrite
  • Default: false

compilerOptions:

List of options passed to the compiler. See Less options
Notice: you must clear the working directory if you change this parameter.
Default value is: [].
  • Type: java.lang.String[]
  • Since: 1.0
  • Required: No

compilerType:

Defines compiler type used in compilation process. Available options:
  • full - designed to compile files placed on a local hard drive and in the network
  • local - designed to compile files placed on a local hard drive
  • Type: java.lang.String
  • Since: 1.0
  • Required: No
  • User Property: lesscss.compilerType
  • Default: full

compress:

Whether the compiler should minify the CSS code.
Notice: you must clear the working directory if you change this parameter and force is equal to false.
  • Type: boolean
  • Since: 1.0
  • Required: No
  • User Property: lesscss.compress
  • Default: false

encoding:

Sources encoding.
Notice: you must clear the working directory if you change this parameter and force is equal to false.
  • Type: java.lang.String
  • Since: 1.0
  • Required: No
  • User Property: lesscss.encoding
  • Default: ${project.build.sourceEncoding}

excludes:

List of files to exclude. Specified as fileset patterns which are relative to the source directory. See available fileset patterns formats.
Default value is: [].
  • Type: java.lang.String[]
  • Since: 1.0
  • Required: No

filesetPatternFormat:

Defines inclusion and exclusion fileset patterns format. Available options:
  • ant - Ant patterns
  • regex - regular expressions (use '/' as path separator)
  • Type: java.lang.String
  • Since: 1.0
  • Required: No
  • User Property: lesscss.filesetPatternFormat
  • Default: ant

force:

Forces the Less compiler to always compile the Less sources. By default Less sources are only compiled when modified (including imports) or the CSS stylesheet does not exists.
Notice: always false when watch is equal to true.
  • Type: boolean
  • Since: 1.0
  • Required: No
  • User Property: lesscss.force
  • Default: false

includes:

List of files to include. Specified as fileset patterns which are relative to the source directory. See available fileset patterns formats.
Default value is: ["**/*.less"] for ant or ["^.+\.less$"] for regex.
  • Type: java.lang.String[]
  • Since: 1.0
  • Required: No

outputDirectory:

The directory for compiled CSS stylesheets.
  • Type: java.io.File
  • Since: 1.0
  • Required: No
  • User Property: lesscss.outputDirectory
  • Default: ${project.build.directory}

outputFileFormat:

Destination files naming format. {fileName} is equal to source file name without extension.
  • Type: java.lang.String
  • Since: 1.0
  • Required: No
  • User Property: lesscss.outputFileFormat
  • Default: {fileName}.css

skip:

Defines whether to skip the plugin execution.
  • Type: boolean
  • Since: 1.0
  • Required: No
  • User Property: lesscss.skip
  • Default: false

sourceDirectory:

The directory which contains the Less sources.
  • Type: java.io.File
  • Since: 1.0
  • Required: No
  • User Property: lesscss.sourceDirectory
  • Default: ${project.basedir}/src/main/less

verbose:

Defines whether the plugin runs in verbose mode.
Notice: always true in debug mode.
  • Type: boolean
  • Since: 1.0
  • Required: No
  • User Property: lesscss.verbose
  • Default: false

watch:

Defines whether the plugin should watch for changes in source files and compile if it detects any.
  • Type: boolean
  • Since: 1.0
  • Required: No
  • User Property: lesscss.watch
  • Default: false

watchInterval:

The interval in seconds between the plugin searching for changes in source files.
  • Type: int
  • Since: 1.0
  • Required: No
  • User Property: lesscss.watchInterval
  • Default: 5

workingDirectory:

The plugin working directory.
  • Type: java.io.File
  • Since: 1.0
  • Required: No
  • User Property: lesscss.workingDirectory
  • Default: ${project.build.directory}/gabrys-biz-lesscss-maven-plugin