掲示板

How to create portlet from scratch in eclipse ?

12年前 に Guenter baumgart によって更新されました。

How to create portlet from scratch in eclipse ?

Regular Member 投稿: 119 参加年月日: 12/01/27 最新の投稿
Hi,

it seems that the ce/ee eclipse plugins fails with large projects(400MB+). I created in eclipse and my-eclipse the very same project as the the plug-ins created. I added all libs from tomcat/lib/ext etc...

Tomcat however never loads my self-made portlet. I guess that has something to do with the Plug-In run-time. How to add it to my project correctly ?

Thanks
thumbnail
12年前 に David H Nebinger によって更新されました。

RE: How to create portlet from scratch in eclipse ?

Liferay Legend 投稿: 14916 参加年月日: 06/09/02 最新の投稿
Manually deploying your portlet is possible, but requires a tomcat restart (when tomcat/liferay start up, liferay will interrogate installed wars and handle the portlets contained with).

Alternatively if you drop your war into Liferay's deploy folder instead of the tomcat webapps directory, Liferay will handle the deployment and register all portlets while the system is live and will not require a tomcat restart.
thumbnail
12年前 に Hitoshi Ozawa によって更新されました。

RE: How to create portlet from scratch in eclipse ?

Liferay Legend 投稿: 7942 参加年月日: 10/03/24 最新の投稿
It's difficult to find what the problem is in your situation because you haven't posted any error messages, but from others' similar messages, have you checked your Java memory settings in \bin\setenv.bat or \bin\setenv.sh? Increasing usually solved the problem.
12年前 に Guenter baumgart によって更新されました。

RE: How to create portlet from scratch in eclipse ?

Regular Member 投稿: 119 参加年月日: 12/01/27 最新の投稿
Hi,

Makes me happy that newbies recieve support here !

I finally built the liferay from source with all my resources etc included. I also integrated my base frameworks as jars instead of full sources. It behaves far better except that I sill get a zip exceptions. Sometimes there are also stackoverflows very randomly. I am using struts2 with the json plugin together and I am still figuring out whats the best practice to develop portlets for Liferay.

I can stick now however to the eclipse plug-ins which is definitly a time saver.

Thanks for your replies again.
thumbnail
12年前 に Hitoshi Ozawa によって更新されました。

RE: How to create portlet from scratch in eclipse ?

Liferay Legend 投稿: 7942 参加年月日: 10/03/24 最新の投稿
If you have problem with using the Liferay Eclipse plugin, you'll probably receive a much better support at the IDE forum instead of here especially because the developer of the plugin is there to help you.

http://www.liferay.com/community/forums/-/message_boards/category/4627757
thumbnail
12年前 に David H Nebinger によって更新されました。

RE: How to create portlet from scratch in eclipse ?

Liferay Legend 投稿: 14916 参加年月日: 06/09/02 最新の投稿
Guenter Baumgart:
Makes me happy that newbies recieve support here !


We all started as newbies, so this is just our attempt to give back...

I finally built the liferay from source with all my resources etc included. I also integrated my base frameworks as jars instead of full sources.


This is definitely the wrong way to go. You should not be modifying the liferay sources and/or adding/removing files to the Liferay source tree as it will make your ability to upgrade Liferay later on much more difficult.

If you need to extend/replace Liferay functionality, you can use either a hook plugin or an EXT plugin (depends upon what kind of change that you are trying to make).

If your resources are strictly for your portlet, then they should be deployed with the portlet. If the resources are needed across multiple portlets, then consider using a theme to bundle and deploy the resources.

But never, ever, modify the Liferay source.

It behaves far better except that I sill get a zip exceptions.


When do you get these? During hot deployment? When I get them, it is due to Liferay trying to hot-deploy a war file that is still in the process of getting copied to the deploy directory at the tail end of a build run. Liferay re-tries the zip file and goes on, so this exception can be ignored.

Sometimes there are also stackoverflows very randomly. I am using struts2 with the json plugin together and I am still figuring out whats the best practice to develop portlets for Liferay.


Use the official Liferay plugins SDK. Leverage the eclipse plugin to help with project creation and editing.

But most of all, read the developer documentation for what the different plugin types are and when they should be used.
12年前 に Guenter Baumgart によって更新されました。

RE: How to create portlet from scratch in eclipse ?

Regular Member 投稿: 119 参加年月日: 12/01/27 最新の投稿
Hi,

thanks for your detailed reply. We only use 20% of Liferay's end-user features and I like when its light :-) I am used to large upgrade tasks.
The zip errors come up due the hotdeploy, yup.

We are embedding a mobile app studio inside Liferay. We probably fork it to something smaller. Are there any intentions to put it into maven ?
Thanks again, Guenter.
thumbnail
12年前 に Hitoshi Ozawa によって更新されました。

RE: How to create portlet from scratch in eclipse ?

Liferay Legend 投稿: 7942 参加年月日: 10/03/24 最新の投稿
We are embedding a mobile app studio inside Liferay.


I do hope that you know that Liferay community version if under LGPL. This means if your modify Liferay's source code and distribute it, you'll have to distribute ALL source code including your source code for you mobile app studio. That's another reason to use plugin to overwrite Liferay's files instead of directly modifying Liferay's source code.
12年前 に Guenter Baumgart によって更新されました。

RE: How to create portlet from scratch in eclipse ?

Regular Member 投稿: 119 参加年月日: 12/01/27 最新の投稿
Hi,
thanks for the hint. Technically yes, but I doubt somebody knocks at the door and is asking for all our source code.

G
thumbnail
12年前 に Hitoshi Ozawa によって更新されました。

RE: How to create portlet from scratch in eclipse ?

Liferay Legend 投稿: 7942 参加年月日: 10/03/24 最新の投稿
thanks for the hint. Technically yes, but I doubt somebody knocks at the door and is asking for all our source code.


Not unless your product is very successful or unless Liferay.com is bought out by somebody Oracle or Microsoft. :-)
12年前 に Guenter Baumgart によって更新されました。

RE: How to create portlet from scratch in eclipse ?

Regular Member 投稿: 119 参加年月日: 12/01/27 最新の投稿
Good Point :-) Made me really thinking.
It could be good or bad, usually its bad as for Openplug, Virtools and many others.
Luckily we won't risk to much dependency on Liferay.
Salute,
g