Fórum

Delete Modules from Liferay 7.0 /osgi/modules Folder Empty

Paul Allain, modificado 7 Anos atrás.

Delete Modules from Liferay 7.0 /osgi/modules Folder Empty

Junior Member Postagens: 77 Data de Entrada: 03/09/13 Postagens Recentes
Hello,

There is a little bit of information out there regarding making a Liferay install lightweight by deleting unused modules from an installation. This is one of the compelling reasons to modularising Liferay by adopting OSGi.

The solution discussed seem straightforward enough, all one has to do is go into osgi/modules and delete the unwanted portlets. My problem is that I looked at installations on Windows and Linux and the osgi/modules folder is empty on both platforms.

Where are all the jars for the portlets if the /osgi/modules/ folder is empty? Is it more correct to use the gogo shell to disable/remove the unwanted modules?

Thanks
thumbnail
David H Nebinger, modificado 7 Anos atrás.

RE: Delete Modules from Liferay 7.0 /osgi/modules Folder Empty

Liferay Legend Postagens: 14914 Data de Entrada: 02/09/06 Postagens Recentes
All Liferay modules are bundled in the osgi/marketplace .lpkg files. You'd have to bust them open, toss the ones you don't want and keep the ones you do.

Note however that this is not an easy task. There tends to be lots of interdependencies between the core features. For example, workflow is used by a lot so you can't toss workflow. Likewise for assets, etc.

Sure you can ditch the samples, but that's not going to save you all that much.

If you could post what you'd like to eliminate, I can tell you if it is feasible to drop...
Paul Allain, modificado 7 Anos atrás.

RE: Delete Modules from Liferay 7.0 /osgi/modules Folder Empty

Junior Member Postagens: 77 Data de Entrada: 03/09/13 Postagens Recentes
David H Nebinger:
If you could post what you'd like to eliminate, I can tell you if it is feasible to drop...

For example I would like to remove the collaboration portlets (Wiki, Blog, Forms, Bookmarks, Message Boards, Calendar, etc...), will that improve performance and make the portal less demanding on the server?
thumbnail
David H Nebinger, modificado 7 Anos atrás.

RE: Delete Modules from Liferay 7.0 /osgi/modules Folder Empty

Liferay Legend Postagens: 14914 Data de Entrada: 02/09/06 Postagens Recentes
perhaps you could take out the whole lpkg file then, but I'm not sure what your expected outcome is.

The modules themselves get loaded into the OSGi runtime, so it's going to be a reduction of used memory, but only slight.

But otherwise these are not going to affect performance or render times or much of anything else if they are not being used in the site.

If you're facing some sort of performance issue, there's a slew of other things you want to look at before removing modules...
Paul Allain, modificado 7 Anos atrás.

RE: Delete Modules from Liferay 7.0 /osgi/modules Folder Empty

Junior Member Postagens: 77 Data de Entrada: 03/09/13 Postagens Recentes
David H Nebinger:
perhaps you could take out the whole lpkg file then, but I'm not sure what your expected outcome is.

Tried removing the entire
Liferay CE Collaboration.lpkg
but the portal wouldn't even start, if I remember correctly, something to do with
com.liferay.directory.web-1.0.6.jar


So if I want to remove a select number of jars from the
Liferay CE Collaboration.lpkg
how would I go about doing that? Is it a case of removing the jars from the .lpkg file and zipping it again? Or is there any tooling to help with that?

And what about using Felix Gogo shell to manage the packages? Is this considered a recommended approach? And would removing a bundle that way persist over a server restart?

There's also the /osgi/marketplace/override folder, is it possible to override the entire .lpkg with one that has fewer (removed) jars?

Thanks
thumbnail
David H Nebinger, modificado 7 Anos atrás.

RE: Delete Modules from Liferay 7.0 /osgi/modules Folder Empty (Resposta)

Liferay Legend Postagens: 14914 Data de Entrada: 02/09/06 Postagens Recentes
Paul Allain:
So if I want to remove a select number of jars from the
Liferay CE Collaboration.lpkg
how would I go about doing that? Is it a case of removing the jars from the .lpkg file and zipping it again? Or is there any tooling to help with that?


I would remove the lpkg file from osgi/marketplace, expand it and put the bundles you want to keep in osgi/modules.

And what about using Felix Gogo shell to manage the packages? Is this considered a recommended approach? And would removing a bundle that way persist over a server restart?


Gogo only offers a temporary solution, the bundles are not actually permanently removed so as soon as you restart they come back.

However this is a good way to test your environ w/o causing serious long-term problems. Stop the modules and make sure the portal still works. Whittle them down until your happy w/ the result.

There's also the /osgi/marketplace/override folder, is it possible to override the entire .lpkg with one that has fewer (removed) jars?


No, this is only for providing an updated version of a module, it will not help you with removals.
Muhammad Taha, modificado 6 Anos atrás.

RE: Delete Modules from Liferay 7.0 /osgi/modules Folder Empty

Junior Member Postagens: 63 Data de Entrada: 01/05/12 Postagens Recentes
I would remove the lpkg file from osgi/marketplace, expand it and put the bundles you want to keep in osgi/modules.


Hi David,

I deleted google SSO module jar file com.liferay.portal.security.sso.google-2.0.2 from osgi\marketplace\Liferay CE Foundation.lpkg\ .. deleted from osgi\state\org.eclipse.osgi and also deleted tomcat-8.0.32\temp... but every time I restart server it gets created with new name in osgi\state\org.eclipse.osgi folder...

I want to remove the existing module and customize it.. can you please suggest here.. Thank you..

https://web.liferay.com/community/forums/-/message_boards/message/90096162
thumbnail
David H Nebinger, modificado 6 Anos atrás.

RE: Delete Modules from Liferay 7.0 /osgi/modules Folder Empty

Liferay Legend Postagens: 14914 Data de Entrada: 02/09/06 Postagens Recentes
Overriding is different from removing. To override, you drop your jar (without version number details) in the osgi/marketplace/override folder. It will use your module instead of the original in the lpkg file.

Check out the answer I posted in your thread, that is much more in line with what you are trying to do.







Come meet me at the 2017 LSNA!