« 返回到 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 附件
67545 查看
平均 (4 票)
满分为 5,平均得分为 4.75。
评论
讨论主题回复 作者 日期
May i know the exact date? p chandru 2010年6月23日 上午2:56
Don't know yet but I hope pretty soon. Greg Amerson 2010年6月24日 上午6:05
quick arron wu 2010年7月7日 上午2:50
Can you please update if there are any... Nagendra Kumar Busam 2010年9月1日 上午8:07
An update on this documentation should be... Greg Amerson 2010年9月15日 下午2:44
hi you have mention that we make a file or... vijay pandey 2010年10月5日 上午5:07
hi Is it right approach for making a Portal... vijay pandey 2010年10月5日 上午5:08
Hi Vijay, Could you post your question over on... Greg Amerson 2010年10月6日 上午3:22
Good Evening Sir. Am downloaded sample... Kanmani Karthikeyan 2012年12月4日 上午5:17

May i know the exact date?
在 10-6-23 上午2:56 发帖。
Don't know yet but I hope pretty soon.
在 10-6-24 上午6:05 发帖以回复 p chandru
在 10-7-7 上午2:50 发帖。
Can you please update if there are any documentation/links for the same
在 10-9-1 上午8:07 发帖。
An update on this documentation should be coming this week.
在 10-9-15 下午2:44 发帖以回复 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
在 10-10-5 上午5:07 发帖以回复 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
在 10-10-5 上午5:08 发帖以回复 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
在 10-10-6 上午3:22 发帖以回复 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.
在 12-12-4 上午5:17 发帖以回复 Gregory Amerson