Foros de discusión

How to add existing liferay porject to IDE

Biresh Choudhury, modificado hace 13 años.

How to add existing liferay porject to IDE

Junior Member Mensajes: 29 Fecha de incorporación: 8/12/10 Mensajes recientes
Hi All,

I have a doubt on how to add an existing project into liferay IDE. Have followed the below links:
http://www.liferay.com/community/wiki/-/wiki/Main/Liferay+IDE+Importing+Existing+Projects
http://www.liferay.com/community/wiki/-/wiki/Main/Liferay+IDE+Importing+Existing+Projects/pop_up;jsessionid=BE78A2026BCBE0255BBA576843B01947.node-1?_36_version=1.6

Problem facing:
Trying to import the chat portlet to IDE. Followed the above steps but not getting the result. Steps followed:
1) Right click --> import --> Existing project into workspace --> Browsed to the source directory and selected the chat portlet kept under plugin_sdk's portlet folder --> Here I am not able to see any project selected and getting a warning as " No projects are found to import"


Doubt: Since its a portlet project given by liferay and available in liferay-portal-tomcat-6.0.5, do I need to do anything extra to resolve the issue.

Thanks in advance,
Biresh
thumbnail
Gregory Amerson, modificado hace 13 años.

RE: How to add existing liferay porject to IDE

Liferay Legend Mensajes: 1123 Fecha de incorporación: 16/02/10 Mensajes recientes
You will need to use the Liferay IDE wizard for bringing in new projects.

File > New... > Liferay > Liferay Project from Existing Source

Then select the chat-portlet.

Notice that once you do you will have lots of compile errors to get rid of because the chat-portlet .project is setup to point to portal dependencies that you wont have. you can remove those from the project properties java build path.
Biresh Choudhury, modificado hace 13 años.

RE: How to add existing liferay porject to IDE

Junior Member Mensajes: 29 Fecha de incorporación: 8/12/10 Mensajes recientes
Thanks Gregory for a quick reply.

I had already followed the above method and below is the problem I am facing:
There is a error message saying "Invalid project location".
The Next as well as Finish buton are disabled for me to continue.

Attached is the screen shot of the problem.
Biresh Choudhury, modificado hace 13 años.

RE: How to add existing liferay porject to IDE

Junior Member Mensajes: 29 Fecha de incorporación: 8/12/10 Mensajes recientes
Gregory the problem got resolved in a different way.

Earlier approach: Was trying to import the existing project avaiable under
C:\liferay-portal-tomcat-6.0.5\liferay-portal-6.0.5\tomcat-6.0.26\webapps\chat-portlet
This is an existing portlet that we get with the bundle. Having problem as specified above on following the steps specified by you.

New Approach: Created a new project named chat-portlet using command prompt and then imported the same using your approach and it worked. Then copied the files from original chat-portlet to this new one. This way I was able to deploy the portlet and see the same in browser. Though there are some problem which I need to look into.

Doubt: Is there any better approach then the one specified above.


Thanks in advance.
thumbnail
Gregory Amerson, modificado hace 13 años.

RE: How to add existing liferay porject to IDE

Liferay Legend Mensajes: 1123 Fecha de incorporación: 16/02/10 Mensajes recientes
Originally when You tried to import chat-portlet it was in your workspace directory, directly under the workspace,
D:\liferay_workspace\chat-portlet


Instead you should create an SDK directory
D:\liferay-plugins-sdk-6.0.6


And then grab the chat portlet from SVN:
http://svn.liferay.com/repos/public/plugins/trunk/portlets/chat-portlet/

and add it to this directory:
D:\liferay-plugins-sdk-6.0.6\portlets\chat-portlet


And then once you have this open Eclipse, go to File > Import ... > Liferay > Existing Liferay Project, and browse to the chat-portlet directory.

When this finishes you will need to edit the project build path (Properties > Java Build Path) and go to the libraries tab and remove all of the missing jars since those jars will now be provided by the runtime libraries on the project now. You should be good to go.
Biresh Choudhury, modificado hace 13 años.

RE: How to add existing liferay porject to IDE

Junior Member Mensajes: 29 Fecha de incorporación: 8/12/10 Mensajes recientes
Thanks Gregory for the help.

I followed the steps and still getting the same error as above.

Steps followed this time were:
1) Downloaded the chat portlet war(chat-portlet-6.0.6.1) from official plugin of liferay site since was having problem in downloading from svn with respect to credential verification.

2) Extracted the files to the folder path as specified by you -->
D:\liferay-plugins-sdk-6.0.6\portlets\chat-portlet

