[Plugin Development] OSGi Bundle Installation Guide Needed - Component Descriptor Issue & Web Felix Installation Process

97 views
Skip to first unread message

張彥瑋

unread,
Dec 1, 2024, 12:52:21 AM12/1/24
to iDempiere
Hello iDempiere Community,

I'm developing a custom plugin for iDempiere and encountering several issues during development and installation. I need comprehensive guidance on both the component descriptor issue and the proper installation process.

Environment:
- Java version: 17.0.10
- OS: macOS (x86_64)
- iDempiere: 12.0.0

Current Issues:
1. Component Descriptor Error:
   The bundle installs but shows error:
   > bundle tw.topgiga.accessdevice.tw.topgiga.accessdevice:12.0.0.SNAPSHOT (407) Component descriptor entry 'OSGI-INF/accessdevice.factory.xml' not found

   Installation log shows:
   > AdempiereActivator.installPackage: Installing tw.topgiga.accessdevice.tw.topgiga.accessdevice 12.0.0 ... [391]
   > AdempiereActivator.installPackage: tw.topgiga.accessdevice.tw.topgiga.accessdevice 12.0.0 installed. [391]

My MANIFEST.MF includes:
- Bundle-Activator: org.adempiere.plugin.utils.AdempiereActivator
- Service-Component: OSGI-INF/accessdevice.factory.xml

Questions:
1. Regarding Component Descriptor:
   - What could be causing the component descriptor error?
   - Is there a specific location where the accessdevice.factory.xml should be placed?
   - What is the correct structure for the component descriptor file?

2. Regarding Installation Process:
   - What is the recommended way to package a plugin for installation?
   - Could you provide a step-by-step guide for installing plugins via Web Felix Console?
   - Are there any specific considerations for the bundle start level or other configurations?

3. Documentation Request:
   - Is there a comprehensive guide or wiki page that covers the complete plugin development lifecycle (from development to deployment)?
   - Are there any example projects showing the correct structure and deployment process?

I would greatly appreciate any guidance on resolving these issues and links to relevant documentation.

Thank you in advance.

Best regards,
[Your Name]

Heng Sin Low

unread,
Dec 1, 2024, 1:02:13 AM12/1/24
to idem...@googlegroups.com
#1 just means your bundle build doesn't include the "OSGI-INF/accessdevice.factory.xml" file, check your build.properties

You can use maven or Eclipse export to package your bundle, the end result is the same.

I doubt you need a guide to install plugins via the web console, it is just click and browse for your bundle file.

The default start level should work just fine. If you are using OSGi component, set immediate to true should ensure your bundle is auto started after installation.

Example plugin projects:

--
You received this message because you are subscribed to the Google Groups "iDempiere" group.
To unsubscribe from this group and stop receiving emails from it, send an email to idempiere+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/idempiere/efa1c3fe-b39b-4f20-9537-7694b7f7595fn%40googlegroups.com.

張彥瑋

unread,
Dec 1, 2024, 1:09:31 AM12/1/24
to iDempiere
Thanks for replying. In fact, I am currently struggling with understanding how to properly set up all the files needed for plugin installation.

While I have successfully activated my plugin using the Eclipse development environment (by restarting server.app and including my plugin in the runtime configuration), I have no experience with deploying the plugin in a production environment using the Web Felix Console.

Specifically, I need guidance on:
1. What files need to be prepared for deployment
2. How to properly package these files
3. Step-by-step instructions for using the Web Felix Console for installation

Could you point me to any documentation or provide guidance on this deployment process?

Thank you.

hengsin 在 2024年12月1日 星期日下午2:02:13 [UTC+8] 的信中寫道:

張彥瑋

unread,
Dec 1, 2024, 2:09:04 AM12/1/24
to iDempiere
@hengsin if i want to deploy a plugin with modelvalidator and docAction, which example i need to clone?
thank you!

張彥瑋 在 2024年12月1日 星期日下午2:09:31 [UTC+8] 的信中寫道:

Heng Sin Low

unread,
Dec 1, 2024, 2:24:50 AM12/1/24
to idem...@googlegroups.com

張彥瑋

unread,
Dec 1, 2024, 2:25:40 AM12/1/24
to iDempiere
thank you very much!

hengsin 在 2024年12月1日 星期日下午3:24:50 [UTC+8] 的信中寫道:
Reply all
Reply to author
Forward
0 new messages