Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
[Maven] File to import not found or unreadable: clay/atlas
I am able to build a simple themes using Maven (created from maven artifacts).
Now I try building Classic theme. I copied the liferay-portal/modules/apps/frontend-theme/frontend-theme-classic/ project (7.1.2-ga3 tag) and added standard POM generated from maven artifact:
In Classic theme there are various @imports in CSS files. And these seem to be resolved incorrectly during Maven build:
There is indeed missing css/clay folder in the target/build-theme folder. As it is also not present in common/unstyled/styled JAR files, I'm afraid this content has to be fetched from another resource.
Is Maven supposed to build such a theme?
Now I try building Classic theme. I copied the liferay-portal/modules/apps/frontend-theme/frontend-theme-classic/ project (7.1.2-ga3 tag) and added standard POM generated from maven artifact:
<!--?xml version="1.0" encoding="UTF-8"?-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemalocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelversion>4.0.0</modelversion>
<groupid>com.quadient</groupid>
<artifactid>custom-theme</artifactid>
<version>1.0.0</version>
<packaging>war</packaging>
<properties>
<com.liferay.portal.tools.theme.builder.outputdir>target/build-theme</com.liferay.portal.tools.theme.builder.outputdir>
<project.build.sourceencoding>UTF-8</project.build.sourceencoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<build>
<plugins>
<plugin>
<artifactid>maven-dependency-plugin</artifactid>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactitems>
<artifactitem>
<groupid>com.liferay</groupid>
<artifactid>com.liferay.frontend.css.common</artifactid>
<version>2.0.1</version>
</artifactitem>
<artifactitem>
<groupid>com.liferay</groupid>
<artifactid>com.liferay.frontend.theme.styled</artifactid>
<version>2.0.13</version>
</artifactitem>
<artifactitem>
<groupid>com.liferay</groupid>
<artifactid>com.liferay.frontend.theme.unstyled</artifactid>
<version>2.0.13</version>
</artifactitem>
</artifactitems>
<outputdirectory>${project.build.directory}/deps</outputdirectory>
<stripversion>true</stripversion>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactid>maven-war-plugin</artifactid>
<version>3.0.0</version>
<configuration>
<packagingexcludes>**/*.scss</packagingexcludes>
<webresources>
<resource>
<directory>${com.liferay.portal.tools.theme.builder.outputDir}</directory>
<excludes>
<exclude>**/*.scss</exclude>
</excludes>
</resource>
</webresources>
</configuration>
</plugin>
<plugin>
<groupid>com.liferay</groupid>
<artifactid>com.liferay.css.builder</artifactid>
<version>1.0.20</version>
<executions>
<execution>
<id>default-build-css</id>
<phase>compile</phase>
<goals>
<goal>build-css</goal>
</goals>
</execution>
</executions>
<configuration>
<docrootdirname>${com.liferay.portal.tools.theme.builder.outputDir}</docrootdirname>
<outputdirname>/</outputdirname>
<portalcommonpath>target/deps/com.liferay.frontend.css.common.jar</portalcommonpath>
</configuration>
</plugin>
<plugin>
<groupid>com.liferay</groupid>
<artifactid>com.liferay.portal.tools.theme.builder</artifactid>
<version>1.0.2</version>
<executions>
<execution>
<phase>generate-resources</phase>
<goals>
<goal>build-theme</goal>
</goals>
<configuration>
<diffsdir>src/main/webapp/</diffsdir>
<outputdir>${com.liferay.portal.tools.theme.builder.outputDir}</outputdir>
<parentdir>${project.build.directory}/deps/com.liferay.frontend.theme.styled.jar</parentdir>
<parentname>_styled</parentname>
<unstyleddir>${project.build.directory}/deps/com.liferay.frontend.theme.unstyled.jar</unstyleddir>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
In Classic theme there are various @imports in CSS files. And these seem to be resolved incorrectly during Maven build:
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.liferay:com.liferay.css.builder:1.0.20:build-css (default-build-css) on project custom-theme: Error: File to import not found or unreadable: clay/atlas
Parent style sheet: C:/liferay-7-1/custom-theme/target/build-theme/css/clay.scss
on line 1 of target/build-theme/css/clay.scss
>> @import "clay/atlas";
^
There is indeed missing css/clay folder in the target/build-theme folder. As it is also not present in common/unstyled/styled JAR files, I'm afraid this content has to be fetched from another resource.
Is Maven supposed to build such a theme?
Once I submitted this question I compared my POM with this one https://dev.liferay.com/en/develop/tutorials/-/knowledge_base/7-1/building-themes-in-a-maven-project and I could find differences.
So I created new theme from archetype https://dev.liferay.com/en/develop/reference/-/knowledge_base/7-1/theme-template and I am really getting different POM now.
I think I originally replaced the generated POM with that from Blade project which now fails in case of more complex theme.
Now Classic theme clone is built without problems.
Sorry for the noise.
So I created new theme from archetype https://dev.liferay.com/en/develop/reference/-/knowledge_base/7-1/theme-template and I am really getting different POM now.
I think I originally replaced the generated POM with that from Blade project which now fails in case of more complex theme.
Now Classic theme clone is built without problems.
Sorry for the noise.
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™