Liferay is a Gartner Magic Quadrant Leader for the Sixth Year! Find out why
« Torna a Liferay IDE

Liferay IDE Importing Existing Projects

Requirements #

Types of Projects For Import #

Below are the types of projects that are possible to import as Liferay IDE projects.

  • Vanilla Plug-ins SDK projects (not existing Eclipse projects)
  • Existing Eclipse projects that don't yet contain Liferay runtime or project facets
  • Liferay IDE projects from a previous version of the IDE or workspace

Step-by-Step Guides #

Guide: Import non-eclipse, plug-ins SDK project #

A non-eclipse plug-ins SDK project is a standard plug-ins SDK project (created inside the SDK folder structure) and does not have any existing .project, .classpath or .settings/ files that are a part of the eclipse project metadata.

There are two options for importing these types of projects:

Option #1, Import Existing Liferay Project Wizard #

Note This option assumes that you have Liferay plug-ins SDK and you have previous created projects inside of that directory structure.

  1. In Liferay IDE go to File > Import... > Liferay > Existing Liferay Project

  1. Or you can invoke the same menu from the Liferay Project wizard shortcut toolbar action

  1. Browse to the location of the project folder. Note the project folder should be a sub-directory of one of the plugin types, e.g. portlets, hooks, themes, etc.
  2. Once you select the plugin project folder you should see the plugin type and SDK version values get updated to correct values. If the SDK is not recent enough or project type is not correct it will be marked with error

  1. Next you will need to select a Liferay Runtime to configure on the project once it is imported.
  2. If you don't have a Liferay Runtime, use the New... button to create a new Liferay portal runtime (tomcat bundle only supported)

  1. Select Finish to perform the import

See the How-to Verify Project Import section to verify that your project was configured correctly as a Liferay IDE project.

Option #2, Import Liferay SDK Project Wizard #

Note This option assumes that you have Liferay plug-ins SDK and you have previous created projects inside of that directory structure.

  1. In Liferay IDE go to File > Import... > Liferay > Liferay SDK projects

  1. First you must select the Plug-ins SDK that you want to import projects from in the combo box at the top of the wizard

  1. If you don't have any SDKs configured in Liferay IDE use the "configure" link to add a setting that points to the Plug-ins SDK that you want to import projects from
  2. Note To configure a Plug-ins SDK on the Installed SDKs on the pref page just click Add and then Browse to the directory of the Plug-ins SDK root directory

  1. Once you have a configured Plug-ins SDK, you can select it in the Combo box and then SDK location and version will be filled in. If either are not valid it will be marked with an error.

  1. After the SDK is selected the list of projects that are available for import will be shown in the table. If the projects are already in the workspace they will be disabled. If the project is available for import it will have a empty checkbox that can be selected.

  1. Select which projects that you wish to import.
  2. Select the Liferay runtime that you want to setup for the imported projects
  3. Note if you don't have a liferay runtime you can add one with the "New..." button.
  4. Select Finish

See the How-to Verify Project Import section to verify that your project was configured correctly as a Liferay IDE project.

Guide: Convert existing eclipse project w/o Liferay runtime or project facets #

  • If you have a project that is already an eclipse project (it has .project/.classpath) and it is also inside of a plug-ins SDK folder structure, and if the project is not in your workspace you can use either of the options in the previous guide.
  • If your project is an eclipse project that is already in your eclipse workspace and you can see it in the package/project explorer, the following steps can be used to convert the project.

Step-by-step Guide:

  1. In Liferay IDE, right click the eclipse project that you want to convert to Liferay IDE project, select Liferay > Convert to Liferay plug-in project.

Note if you don't have a convert action available it means the project is either already a Liferay IDE project or it is not a faceted project with Java and Dynamic Web project facets configured and will need to be configured accordingly.

  1. When the convert dialog wizard opens your project should be auto-selected and the SDK location and SDK version should be auto-detected. If they are not valid an error message will be displayed.

  1. Select the Liferay runtime that you wish to set on the project.

