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
RE: buildCSS shows warning about NOP slf4j logging binding
Liferay IDE Version: 3.8.0.202002250521-ga1
Liferay 7.3.1 ga2
A note for other newbies, I was getting this warning from the buildCSS gradle task. Following the link in the error text only describes adding the jar to the classpath and a lot of the google results talk about adding a dependency for your project . Not really anything on how to fix this for the gradle plugin. So I went down a lot of dead ends before I found the answer.
Answer: Add the following line to the build.gradle file of the module project.
Do not put it in the top level build.gradle file of the liferay workspace. This will produce the error:
Liferay 7.3.1 ga2
A note for other newbies, I was getting this warning from the buildCSS gradle task. Following the link in the error text only describes adding the jar to the classpath and a lot of the google results talk about adding a dependency for your project . Not really anything on how to fix this for the gradle plugin. So I went down a lot of dead ends before I found the answer.
> Task :modules:guestbook-web:buildCSS
Using native Sass compiler
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Parsed /META-INF/resources/css/main.scss in 336ms
Answer: Add the following line to the build.gradle file of the module project.
cssBuilder group: "org.slf4j", name: "slf4j-simple", version:"1.7.10"
Do not put it in the top level build.gradle file of the liferay workspace. This will produce the error:
* What went wrong:
A problem occurred evaluating root project 'gb'.
> Could not find method cssBuilder() for arguments [{group=org.slf4j, name=slf4j-simple, version=1.7.10}] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
Hello Michael,
Thanks for this report. However, I was unable to reproduce the problem you are describing. Can you share with me a standalone workspace repo (on github?) where I could see this? I'm wondering if its a particular version of gradle/workspace that is causing this to show up.
Thanks for this report. However, I was unable to reproduce the problem you are describing. Can you share with me a standalone workspace repo (on github?) where I could see this? I'm wondering if its a particular version of gradle/workspace that is causing this to show up.
blade version 3.9.2.202004101340
$ ./gradlew --version
------------------------------------------------------------
Gradle 5.6.4
------------------------------------------------------------
Build time: 2019-11-01 20:42:00 UTC
Revision: dd870424f9bd8e195d614dc14bb140f43c22da98
Kotlin: 1.3.41
Groovy: 2.5.4
Ant: Apache Ant(TM) version 1.9.14 compiled on March 12 2019
JVM: 11.0.2 (Oracle Corporation 11.0.2+9-Debian-3bpo91)
OS: Linux 4.9.0-8-amd64 amd64
Sure thing I will get something for you in the next couple of days.Also I have just repeated the guestbook tute with the next IDE, liferay portal and I still get this error .
$ ./gradlew --version
------------------------------------------------------------
Gradle 5.6.4
------------------------------------------------------------
Build time: 2019-11-01 20:42:00 UTC
Revision: dd870424f9bd8e195d614dc14bb140f43c22da98
Kotlin: 1.3.41
Groovy: 2.5.4
Ant: Apache Ant(TM) version 1.9.14 compiled on March 12 2019
JVM: 11.0.2 (Oracle Corporation 11.0.2+9-Debian-3bpo91)
OS: Linux 4.9.0-8-amd64 amd64
Sure thing I will get something for you in the next couple of days.Also I have just repeated the guestbook tute with the next IDE, liferay portal and I still get this error .
Oh and thanks for following up my posts.
So in the process of making a cut down version and a store in git I think I have worked out the issues.
The IDE creates a gradle.properties file with:
This causes the gradle and blade build tools to use the old library and tool config. This can not be changed in the IDE as it only lets you set 7.3 without an option for 7.3.X.
This is probably the cause of a lot of the other posts I have made.
So long story short, it is a config error caused by the IDE and can be fixed by overriding the value on the gradle.properties.
For interest I have add the script I used to cycle through the different versions :https://github.com/micko920/liferay-tests
The IDE creates a gradle.properties file with:
liferay.workspace.target.platform.version = 7.3.0
This causes the gradle and blade build tools to use the old library and tool config. This can not be changed in the IDE as it only lets you set 7.3 without an option for 7.3.X.
This is probably the cause of a lot of the other posts I have made.
So long story short, it is a config error caused by the IDE and can be fixed by overriding the value on the gradle.properties.
For interest I have add the script I used to cycle through the different versions :https://github.com/micko920/liferay-tests
"So long story short, it is a config error caused by the IDE and can be fixed by overriding the value on the gradle.properties."
Can you post a followup with a list of steps how to reproduce this? @ashley could you follow up with creating a ticket that we could track? Thanks Michael
Can you post a followup with a list of steps how to reproduce this? @ashley could you follow up with creating a ticket that we could track? Thanks Michael
The cssBuilder error is not producible with the latest version of blade, gradle and IDE.
This is just the starting point the other errors listed in https://github.com/micko920/liferay-tests The steps:
Workaround:Change the target version in the gradle.properties file to match the bundle.
This is just the starting point the other errors listed in https://github.com/micko920/liferay-tests The steps:
- Open the IDE and create a blank New Liferay Workspace
- Use the latest version 7.3 and 7.3.0 in the Liferay Version and Target Version
- Click the download liferay bundle and use the link for 7.3.2-ga2 https://releases-cdn.liferay.com/portal/7.3.2-ga3/liferay-ce-portal-tomcat-7.3.2-ga3-20200519164024819.tar.gz
- The issues do not happen if the download liferay bundle url is left as the default 7.3.0-ga1
- Add a new ServiceBuilder project
- perform BuildService task
- perform Build task
- deploy service builder module to server instance
- Once the Server is up and the module deployed and started an error will show up "Could not create output jar" see attach images
Workaround:Change the target version in the gradle.properties file to match the bundle.
liferay.workspace.target.platform.version = 7.3.2
Thanks for the detail, We will followup soon.
Hello Michael,
Thanks for bringing up the problem. I've created the ticket https://issues.liferay.com/browse/IDE-4798, and we've fixed the problem you've run into, which will be included in the next 3.9 Milestone 1 release officially.
Please let us know if anything else and I will share the updatesite file if you would like to try the 3.9 M1 SNAPSHOT version.
Thanks for bringing up the problem. I've created the ticket https://issues.liferay.com/browse/IDE-4798, and we've fixed the problem you've run into, which will be included in the next 3.9 Milestone 1 release officially.
Please let us know if anything else and I will share the updatesite file if you would like to try the 3.9 M1 SNAPSHOT version.
Thanks Gregory and Yanan.
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™