Message Boards
[HELP] Liferay DXP 7.0 - Maven - Theme parent
Koffi AGHOSTO, modified 4 Years ago.
[HELP] Liferay DXP 7.0 - Maven - Theme parent
Junior Member Posts: 67 Join Date: 5/27/14 Recent Posts
Hello everybody,
I would like to ask you help about liferay DXP 7.0 maven theme parent definition. I would like to define a custom theme as parent
for another custom theme in liferay DXP 7.0 maven but I don't know how to do it ?
So, I have my custom common theme with id = common-theme and then I would like to create
another theme called test-theme wich will have common-theme as parent theme. I use maven, so I declare like this :
<plugin>
<groupId>com.liferay</groupId>
<artifactId>com.liferay.portal.tools.theme.builder</artifactId>
<version>1.1.3</version>
<executions>
<execution>
<phase>generate-resources</phase>
<goals>
<goal>build</goal>
</goals>
<configuration>
<diffsDir>src</diffsDir>
<outputDir>${com.liferay.portal.tools.theme.builder.outputDir}</outputDir>
<parentName>common-theme</parentName>
<parentDir>../../common-theme</parentDir>
</configuration>
</execution>
</executions>
</plugin>
When I build my common theme builds successfully but for my test-theme, I still get this error :
[ERROR] Failed to execute goal com.liferay:com.liferay.css.builder:1.0.26:build (default) on project test-theme: Error: File to import not found or unreadable: imports
[ERROR] Parent style sheet: /home/test-theme/target/build-theme/src/css/main.scss
[ERROR] on line 1 of test-theme/target/build-theme/src/css/main.scss
[ERROR] >> @import "imports";
[ERROR] ^
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.liferay:com.liferay.css.builder:1.0.26:build (default) on project test-theme: Error: File to import not found or unreadable: imports
Parent style sheet: /home/test-theme/target/build-theme/src/css/main.scss
on line 1 of /home/test-theme/build-theme/src/css/main.scss
>> @import "imports";
^
I want to ask you if somebody can help me ?
Thank you in advanced,
Yours sincerely
I would like to ask you help about liferay DXP 7.0 maven theme parent definition. I would like to define a custom theme as parent
for another custom theme in liferay DXP 7.0 maven but I don't know how to do it ?
So, I have my custom common theme with id = common-theme and then I would like to create
another theme called test-theme wich will have common-theme as parent theme. I use maven, so I declare like this :
<plugin>
<groupId>com.liferay</groupId>
<artifactId>com.liferay.portal.tools.theme.builder</artifactId>
<version>1.1.3</version>
<executions>
<execution>
<phase>generate-resources</phase>
<goals>
<goal>build</goal>
</goals>
<configuration>
<diffsDir>src</diffsDir>
<outputDir>${com.liferay.portal.tools.theme.builder.outputDir}</outputDir>
<parentName>common-theme</parentName>
<parentDir>../../common-theme</parentDir>
</configuration>
</execution>
</executions>
</plugin>
When I build my common theme builds successfully but for my test-theme, I still get this error :
[ERROR] Failed to execute goal com.liferay:com.liferay.css.builder:1.0.26:build (default) on project test-theme: Error: File to import not found or unreadable: imports
[ERROR] Parent style sheet: /home/test-theme/target/build-theme/src/css/main.scss
[ERROR] on line 1 of test-theme/target/build-theme/src/css/main.scss
[ERROR] >> @import "imports";
[ERROR] ^
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.liferay:com.liferay.css.builder:1.0.26:build (default) on project test-theme: Error: File to import not found or unreadable: imports
Parent style sheet: /home/test-theme/target/build-theme/src/css/main.scss
on line 1 of /home/test-theme/build-theme/src/css/main.scss
>> @import "imports";
^
I want to ask you if somebody can help me ?
Thank you in advanced,
Yours sincerely
Rayappa Hattarwat, modified 4 Years ago.
RE: [HELP] Liferay DXP 7.0 - Maven - Theme parent
Junior Member Posts: 89 Join Date: 8/11/15 Recent Posts
Hi,Check this your mvn theme pom.xml file
<plugin>
<groupId>com.liferay</groupId>
<artifactId>com.liferay.portal.tools.theme.builder</artifactId>
<version>${com.liferay.portal.tools.theme.builder.version}</version>
<dependencies>
<dependency>
<groupId>com.liferay</groupId>
<artifactId>com.liferay.frontend.theme.classic.web</artifactId>
<version>2.0.2</version>
</dependency>
<dependency>
<groupId>com.liferay</groupId>
<artifactId>com.liferay.frontend.theme.styled</artifactId>
<version>3.0.5</version>
</dependency>
<dependency>
<groupId>com.liferay</groupId>
<artifactId>com.liferay.frontend.theme.unstyled</artifactId>
<version>3.0.5</version>
</dependency>
</dependencies>
<executions>
<execution>
<phase>generate-resources</phase>
<goals>
<goal>build</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>
<templateExtension>ftl</templateExtension>
<unstyledDir>${project.build.directory}/deps/com.liferay.frontend.theme.unstyled.jar</unstyledDir>
</configuration>
</execution>
</executions>
</plugin>
Regards,
Rayappa
<plugin>
<groupId>com.liferay</groupId>
<artifactId>com.liferay.portal.tools.theme.builder</artifactId>
<version>${com.liferay.portal.tools.theme.builder.version}</version>
<dependencies>
<dependency>
<groupId>com.liferay</groupId>
<artifactId>com.liferay.frontend.theme.classic.web</artifactId>
<version>2.0.2</version>
</dependency>
<dependency>
<groupId>com.liferay</groupId>
<artifactId>com.liferay.frontend.theme.styled</artifactId>
<version>3.0.5</version>
</dependency>
<dependency>
<groupId>com.liferay</groupId>
<artifactId>com.liferay.frontend.theme.unstyled</artifactId>
<version>3.0.5</version>
</dependency>
</dependencies>
<executions>
<execution>
<phase>generate-resources</phase>
<goals>
<goal>build</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>
<templateExtension>ftl</templateExtension>
<unstyledDir>${project.build.directory}/deps/com.liferay.frontend.theme.unstyled.jar</unstyledDir>
</configuration>
</execution>
</executions>
</plugin>
Regards,
Rayappa