Forums

Home » Liferay IDE » English

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
How to add existing liferay porject to IDE Biresh Choudhury March 10, 2011 5:33 AM
RE: How to add existing liferay porject to IDE Gregory Amerson March 10, 2011 12:17 PM
RE: How to add existing liferay porject to IDE Biresh Choudhury March 10, 2011 9:12 PM
RE: How to add existing liferay porject to IDE Biresh Choudhury March 11, 2011 12:22 AM
RE: How to add existing liferay porject to IDE Gregory Amerson March 11, 2011 7:50 AM
RE: How to add existing liferay porject to IDE Biresh Choudhury March 15, 2011 6:15 AM
RE: How to add existing liferay porject to IDE SZ khan March 15, 2011 6:58 AM
RE: How to add existing liferay porject to IDE Gregory Amerson March 15, 2011 7:31 AM
RE: How to add existing liferay porject to IDE Biresh Choudhury March 24, 2011 1:16 AM
RE: How to add existing liferay porject to IDE Gregory Amerson March 25, 2011 12:15 AM
RE: How to add existing liferay porject to IDE Biresh Choudhury March 30, 2011 4:18 AM
RE: How to add existing liferay porject to IDE Gregory Amerson March 30, 2011 12:30 PM
RE: How to add existing liferay porject to IDE Biresh Choudhury March 30, 2011 10:12 PM
RE: How to add existing liferay porject to IDE Gregory Amerson March 31, 2011 11:30 AM
RE: How to add existing liferay porject to IDE Biresh Choudhury April 10, 2011 10:32 PM
RE: How to add existing liferay porject to IDE Gregory Amerson April 11, 2011 7:02 AM
RE: How to add existing liferay porject to IDE Biresh Choudhury April 12, 2011 9:41 PM
RE: How to add existing liferay porject to IDE Gregory Amerson April 13, 2011 4:35 AM
RE: How to add existing liferay porject to IDE Biresh Choudhury April 13, 2011 5:06 AM
RE: How to add existing liferay porject to IDE M Gwen June 29, 2012 7:14 AM
RE: How to add existing liferay porject to IDE M Gwen June 29, 2012 7:23 AM
RE: How to add existing liferay porject to IDE Adam Hardy July 2, 2012 1:52 AM
RE: How to add existing liferay porject to IDE satya jangala March 26, 2011 3:42 AM
RE: How to add existing liferay porject to IDE Gregory Amerson March 28, 2011 6:40 AM
RE: How to add existing liferay porject to IDE Rohit Salecha May 4, 2011 5:37 AM
Biresh Choudhury
How to add existing liferay porject to IDE
March 10, 2011 5:33 AM
Answer

Biresh Choudhury

Rank: Junior Member

Posts: 29

Join Date: December 8, 2010

Recent Posts

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
Gregory Amerson
RE: How to add existing liferay porject to IDE
March 10, 2011 12:17 PM
Answer

Gregory Amerson

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1041

Join Date: February 16, 2010

Recent Posts

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
RE: How to add existing liferay porject to IDE
March 10, 2011 9:12 PM
Answer

Biresh Choudhury

Rank: Junior Member

Posts: 29

Join Date: December 8, 2010

Recent Posts

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.
Attachments: WorkSpaceError Screen shot.bmp (739.7k)
Biresh Choudhury
RE: How to add existing liferay porject to IDE
March 11, 2011 12:22 AM
Answer

Biresh Choudhury

Rank: Junior Member

Posts: 29

Join Date: December 8, 2010

Recent Posts

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.
Gregory Amerson
RE: How to add existing liferay porject to IDE
March 11, 2011 7:50 AM
Answer

Gregory Amerson

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1041

Join Date: February 16, 2010

Recent Posts

Originally when You tried to import chat-portlet it was in your workspace directory, directly under the workspace,
1D:\liferay_workspace\chat-portlet


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


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

and add it to this directory:
1D:\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
RE: How to add existing liferay porject to IDE
March 15, 2011 6:15 AM
Answer

Biresh Choudhury

Rank: Junior Member

Posts: 29

Join Date: December 8, 2010

Recent Posts

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
RE: How to add existing liferay porject to IDE
March 15, 2011 6:58 AM
Answer

SZ khan

Rank: Regular Member

Posts: 148

Join Date: October 31, 2009

Recent Posts

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
Gregory Amerson
RE: How to add existing liferay porject to IDE
March 15, 2011 7:31 AM
Answer

Gregory Amerson

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1041

Join Date: February 16, 2010

Recent Posts

