掲示板

Liferay remote portlet deployment from Jenkins/Hudson using Maven

11年前 に Jan W. によって更新されました。

Liferay remote portlet deployment from Jenkins/Hudson using Maven

New Member 投稿: 2 参加年月日: 12/05/28 最新の投稿
Hi all!
I created my portlet application and i want to remotely deploy it to my liferay tomcat bundle. I successfully managed to do so, by manually (and locally) copying .war file into liferay deploy folder. However it is not that easy with remote deployment.
First let me say, that i am aware about the SDK plugin, that allows for remote deployment (at least that is what i have red, i didn't try it), but it is not suitable for use with continuous integration engines such as Hudson. I need something that works in a script fashion from the console, preferably with maven support.
I tried to use tomcats manager, and this is what i accomplished:
1. I copied whole /manager folder from vanilla tomcat into liferay`s tomcat webapps folder, as it is not provided by default
2. I created appropriate manager.xml file in conf/Catalina/localhost but later it turned out this file is not needed for Manager to work (anyway i tried both with and without it)
3. I added manager-script and admin-script roles in tomcat-users.xml
4. I tried to deploy/redeploy/undeploy my .war using both tomcat6-maven-plugin and tomcat7-maven-plugin (2.0 SNAPSHOT from org.apache.tomcat.maven)

The result:
1. war file transfers successfully into liferay tomcats /webapps folder
2. it successfully explodes into its path (which is basically the wars name)
3. if it is a normal webapplication it works perfectly (i can acces it and use it from tomcat_url:port/context_path_name)

Unfortunately my webapp is a portlet and for unknown to me reason it doesn't register in liferay, and so it is NOT available for use.

Summing up my question is:
1. What should i do, to make my portlet register in liferay during remote deployment, so I can use it and add it to dashboard?
OR
2. Is there any other way (than using tomcats manager) to deploy maven portlet project remotely using any kind of script that can be executed by Hudson?

If this is any easier with other application servers i can try and work with other bundles.
11年前 に Tarkan Corak によって更新されました。

RE: Liferay remote portlet deployment from Jenkins/Hudson using Maven

Regular Member 投稿: 141 参加年月日: 08/10/07 最新の投稿
Hi Jan,

Liferay Plugin Packages have to be deployed by Liferay, not Tomcat. Therefor you shouldn't copy the war file to Tomcat's webapps folder, but to Liferay's deploy folder.
Please also have a look at this blog entry.

Tarkan
11年前 に Jan W. によって更新されました。

RE: Liferay remote portlet deployment from Jenkins/Hudson using Maven

New Member 投稿: 2 参加年月日: 12/05/28 最新の投稿
Hi Tarkan,

I`m not sure you understood the nature of my problem. It`s clear to me, that normal deployment procedure requires one to copy war into deploy folder (as i wrote in my first post), however, I`m asking for solution to REMOTE deployment - meaning i cannot access the deployment folder.

Using tomcats manager was just one of my ideas, I`m not saying the right one - it was simply the closest i got to remotely deploying .war into liferay. I just want to be able to remotely deploy my portlet - it doesn't really matter to me how, as long as i can preform this action automatically (using any CI platform, e.g. Hudson).

Once again - my Hudson won't be on the same system/computer as the portal. Ideally it wont be even in the same local network.

P.S. I tried with both bundled liferay and liferay.war - same results.
9年前 に Kristof Szalontai によって更新されました。

RE: Liferay remote portlet deployment from Jenkins/Hudson using Maven

New Member 投稿: 2 参加年月日: 14/09/19 最新の投稿
Hi Jan,

Could you solve this problem?
We are setting up our DEV, QA and ACT environment, and facing the same issue.

Liferay portal on a remote server (clustered), and we would like to deploy our maven projects (root project pom.xml with multiple portlets as sub-projects) both from command line and from Jenkins.

Thanks

Regards, Kristof
9年前 に Codzy Wezzog によって更新されました。

RE: Liferay remote portlet deployment from Jenkins/Hudson using Maven

New Member 投稿: 5 参加年月日: 14/10/23 最新の投稿
Hi, I don't know if this can help. But here we hav 3 environment DEV, Pre-production, production and I've made a deployment pipeline with jenkins/maven/git with the help of PublishOverSSH.

1-Build the project with maven.
2- connect to the server with the "publisher" user that has some rights on the deploy folder.
3- push the war file(s).

For pre-production and production I have some upstream jobs that prepare the deployement taking the right branch, automatically merging some branches, generating the changelog with Jira, tagging a production version, etc.
thumbnail
8年前 に darren rose によって更新されました。

RE: Liferay remote portlet deployment from Jenkins/Hudson using Maven

Regular Member 投稿: 215 参加年月日: 15/04/04 最新の投稿
Codzy Wezzog:
Hi, I don't know if this can help. But here we hav 3 environment DEV, Pre-production, production and I've made a deployment pipeline with jenkins/maven/git with the help of PublishOverSSH.

1-Build the project with maven.
2- connect to the server with the "publisher" user that has some rights on the deploy folder.
3- push the war file(s).

For pre-production and production I have some upstream jobs that prepare the deployement taking the right branch, automatically merging some branches, generating the changelog with Jira, tagging a production version, etc.


depoying portlets from a ci server should be supported - this is a basic requirementment, especially, re-deploying
8年前 に Kristof Szalontai によって更新されました。

RE: Liferay remote portlet deployment from Jenkins/Hudson using Maven

New Member 投稿: 2 参加年月日: 14/09/19 最新の投稿
we solved the issue by using both a Liferay and Jenkins plugin:


You need to install the Remote IDE Connector plugin to the remote instance of Liferay portal.
There are both CE version and EE version

Now you can deploy it via your Eclipse: tutorial

Or you can use Jenkins plugin, but be aware this issue (you need to download the source, fix it, and build it)