liferay6.1 将开发的plugin源代码导入到liferay ide
来源:互联网 发布:2017森林资源调查数据 编辑:程序博客网 时间:2024/06/05 10:59
主要就是将已存在的源代码放到liferay sdk下的portlets目录下,比如C:\work\liferay-plugins-sdk-6.1.0-ce-ga1-20120106155615760\portlets下,然后new-->liferay porject from existing source.然后在接下来的对话框中的browse 选择目录中要导入的工程即可。
下面的文章转载自liferay官网http://www.liferay.com/documentation/liferay-portal/6.0/development/-/ai/importing-existing-projects-into-liferay-ide
Importing Existing Projects into Liferay IDE
If you have been following the examples of this guide using the Plugins SDK or have previous plugins developed with it that you want to keep developing with Liferay IDE then this section is for you. It also shows other options to import. Specifically it shows how to import from:
Existing Liferay projects that are not in Eclipse workspace
Projects already in Eclipse but not Liferay IDE (don't have Liferay facet or target runtime)
Existing Liferay IDE projects from another version of Liferay IDE or workspace
The following subsections describe the steps for each of them with more detail.
Importing existing Liferay Project from a Plugins SDK
An existing Liferay project that has been created by the Plugins SDK but has not yet been added to an Eclipse workspace or have not been added to the current workspace open in Eclipse/Liferay IDE. These projects may or may not have .project or .classpath files. Whether they do or don't we will follow the same steps and use the same wizard.
There are two options to create projects from existing sources, depending on whether you want to create one single project or multiple projects from the same SDK. Let's see both in detail.
Note: The two next sections assume that you have Liferay plug-ins SDK directory structure and you have previously created projects inside of that directory structure
Create one single project from one plugin in an existing sources
This option will create one project for a single plugin that already exists inside a Plugins SDK.
In Eclipse, go to File > New > Project... > Liferay > Liferay Project from Existing Source
E:\src code\tools\trunk\ide\eclipse\common\plugins\com.liferay.ide.eclipse.doc\help\tasks\images\existing-project-wizard-shortcut.png
Or you can invoke the same wizard from the Liferay shortcut bar
E:\src code\tools\trunk\ide\eclipse\common\plugins\com.liferay.ide.eclipse.doc\help\tasks\images\existing-project-wizard-shortcut-toolbar.png
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. If not it will not be able to be imported correctly. 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 an error.
E:\src code\tools\trunk\ide\eclipse\common\plugins\com.liferay.ide.eclipse.doc\help\tasks\images\existing-project-browse.png
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
Next you will need to select a Liferay Runtime to configure on the project once it is imported. If you don't have a Liferay Runtime, use the New... button to create a new Liferay portal runtime (tomcat bundle only supported).
Click Finish to perform the import
Read the section below on verifying the success of an import process to make sure that your project was configured correctly as a Liferay IDE project.
Create multiple projects for all plugins in a Plugins SDK
This option will transverse an existing Plugins SDK and will allow creating one project for each of the plugins it finds inside in one single step.
In Eclipse go to File > Import... > Liferay > Liferay Plugin SDK projects
E:\src code\tools\trunk\ide\eclipse\common\plugins\com.liferay.ide.eclipse.doc\help\tasks\images\existing-project-sdk-projects.png
First you must select the Plugins SDK that you want to import projects from in the combo box at the top of the wizard.
E:\src code\tools\trunk\ide\eclipse\common\plugins\com.liferay.ide.eclipse.doc\help\tasks\images\existing-project-sdk-projects-wizard.png
If you don't have any SDKs configured in Liferay IDE use the "configure" link to add a setting that points to the Plugins SDK that you want to import projects from.
To configure a Plugins SDK on the Installed SDKs on the pref page just click "Add" and then Browse to the directory of the Plugins SDK root directory.
Once you have a configured Plugins SDK, you can select it in the Combo box and then the SDK location and version will be filled in. If either are not valid it will be marked with an error.
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.
E:\src code\tools\trunk\ide\eclipse\common\plugins\com.liferay.ide.eclipse.doc\help\tasks\images\existing-project-sdk-projects-wizard-3.png
Select which projects that you wish to import.
Select the Liferay runtime that you want to setup for the imported projects.
If you don't have a liferay runtime you can add one with the "New..." button.
E:\src code\tools\trunk\ide\eclipse\common\plugins\com.liferay.ide.eclipse.doc\help\tasks\images\existing-project-select-runtime.png
Click Finish.
Read the section below on verifying the success of an import process to make sure that your project was configured correctly as a Liferay IDE project.
Importing an existing Eclipse Project that is not aware of the Liferay IDE
If your project is not in your Eclipse workspace, you can use the first set of steps above. If your project is already in your workspace (see it in project explorer) but is not yet a Liferay IDE project, the following steps can be used to convert the project.
In Eclipse, right click the eclipse project that you want to convert, 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
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.
E:\src code\tools\trunk\ide\eclipse\common\plugins\com.liferay.ide.eclipse.doc\help\tasks\images\existing-project-convert-wizard.png
Select the Liferay runtime that you wish to set on the project. If you don't have a Liferay Runtime define use the "New..." action to create one.
E:\src code\tools\trunk\ide\eclipse\common\plugins\com.liferay.ide.eclipse.doc\help\tasks\images\existing-project-select-runtime.png
Click Finish.
Read the section below on verifying the success of an import process to make sure that your project was configured correctly as a Liferay IDE project.
Importing an existing Liferay IDE project
This section describes the steps that can be followed 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.
Open Liferay IDE, go to File > Import ... > General > Existing Projects into Workspace
Use option Select root directory, then click Browse
Select the directory of the previous Liferay IDE project
Then in the list of projects you should see the one project you selected
Click Finish
Read the section below on verifying the success of an import process to make sure that your project was configured correctly as a Liferay IDE project.
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.
Verifying that the import has succeeded
Follow the following steps to verify that either of the previous import processes has been successful.
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.
E:\src code\tools\trunk\ide\eclipse\common\plugins\com.liferay.ide.eclipse.doc\help\tasks\images\existing-project_overlay.png
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.
E:\src code\tools\trunk\ide\eclipse\common\plugins\com.liferay.ide.eclipse.doc\help\tasks\images\existing-project_runtime.png
E:\src code\tools\trunk\ide\eclipse\common\plugins\com.liferay.ide.eclipse.doc\help\tasks\images\existing-project_facets.png
- liferay6.1 将开发的plugin源代码导入到liferay ide
- Liferay Plugin SDK开发与Ext开发的选择
- Liferay Plugin SDK开发与Ext开发的选择
- 如何将已经建好的项目导入到Scala IDE forEclipse中
- liferay plugin 形式开发 deploy.hot.HotDeployException
- 将eclipse开发的web项目导入到myeclipse
- 将eclipse开发的web项目导入到myeclipse
- Liferay IDE开发如何使用SVN
- Kafka源代码导入Scala IDE
- liferay6.2的开发学习文档
- Liferay6.2开发之FriendlyURL的使用
- Liferay6.2开发之FriendlyURL的使用
- 怎么将android源代码导入到eclipse里
- liferay6.2系统管理员篇-liferay的内容管理系统WCM来进行站点快速建立
- 将vim作为QT开发的IDE
- 将vim作为QT开发的IDE
- [Liferay6.2]Liferay Dynamic Query API示例
- Liferay自开发portlet的6.1到6.2升级
- 循环使用整个NSArray内的对象
- [控件]ProgressDialog对话框进度条
- linux文件搜索查找命令
- Java读取properties配置文件时,中文乱码解决方法
- 线性内插interp1函数用法
- liferay6.1 将开发的plugin源代码导入到liferay ide
- oracle and mysql procedure
- Android上的bug定位(troubleshooting)
- Unity3d 游戏物体
- 用Microsoft Ajax Minifier技术高效率压缩Js文件
- 我很喜欢这个博客
- poj 3621(参数搜索+二分+spfa负环求解)
- FFmepg - 编译
- Android Tombstone/Crash的log分析和定位