Deploying portlet with a liferay on cloudbees - liferay

I succed to deploy a liferay 6.1.1 on cloudbees thanks to this tutorial :
http://blog.cloudbees.com/2011/09/15-minutes-to-liferay-on-cloudbees-paas.html
Now, I'm asking how to deploy themes and custom portlets in this environment is there a way, or should I switch to another Paas solution?
Thanks,

You can either repackage liferay with the portlets into the "stack" and deploy that - or you can have liferay load the portlets from something other than the file system (filesystem support is needed for this to load dynamically, which is a work in progress).

Related

How to create a better UI in liferay

I am working on liferay 6.2, I created a site but this basic liferay UI is not looking good.
Can anyone tell be how to create a better UI in liferay.
I want to create a more appealing user interface with liferay.
You can create your own custom theme.You can go through liferay theme creation documents.
Also you can get many ready-made themes from liferay marketplace.
If you are using Liferay SDK, Eclipse or Liferay Developer Studio. You can create your own theme and here is the guideline:
https://www.liferay.com/documentation/liferay-portal/6.1/development/-/ai/creating-a-the-4

Find Source for Portlet

To learn more how to implement portlets in Liferay, I want to view the src of existing portlets, e.g. the "Documents and Media" Portlet. Where can I find this src code? I downloaded the src of Liferay but I cant find the relevant files.
The way to learn more about building portlets in Liferay is probably to check out the Liferay Plugins repository, rather than Liferay Portal source.
Some Liferay portlets come OOTB in Liferay Portal itself -- that's what #ArtemKhojoyan is mentioning above. However, as these portlets are pretty thoroughly integrated with the portal itself, they may not be super helpful in figuring out how to make a plugin to deploy on Liferay.
To check out some more standalone portlets, download the Plugins repo -- either by cloning the source on github with https://github.com/liferay/liferay-plugins.git, or downloading a plugins SDK at http://www.liferay.com/downloads/liferay-portal/additional-files -- and open up the portlets/ folder -- that's probably going to be more helpful in showing you hot-deployable portlets that will be more similar to something you'd make yourself.
For Liferay 6.2.0:
Java: \liferay-portal-src-6.2.0-ce-ga1\portal-impl\src
JSP: \liferay-portal-src-6.2.0-ce-ga1\portal-web\docroot\html\portlet
Your required case:
Java: \liferay-portal-src-6.2.0-ce-ga1\portal-impl\src\com\liferay\portlet\documentlibrary
JSP: \liferay-portal-src-6.2.0-ce-ga1\portal-web\docroot\html\portlet\document_library

Converting Vignette Portlets to Liferay Portlets

As the title states, i'm trying to convert these Vignette portlets into Liferay portlets.
Is there any documentation on this anywhere? I've searched the entire Internet
-When trying to deploy my WARs right off the bat, I'm getting a "missing liferay.plugin.packet.xml" which tells me the entire portlet must be reconfigured to work with Liferay.
-Running Liferay 6.1.1 ga2 on Web Logic 12c server
Cheers!
You mean "liferay-plugin-package.xml", don't you?
You will find such a file in the source of Liferay at /portal-web/docroot/WEB-INF/liferay-plugin-package.xml. For other examples just download sources from other Portlets (Github or Liferay-Marketplace).
Besides some other values, this file defines how Liferay should handle your war (layout-template, portlet, theme).
EDIT: As the marketplace does not allow (plz see the comment in: liferay-plugin-package_6_1_0.dtd) portlets having an liferay-plugin-package.xml, I would recommend to use the corresponding properties file.
Reference file (in the portal sources): /definitions/liferay-plugin-package_6_1_0.properties

Two portlets with same database

I am developing Liferay portal and I have one portlet which handles the administrator side of the portal and one the client side. The thing is that the clients cannot see the administrator page (including the portlet). Also I have created custom DataBase for the portal (I included my own tables in the Liferay database using Service Builder). Now I want to use the same database so I can take info from it using the client portlet.
Any ideas?
I am using Liferay 6.1 with Tomcat and Liferay SDK plugin for Eclipse.
You can copy the [portlet name]-service.jar from Web-Inf/lib, and paste it to any other portlet's lib folder. Even better if you can do this with maven and add this jar as a dependency. This way you can have access to the Util Classes that your service provides, to any other Portlet
All portlets in a plugin project share the service builder service made by that plugin (because they end up in one war file and thus share runtime context). So you could just put both your portlets in the same plugin and they can both access that plugin's service builder services/tables. I think you will find this is a commonly used approach. The permission and visibility issues you mention are not impacted by this organization.
Doing it this way keeps the deployment simple -- just deploy the plugin's war, done.
If there are reasons beyond your control that require the portlets to be in separate plugins, then it becomes harder -- yannicuLar's approach is one way.
If you have two portlets sharing same tables/entities , you can copy the service.jar to
tomcat-7.0.27\lib\ext a common location where these two portlets can access this .jar at runtime.

Liferay Export/Import LAR: automated

is there a way to create/export a LAR from liferay server A and import this in liferay server B with a script or even a maven/hudson plugin? I'm using Liferay 6.0.5.
thanks,
Stijn
The best way to achieve what you want is to make use of scheduling for remote publication. You can find this option in the manage pages portlet.
Keep in mind that you can deploy servlets in Liferay. I would package the war file as a "web" plugin as described in this article on Nabble in order to access the Liferay APIs. From here you could perform whatever units of work you want, of which exporting a lar file. Call the servlet URL with the appropriate parameters and you're g2g.
You may refer to following Liferay resources to get details of Liferay API:
http://docs.liferay.com/portal/6.1/javadocs/com/liferay/portal/service/LayoutLocalServiceUtil.html
https://github.com/liferay/liferay-portal/blob/master/portal-impl/src/com/liferay/portal/staging/StagingImpl.java

Resources