Known Issue: CSS Builder Versions Errors for War-style Projects

This article documents a known issue in the CSS Builder-3.0.0. This issue affects developers who are still using existing war-style (war-mvc-portlet or spring-mvc-portlet) projects and an older version of the CSS builder (css.builder-2.x) . It was discovered that if the CSS Builder product version is not specified, it causes compile errors because the build template is attempting to use an incorrect CSS builder.

Here is a sample error message:

     [exec]     Output:
     [exec] 
     [exec]     > Task :buildCSS FAILED
     [exec]     Was passed main parameter 'sass.append.css.import.timestamps=true' but no main parameter was defined in your arg class
     [exec]     Usage: java -jar com.liferay.css.builder-3.0.0.jar [options]
     [exec]       Options:
     [exec]         --append-css-import-timestamps
     [exec]           Whether to append the current timestamp to the URLs in the @import CSS 
     [exec]           at-rules. 
     [exec]           Default: true
     [exec]         --base-dir
     [exec]           The base directory that contains the SCSS files to compile.
     [exec]           Default: src/META-INF/resources
     [exec]         --compiler
     [exec]           The type of Sass compiler to use. Supported values are "jni" and "ruby". 
     [exec]           The Ruby Sass compiler requires "com.liferay.sass.compiler.ruby.jar", 
     [exec]           "com.liferay.ruby.gems.jar", and "jruby-complete.jar" to be added to the 
     [exec]           classpath. 
     [exec]           Default: jni
     [exec]         --dir-names
     [exec]           The name of the directories, relative to base directory, which contain 
     [exec]           the SCSS files to compile. All sub-directories are searched for SCSS 
     [exec]           files as well.
     [exec]           Default: [/]
     [exec]         --excludes
     [exec]           The SCSS file patterns to exclude from compiling.
     [exec]           Default: [**/_diffs/**, **/.sass-cache*/**, **/.sass_cache_*/**, **/_sass_cache_*/**, **/_styled/**, **/_unstyled/**, **/css/aui/**, **/css/clay/**, **/tmp/**]
     [exec]         --generate-source-map
     [exec]           Whether to generate source maps for easier debugging.
     [exec]           Default: false
     [exec]         -h, --help
     [exec]           Print this message.
     [exec]         --import-paths
     [exec]           The import directories of Sass libraries.
     [exec]         --output-dir
     [exec]           The name of the sub-directories where the SCSS files are compiled to. 
     [exec]           For each directory that contains SCSS files, a sub-directory with this 
     [exec]           name is created.
     [exec]           Default: .sass-cache/
     [exec]         --precision
     [exec]           The numeric precision of numbers in Sass.
     [exec]           Default: 9
     [exec]         --rtl-excluded-path-regexps
     [exec]           The SCSS file patterns to exclude when converting for right-to-left 
     [exec]           (RTL) support.
     [exec]           Default: []

Resolution

Status: Fixed

For DXP 7.0 projects, enter:

dependencies {
        ...
        cssBuilder group: "com.liferay", name: "com.liferay.css.builder", version: "2.1.3"
        portalCommonCSS group: "com.liferay", name: "com.liferay.frontend.css.common", version: "2.0.3"
}

For DXP 7.1 projects, enter:

dependencies {
        ...
        cssBuilder group: "com.liferay", name: "com.liferay.css.builder", version: "2.1.3"
        portalCommonCSS group: "com.liferay", name: "com.liferay.frontend.css.common", version: "3.0.1"
}

If using Blade and other archetypes, updated templates will be released soon for all product DXP versions - 7.0, 7.1, and 7.2.

Este artigo foi útil?
Utilizadores que acharam útil: 0 de 0