What are the contents of this directory?
1D:\liferay-plugins-sdk-6.0.6
Is it a full copy of the SDK?
Biresh Choudhury
RE: How to add existing liferay porject to IDE
March 24, 2011 1:16 AM
Answer

Biresh Choudhury

Rank: Junior Member

Posts: 29

Join Date: December 8, 2010

Recent Posts

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.
Gregory Amerson
RE: How to add existing liferay porject to IDE
March 25, 2011 12:15 AM
Answer

Gregory Amerson

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1041

Join Date: February 16, 2010

Recent Posts

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!
satya jangala
RE: How to add existing liferay porject to IDE
March 26, 2011 3:42 AM
Answer

satya jangala

Rank: New Member

Posts: 8

Join Date: November 8, 2010

Recent Posts

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
Gregory Amerson
RE: How to add existing liferay porject to IDE
March 28, 2011 6:40 AM
Answer

Gregory Amerson

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1041

Join Date: February 16, 2010

Recent Posts

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.
  1. Create hook plugin
  2. Open the New Hook Wizard
  3. Select Custom JSPs option
  4. Add a JSP, search in Add JSP dialog for *login.jsp
  5. Select login.jsp
  6. Click Finish
  7. Edit the login.jsp in your project to make your modifications
  8. deploy plugin to Liferay Server
Biresh Choudhury
RE: How to add existing liferay porject to IDE
March 30, 2011 4:18 AM
Answer

Biresh Choudhury

Rank: Junior Member

Posts: 29

Join Date: December 8, 2010

Recent Posts

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.
Attachments: Chat Portlet Addition Error.docx (144.4k)
Gregory Amerson
RE: How to add existing liferay porject to IDE
March 30, 2011 12:30 PM
Answer

Gregory Amerson

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1041

Join Date: February 16, 2010

Recent Posts

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:
1D:\liferay-plugins-sdk-6.0.6\plugins_sdk\portlets\chat-portlet
Biresh Choudhury
RE: How to add existing liferay porject to IDE
March 30, 2011 10:12 PM
Answer

Biresh Choudhury

Rank: Junior Member

Posts: 29

Join Date: December 8, 2010

Recent Posts

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.
Attachments: Chat Portlet Addition Error.docx (175.6k)
Gregory Amerson
RE: How to add existing liferay porject to IDE
March 31, 2011 11:30 AM
Answer

Gregory Amerson

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1041

Join Date: February 16, 2010

Recent Posts

Try creating a liferay runtime first before you import the project to see if that lets you complete the wizard.
Biresh Choudhury
RE: How to add existing liferay porject to IDE
April 10, 2011 10:32 PM
Answer

Biresh Choudhury

Rank: Junior Member

Posts: 29

Join Date: December 8, 2010

Recent Posts

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
Gregory Amerson
RE: How to add existing liferay porject to IDE
April 11, 2011 7:02 AM
Answer

Gregory Amerson

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1041

Join Date: February 16, 2010

Recent Posts

Can you post the contents of your error log? Window > Show View > Other > Error Log
Biresh Choudhury
RE: How to add existing liferay porject to IDE
April 12, 2011 9:41 PM
Answer

Biresh Choudhury

Rank: Junior Member

Posts: 29

Join Date: December 8, 2010

Recent Posts

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.
Gregory Amerson
RE: How to add existing liferay porject to IDE
April 13, 2011 4:35 AM
Answer

Gregory Amerson

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1041

Join Date: February 16, 2010

Recent Posts

So does importing the chat-portlet work now without errors?
Biresh Choudhury
RE: How to add existing liferay porject to IDE
April 13, 2011 5:06 AM
Answer

Biresh Choudhury

Rank: Junior Member

Posts: 29

Join Date: December 8, 2010

Recent Posts

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.
Rohit Salecha
RE: How to add existing liferay porject to IDE
May 4, 2011 5:37 AM
Answer

Rohit Salecha

Rank: Junior Member

Posts: 50

Join Date: February 20, 2011

Recent Posts

Check this out

http://liferaydemystified.blogspot.com/
M Gwen
RE: How to add existing liferay porject to IDE
June 29, 2012 7:14 AM
Answer

M Gwen

Rank: New Member

Posts: 2

Join Date: June 29, 2012

Recent Posts

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
RE: How to add existing liferay porject to IDE
June 29, 2012 7:23 AM
Answer

M Gwen

Rank: New Member

Posts: 2

Join Date: June 29, 2012

Recent Posts

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
RE: How to add existing liferay porject to IDE
July 2, 2012 1:52 AM
Answer

Adam Hardy

Rank: New Member

Posts: 19

Join Date: May 18, 2012

Recent Posts

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.