Search code examples
eclipsefragmentliferayhook

Liferay Module Project Fragment, missing Liferay Runtime Name


I have Eclipse Version: 2019-06 (4.12.0)

I have a server: Liferay Community Edition Portal 7.2.1 CE GA2

I wanto to create a hook (Liferay Module Project Fragment) but eclipse doesn't let me choose Liferay Runtime envoirment name

How i can choose it? what am i missing?


Solution

  • I managed to find a solution to your issue, here are my reproduction + solution steps:

    1. I downloaded Eclipse IDE for Enterprise Java Developers (Version: 2019-06 (4.12.0)) to ensure I am getting the same error as you
    2. Followed the official article to set up Liferay within Eclipse (https://help.liferay.com/hc/en-us/articles/360017897772-Developing-Applications-with-Liferay-IDE) (the article is for 6.2 but the process has not changed)
    3. I created an Eclipse workspace, and then a separate Liferay workspace within the Eclipse workspace (please note that both are needed)
    4. Within Eclipse I switched to the Liferay perspectivate, and started to create a new Liferay Module Project Fragment
      Checkpoint: I could not select my runtime, just like you
    5. I exited Eclipse, and visited the Liferay workspace directory
    6. Within that directory, I opened the gradle.properties file and added this line:
      liferay.workspace.home.dir=/home/USER/stackoverflow/liferay-dxp-7.2.10-ga1
    7. Re-started Eclipse and this time, the runtime was selected in the new project wizard window

      Hope this helps!