Liferay IntelliJ Plugin 之初体验

https://github.com/gamerson/liferay-intellij-plugin

从源码构建

如果你想从源码构建, 使用以下命令:

$ ./gradlew clean build

该命令完成后本地构建的IntelliJ Idea插件就会出现在:

build/distributions/liferay-idea-plugin-<version>.zip

你可以在IDEA的菜单 Preferences > Plugins > Install plugin from disk… > 指向上一步生成的本地插件zip文件 来安装。

重要特性

Liferay Workspace

  1. Create a Liferay Workspace Project from Start menu > click Create New Project or click File > New > Project
  2. Choose Liferay Workspace from left list
  3. Click Next button
  4. Type your Liferay Workspace Project Name and choose a Project Location or leave it default.
  5. Click Finish button and there will be one popup show up.
  6. Click OK to finish

Liferay Server

You must have one Liferay Workspace Project to do the following steps:

  1. Right click on the root of your Liferay Workspace Project
  2. Click Liferay > InitBundle
  3. Then the gradle will run initBundle task
  4. It will take several minutes to download the latest Liferay Server from remote if you don’t have the local cache
  5. Click Edit configruration… on the right top corner
  6. Click the plus icon
  7. Choose Liferay Server
  8. You can leave the config values by default or change to what you want
  9. Click OK Bundle
  10. After you add a new Liferay Server, you can start or debug it

Liferay Module

You must have one Liferay Workspace Project to do the following steps:

  1. Right click on existing Liferay Workspace Project and choose New > Liferay Module
  2. Choose Liferay Modules
  3. Depends on what template you choose, you can type Package Name, Class Name and Service Name
  4. Click Next Button
  5. Type Project Name and the location is not able to customize.
  6. Click Finish Button

Liferay Fragment Module

You must have one Liferay Workspace Project and alreay get the Liferay Server to do the following steps:

  1. Right click on existing Liferay Workspace Project and choose New > Liferay Module
  2. Choose Liferay Fragment Modules
  3. Choose the osgi host and select the jsp files what you want to hook.
  4. Click Next Button
  5. Type Project Name and the location is not able to customize.
  6. Click Finish Button

Deployment

After you get the Liferay Modules you can deploy them to running or debugging Liferay Server:

  1. Right Click on your Liferay Module
  2. Choose Liferay > Deploy
  3. When you see the log showing in the console view, you get your module successful deploying

License

This library, Liferay IDE, is free software (“Licensed Software”); you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; including but not limited to, the implied warranty of MERCHANTABILITY, NONINFRINGEMENT, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

http://www.viqsoft.com/blog/2018/05/29/liferay-intellij-plugin-try-out/

华为云优惠多多,更有新用户低至4折,欢迎点击此处或者扫码进入

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: