1
votes

I'm having problems trying to import a portlet into Eclipse IDE.

First i tried File/ New / Liferay Project from Existing Source. As soon as i add my Lferay Project Location the message ]"Project is not located inside Liferay Plugins SDK" shows up. This is the location of my portlet C:\liferay-plugins-sdk-6.2.10.1\portlets\valisa2014-portlet, so the error message makes no sense to me. I have confirmed that the portlet is indeed inside my sdk.

I have also tried to import the porlet by File / Import and then Liferay -> Liferay Project from Existing Source, same thing as soon as i put my Liferay project location the same error message will show up:"Project is not located inside Liferay Plugins SDK"

And finally i tried Import -> Import Liferay Projects, Im able to select my SDK and on the "Projects to Import" options i can see my portlet but i got an "Invalid Plugin SDK Location" as soon as i select my sdk.

I really don't understand what's going on, my sdk is already configured on Eclipse and it have worked in the past when importing another portlets or themes to Eclipse, my build.user.properties have also worked in the past (this is a project i have been working on for months) so i don't know why i'm not able to import this portlet.

Im using Liferay 6.2, Tomcat 7, Eclipse Kepler Service Release 2.

3
I found someone who seems to have had exactly your problem. Maybe the discussion in liferay.com/community/forums/-/message_boards/message/56424121 helps you as well?Olaf Kock
Yep, that's also me @Olaf, but many thanks for your interest.Lowtrux

3 Answers

1
votes

Ok after dealing with those JAVA issues i have finally been able to import my portlet to Eclipse, and is still a mistery to be honest. I'm still not able to import the portlet with the "Liferay Projects from Plugins from SDK", still getting the "Invalid Plugin SDK location" even when i can see my new portlet listed and ready to be selected. So i tried with Import -> "Exiting Projects into Workspace" and it finally worked. Actually this was the only import method that worked for me, after trying every single way to import a Portlet in Liferay. Wish i can have a better idea why is not working with the other ones. Well hope this solution will help someone with the same problem in the future. If you guys have more feedback will be really appreciated.

0
votes

Have you defined your SDK in Eclipse?

Eclipse plug-in complains that there is no SDK defined. It does not bother to discover the SDK on its own. You have to do it manually.

Try defining the runtime, that is Liferay installation, as well - it gets handy when overriding files in hooks.

0
votes

Eclipse Only looks for the projects whose names end in thw word portlet. So make sure that your project has the proper name format.