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
Liferay Workspace with Intellij and Targetplatform?
Hello,
In my company we have a project using Liferay DXP. I decided to use Intellij and I was glad to found out there is a nice plugin to manage Liferay Workspaces. Everything is fine until I want to debug my code using the Liferay sources ...
To be precise ; I can't manage to link Liferay src to my workspace, resulting in hard debug. When I search for a Liferay class, it shows me the Gradle dependency source code rather than the Liferay source code.I wanted to fix that by implementing the Targetplatform feature. I read this article https://portal.liferay.dev/docs/7-0/tutorials/-/knowledge_base/t/managing-the-target-platform-for-liferay-workspace#managing-the-target-platform-for-liferay-workspace and since I am using a Liferay workspace, I added ;
To gradle files. But it doesn't work... It take a long time to gradle to execute the "Configure build" task and very often I ran into memory issue during the process. And of course, I still can't access Liferay source...What can I do? Am I doing this right or wrong? Is it possible to properly configure Intellij to read the Liferay source when I want to debug a class using them?
Thanks a lot!
Cheers.
In my company we have a project using Liferay DXP. I decided to use Intellij and I was glad to found out there is a nice plugin to manage Liferay Workspaces. Everything is fine until I want to debug my code using the Liferay sources ...
To be precise ; I can't manage to link Liferay src to my workspace, resulting in hard debug. When I search for a Liferay class, it shows me the Gradle dependency source code rather than the Liferay source code.I wanted to fix that by implementing the Targetplatform feature. I read this article https://portal.liferay.dev/docs/7-0/tutorials/-/knowledge_base/t/managing-the-target-platform-for-liferay-workspace#managing-the-target-platform-for-liferay-workspace and since I am using a Liferay workspace, I added ;
target.platform.index.sources=true
liferay.workspace.target.platform.version=7.1.10.fp11
To gradle files. But it doesn't work... It take a long time to gradle to execute the "Configure build" task and very often I ran into memory issue during the process. And of course, I still can't access Liferay source...What can I do? Am I doing this right or wrong? Is it possible to properly configure Intellij to read the Liferay source when I want to debug a class using them?
Thanks a lot!
Cheers.
Those are the right settings, you just need to git the process time to run and give it the memory resources it needs.
Hi,
Thanks for the reply. I tried again with a new and vanilla Liferay workspace project and it seems to work a bit more. The target platform config is working as for dependencies versions ... But still, all Liferay classes are linked to their gradle dependencies (aka : in the .gradle/cache folder). But I am wondering ; does it matter? If with the target platform feature I am now sure that my gradle dependencies versions are aligned correctly with the target liferay version, I can debug fine I guess? There will be no mismatch anymore?
Thanks for the reply. I tried again with a new and vanilla Liferay workspace project and it seems to work a bit more. The target platform config is working as for dependencies versions ... But still, all Liferay classes are linked to their gradle dependencies (aka : in the .gradle/cache folder). But I am wondering ; does it matter? If with the target platform feature I am now sure that my gradle dependencies versions are aligned correctly with the target liferay version, I can debug fine I guess? There will be no mismatch anymore?
When you specify a target platform such as 7.1.10.fp11, all of the Liferay dependency versions will be the ones that ship with that FP. So if you have selected fp11 but you are trying to run against fp5 or fp25 (if it ever exists), you'll get messages about versions not matching the environment.
I don't have any message telling me about mismatch so, I guess it's fine then. My only question was if it was "normal" that the IDE is showing me the sources in the gradle folder but, if I am sure that the versions are matching, it's not a problem anymore.
Thank you very much!
Thank you very much!
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™