liferay-osgi

Build and configure Liferay OSGi modules with Declarative Services annotations.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/JoaoPedroAmaral/backBarbearia --skill liferay-osgi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: liferay-osgi
Source: https://github.com/JoaoPedroAmaral/backBarbearia/tree/main/.claude/skills/liferay-osgi
Command: npx skills add https://github.com/JoaoPedroAmaral/backBarbearia --skill liferay-osgi

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Liferay developers need a structured approach to building OSGi modules that leverage Declarative Services, bundle metadata, and admin configurations to deploy robust portlets and services.

Core Features & Use Cases

  • Declarative Services annotations: @Component, @Reference, @Activate, @Deactivate for lifecycle and service injection.
  • Bundle metadata and module configuration: bnd.bnd, Fragment Host guidance, and Configuration Admin usage to manage settings.
  • Operational patterns: Gogo Shell usage, Service Ranking for overrides, and best practices/anti-patterns to follow in Liferay deployments.

Quick Start

Create a new Liferay OSGi module project, implement a DS component, and bundle it with bnd to deploy on Liferay.

Frequently Asked Questions about liferay-osgi

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure Liferay OSGi modules using Declarative Services annotations?

Liferay OSGi modules use Declarative Services annotations like @Component, @Reference, @Activate, and @Deactivate to manage service injection and component lifecycles without manual registration.

How do I manage admin-configurable settings in a Liferay OSGi bundle?

Admin-configurable settings in a Liferay OSGi bundle are managed using Configuration Admin patterns, allowing safe component configuration across different Liferay environments via bnd.bnd metadata.

What is the best way to override OSGi services in a Liferay deployment?

Overriding OSGi services in a Liferay deployment is best achieved using Service Ranking properties within your @Component annotation to prioritize custom implementations over default portlets.

When do I need a Fragment Host in a Liferay OSGi module?

A Fragment Host is needed in a Liferay OSGi module when you must attach additional resources or override static files within an existing host bundle without modifying its original source.

How do I use bnd.bnd metadata to build and deploy Liferay portlets?

bnd.bnd metadata defines bundle instructions, package imports, and exports to properly build and deploy Liferay portlets as OSGi modules within the Liferay environment.

Can I use Gogo Shell to inspect Declarative Services in Liferay?

Yes, Gogo Shell can be used to inspect Declarative Services in Liferay, allowing developers to query active OSGi components, verify service references, and troubleshoot deployment issues.