Note if you don't have a Liferay Runtime define use the "New..." action to create one

  1. Select Finish

See the How-to Verify Project Import section to verify that your project was configured correctly as a Liferay IDE project.

Guide: Import previous Liferay IDE project #

If you have previously created or converted a Liferay IDE project in your workspace but it is no longer in the current workspace there are a couple of options for importing this project.

  • First option is to follow the steps in the first how-to guide option #1
  • Second option is to simply using the default Eclipse project import wizard with the steps below.

Step-by-step Guide:

  1. Open Liferay IDE, go to File > Import ... > General > Existing Projects into Workspace

  1. Use option Select root directory, then click Browse
  2. Select the directory of the previous Liferay IDE project
  3. Then in the list of projects you should see the one project you selected

  1. Click Finish

Note if you have any errors it may be that either the SDK name used in that project or the runtime id used doesn't exist in your new workspace. You can modify the SDK name in the Project Properties > Liferay page and you can modify the targeted runtime in the Project properties > Targeted Runtimes page.

See the How-to Verify Project Import section to verify that your project was configured correctly as a Liferay IDE project.

Verify Project Import Success #

  1. Once the project import process is finished, you should see a new project inside Eclipse and it should have a "L" overlay image to show its a Liferay project.

  1. Secondly, to make sure the project is now a "Liferay IDE" project is to check the target runtime project property (right-click project > properties > target runtimes) and also check the project facets to make sure both Liferay runtime and Liferay plug-in facets are properly configured.

17 Allegati
56908 Visualizzazioni
Media (4 Voti)
La media del punteggio è 4.75 stelle su 5.
Commenti
Commenti Autore Data
May i know the exact date? p chandru 23 giugno 2010 2.56
Don't know yet but I hope pretty soon. Gregory Amerson 24 giugno 2010 6.05
quick arron wu 7 luglio 2010 2.50
Can you please update if there are any... Nagendra Kumar Busam 1 settembre 2010 8.07
An update on this documentation should be... Gregory Amerson 15 settembre 2010 14.44
hi you have mention that we make a file or... vijay pandey 5 ottobre 2010 5.07
hi Is it right approach for making a Portal... vijay pandey 5 ottobre 2010 5.08
Hi Vijay, Could you post your question over on... Gregory Amerson 6 ottobre 2010 3.22
Good Evening Sir. Am downloaded sample... Kanmani Karthikeyan 4 dicembre 2012 5.17

May i know the exact date?
Inviato il 23/06/10 2.56.
Don't know yet but I hope pretty soon.
Inviato il 24/06/10 6.05 in risposta a p chandru.
Inviato il 07/07/10 2.50.
Can you please update if there are any documentation/links for the same
Inviato il 01/09/10 8.07.
An update on this documentation should be coming this week.
Inviato il 15/09/10 14.44 in risposta a Nagendra Kumar Busam.
hi
you have mention that we make a file or folder in root folder ...then make portal ...

Is it right approach for making a Portal from scratch or just Demo..

Please if possible Provide some basic steps for making liferay portal

Thanks in advance

Vijay pandey
Inviato il 05/10/10 5.07 in risposta a Nagendra Kumar Busam.
hi

Is it right approach for making a Portal from scratch or just Demo..

Please if possible Provide some basic steps for making liferay portal

Thanks in advance

Vijay pandey
Inviato il 05/10/10 5.08 in risposta a vijay pandey.
Hi Vijay,

Could you post your question over on the Liferay IDE forums? Thanks

http://www.liferay.com/community/forums/-/message_boards/category/4627757
Inviato il 06/10/10 3.22 in risposta a vijay pandey.
Good Evening Sir.

Am downloaded sample demo projects from
https://github.com/liferay/liferay-ide . but i cant able to add that demos to eclipse sir. can u explain me more about this sir. Thanks in advance ? . Am using liferay 6.1 and tomcat 6.1 versions sir.
Inviato il 04/12/12 5.17 in risposta a Gregory Amerson.