3) Tried to import the file using Eclipse as per the process:
File > Import ... > Liferay > Existing Liferay Project, and browse to the chat-portlet directory.


Result: Getting "Invalid project location" as the error on the pop up window I had specified earlier.

Hope I am not missing out on any specific step.
SZ khan, modificado hace 13 años.

RE: How to add existing liferay porject to IDE

Regular Member Mensajes: 145 Fecha de incorporación: 31/10/09 Mensajes recientes
Structure of a WAR file and structure of liferay project is different.
Try to put the contents of extracted War in a folder called docroot and add a build.xml to it.
Then try to import it. May be it helps

Sultee
thumbnail
Gregory Amerson, modificado hace 13 años.

RE: How to add existing liferay porject to IDE

Liferay Legend Mensajes: 1123 Fecha de incorporación: 16/02/10 Mensajes recientes
What are the contents of this directory?
D:\liferay-plugins-sdk-6.0.6
Is it a full copy of the SDK?
Biresh Choudhury, modificado hace 13 años.

RE: How to add existing liferay porject to IDE

Junior Member Mensajes: 29 Fecha de incorporación: 8/12/10 Mensajes recientes
Hi Gregory,

Sorry for a late reply, since I was busy with other work had put this topic into the background for sometime.

Yes the path mentioned has full copy of SDK. The exact folder path is D:\liferay-plugins-sdk-6.0.6\plugins_sdk with sub-folders available as:
1) clients
2) dist
3) ext
4) hooks
5) layouttpl
6) lib
7) misc
8) portlets
9) themes
10) tools
11) webs

and there are other build files. Now what I used to do till date is keep the chat-portlet application under the portlets folder and try out the process mentioned above, but ending up with the same problem.


Sultee,

I have already tried the process mentioned by you and it's working as said in the above post. Just wanted a simpler way of doing the same thing. Any ways thanks for your help.
thumbnail
Gregory Amerson, modificado hace 13 años.

RE: How to add existing liferay porject to IDE

Liferay Legend Mensajes: 1123 Fecha de incorporación: 16/02/10 Mensajes recientes
Once you have repeated the process that I mentioned, can you re-take a screenshot with the error and post it here? I want to make sure that the patch to the chat-portlet is actually pointing to a valid SDK path. Thanks!
Biresh Choudhury, modificado hace 13 años.

RE: How to add existing liferay porject to IDE

Junior Member Mensajes: 29 Fecha de incorporación: 8/12/10 Mensajes recientes
Gregory Amerson:
Once you have repeated the process that I mentioned, can you re-take a screenshot with the error and post it here? I want to make sure that the patch to the chat-portlet is actually pointing to a valid SDK path. Thanks!


Hi Gregory,

Below are my steps followed with attached screen shot:
1) Created a folder with path as:
D:\liferay-plugins-sdk-6.0.6\plugins_sdk

2) Added the plugin sdk files to the path.

3) Added chat-portlet-6.0.6.1.war to portlets folder with path:
D:\liferay-plugins-sdk-6.0.6\plugins_sdk\portlets

4) Tried adding the same using IDE and getting the error as said.

Have attached the screenshot for your reference.
thumbnail
Gregory Amerson, modificado hace 13 años.

RE: How to add existing liferay porject to IDE

Liferay Legend Mensajes: 1123 Fecha de incorporación: 16/02/10 Mensajes recientes
Biresh,

In your example you need to explode the contents of chat-portlet into the portlets sub-folder of the plugins_sdk directory. So that way in the New Liferay Project from Existing source you can browse to a directory that has this path:
D:\liferay-plugins-sdk-6.0.6\plugins_sdk\portlets\chat-portlet
Biresh Choudhury, modificado hace 13 años.

RE: How to add existing liferay porject to IDE

Junior Member Mensajes: 29 Fecha de incorporación: 8/12/10 Mensajes recientes
Hi Gregory,

Had left the above steps by mistake and added the same to end up with the same error.

Attached is the updated error screen shot.
thumbnail
Gregory Amerson, modificado hace 13 años.

RE: How to add existing liferay porject to IDE

Liferay Legend Mensajes: 1123 Fecha de incorporación: 16/02/10 Mensajes recientes
Try creating a liferay runtime first before you import the project to see if that lets you complete the wizard.
Biresh Choudhury, modificado hace 13 años.

RE: How to add existing liferay porject to IDE

Junior Member Mensajes: 29 Fecha de incorporación: 8/12/10 Mensajes recientes
Hi Gregory,

Sorry for a late reply.

Tried the above process mentioned by you but resulted in the same error.

