stack user1
stack user1

Reputation: 116

Deploy Liferay Portlet wars via Jenkins?

We are trying to automate the process of deploying the generated war files via Jenkins to web server. I was able to achieve the same for normal war files using Deploy plugin over tomcat server.

For Liferay portlet war files, I can't use the same plugin as we put war files into deploy folder in liferay and then it gets copied over to tomcat webapps folder.

Another approach I see is to add the deploy path in pom.xml <properties> <liferay.auto.deploy.dir>${deployPath}</liferay.auto.deploy.dir> <liferay.version>6.1.0</liferay.version> </properties> and then run the maven command mvn package liferay:deploy to copy to deploy directory.

Do you have any other option or thoughts, Thanks!

Upvotes: 3

Views: 1675

Answers (1)

Reigo
Reigo

Reputation: 285

If you want to deploy the wars using Jenkins then alternative would be using Liferay Plugin SDK provided Ant task that provides "ant deploy" command.

For maven projects the mvn liferay:deploy IS the correct and proper way of doing it!

Here's a link to the latest dev. guide on that subject: https://www.liferay.com/documentation/liferay-portal/6.2/development/-/ai/creating-a-portlet-project-liferay-portal-6-2-dev-guide-03-en

Upvotes: 0

Related Questions