1
votes

I am learning how to create portlets on Liferay 7 CE GA 3 portal platform.

For this, I created few test portlets using maven, gradle, by following the tutorials given in liferay site.

But now, I need to remove those portlets from the server. Whenever I start the tomcat server given inside Liferay's bundle, those previously deployed portlets comes up on the web page. I have tried but I can't find the war files deployed inside tomcat, in order to delete them.

I tried deleting the portlets folder inside work directory of liferay and also clearing the temp directory, but that didn't helped.

PS: I was manually deploying the portlets by copying the war file to 'deploy' directory of liferay bundle.

2
Which liferay version do you use?Shivam Aggarwal

2 Answers

3
votes

As you don't state the version of Liferay that you're using:

In 6.x, you'll find the WAR files (or web applications) wherever your application server deploys them - e.g. in tomcat/webapps. You only need to undeploy them from Tomcat (or your appserver) and they will also be undeployed from Liferay.

In 7.0 and DXP, those files will be deployed to the OSGi runtime and the artifacts end up in Liferay's /osgi/ folder, most likely /osgi/war - or if you package as JAR bundles in /osgi/modules (otherwise search for known filenames in /osgi subdirectories

3
votes

I'm using Liferay 7.0 DXP bundled with tomcat 8.

I tried deleting/deactivating deployed modules from Control Panel using Admin credentials. That just worked for me in that instance, but If I restart the server again these modules were deployed on the server startup.

The below solution worked for me with the above-mentioned configurations.

{LIFERAY_HOME}/osgi/modules -- jar modules

{LIFERAY_HOME}/osgi/war -- war modules

{LIFERAY_HOME}/osgi/marketplace -- any .lpkg files that were downloaded from Liferay's Marketplace