Apart from above I am having problem with some of the other topics. Have posted them in other forum and haven't got a proper response till now. It would be helpful if anything can be done from your end.

Default Portlets on page

CAS integration without LDAP

Regards,
Biresh
thumbnail
Gregory Amerson, modificado hace 13 años.

RE: How to add existing liferay porject to IDE

Liferay Legend Mensajes: 1123 Fecha de incorporación: 16/02/10 Mensajes recientes
Can you post the contents of your error log? Window > Show View > Other > Error Log
Biresh Choudhury, modificado hace 13 años.

RE: How to add existing liferay porject to IDE

Junior Member Mensajes: 29 Fecha de incorporación: 8/12/10 Mensajes recientes
Initially I found some error as attached.
Cleared all the error and tried to redo the whole process where I didn't get any such error.
thumbnail
Gregory Amerson, modificado hace 13 años.

RE: How to add existing liferay porject to IDE

Liferay Legend Mensajes: 1123 Fecha de incorporación: 16/02/10 Mensajes recientes
So does importing the chat-portlet work now without errors?
Biresh Choudhury, modificado hace 13 años.

RE: How to add existing liferay porject to IDE

Junior Member Mensajes: 29 Fecha de incorporación: 8/12/10 Mensajes recientes
Still not resolved.
Getting the same error. I posted the above comment in context to the error. As told by you I saw the error initially and tried to clear those and retried the process with same result and no error in Error Log. It means those error are related to some other problem.
thumbnail
Jennis Vaishnav, modificado hace 7 años.

RE: How to add existing liferay porject to IDE

Junior Member Mensajes: 59 Fecha de incorporación: 1/02/17 Mensajes recientes
Hi Biresh,
Try changing the perspective in your eclipse editor, the perspective might have been changed if you tried to create a gradle type project in eclipse editor.
Hope this helps.
M Gwen, modificado hace 11 años.

RE: How to add existing liferay porject to IDE

New Member Mensajes: 2 Fecha de incorporación: 29/06/12 Mensajes recientes
Hi all,

I have exactly the same trouble. I made an empty portlet (test-portlet) with a "BUILD SUCCEFUL", after I copy it in the same directory (liferay-plugins-sdk-6.1.0\portlets\test-portlet - Copie) and if i trie to open it via "New Liferay Project from Existing Source" I have the message "Invalid project location".

Eclipse indigo
Liferay 6.1.0
sdk 6.1.0


GM
M Gwen, modificado hace 11 años.

RE: How to add existing liferay porject to IDE

New Member Mensajes: 2 Fecha de incorporación: 29/06/12 Mensajes recientes
If I rename test-portlet - Copie to test-portlet-portlet it work, the name must have suffix "-portlet", it's a little bit stupid
Adam Hardy, modificado hace 11 años.

RE: How to add existing liferay porject to IDE

New Member Mensajes: 19 Fecha de incorporación: 18/05/12 Mensajes recientes
M Gwen:
If I rename test-portlet - Copie to test-portlet-portlet it work, the name must have suffix "-portlet", it's a little bit stupid



Yes, if you download the source code and search on the error message, you'll find that there's also checks hardwired for other suffixes, e.g. "-hook", "-ext" and "-theme".

Seems unnecessary to me. I don't know why your project should be invalid if you don't name it with one of those suffixes.
thumbnail
satya jangala, modificado hace 13 años.

RE: How to add existing liferay porject to IDE

New Member Mensajes: 8 Fecha de incorporación: 8/11/10 Mensajes recientes
hi ,

i am satya, i am working on liferay portal, i want to use the ,my login page instead of liferay login page , please suggessio n me ,

thanks
satya
thumbnail
Gregory Amerson, modificado hace 13 años.

RE: How to add existing liferay porject to IDE

Liferay Legend Mensajes: 1123 Fecha de incorporación: 16/02/10 Mensajes recientes
If you are using Liferay IDE plugins for Eclipse, you could modify the login page by creating a hook plugin and using the custom_jsp feature to override the login.jsp in the portal.
  • Create hook plugin
  • Open the New Hook Wizard
  • Select Custom JSPs option
  • Add a JSP, search in Add JSP dialog for *login.jsp
  • Select login.jsp
  • Click Finish
  • Edit the login.jsp in your project to make your modifications
  • deploy plugin to Liferay Server
thumbnail
Rohit Salecha, modificado hace 12 años.

RE: How to add existing liferay porject to IDE

Junior Member Mensajes: 50 Fecha de incorporación: 21/02/11 Mensajes recientes
Check this out

http://liferaydemystified.blogspot.com/