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
where do the gradle tasks come from?
Hello all, I have a problem with gradle plugins. When I run a 'clean build' to a gradle project, I see a lot of gradle tasks being executed but I don't see them in the build.gradle file. There are a couple of plugins used in the script but I couldn't find any documentation of the gradle tasks they execute (also nothing about 'com.liferay.plugin' plugin). There is a 'npmInstall' task that is being executed forever and I want to know where is defined and how can I configure it. I attach the build.gradle and the gradle.executions I see. Thanks in advance
Attachments:
That's the problem with "convention over configuration", not all parties to the convention will always agree... 
Each plugin you apply can contribute to tasks. So the Liferay Workspace plugin, for example, can contribute to the "clean" task so it has an opportunity to clean up after itself. And since workspace uses a slew of other Liferay plugins internally, all of their contributions are also added to the "clean" task.
You can try adding the "--debug" parameter to your gradle invoke, that should give you the full log of what is executing so you can backtrack into what is calling the NPM command.

Each plugin you apply can contribute to tasks. So the Liferay Workspace plugin, for example, can contribute to the "clean" task so it has an opportunity to clean up after itself. And since workspace uses a slew of other Liferay plugins internally, all of their contributions are also added to the "clean" task.
You can try adding the "--debug" parameter to your gradle invoke, that should give you the full log of what is executing so you can backtrack into what is calling the NPM command.
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™