How to load plugin from classpath inside the plugin project

149 views
Skip to first unread message

rhajdami....@gmail.com

unread,
Dec 25, 2020, 6:51:21 AM12/25/20
to pf4j
Hi,

We are using pf4j in production mode its ok it works. Our problem is in dev mode with eclipse and Maven.

We want the developer to run the plugin with a Main wich load the current plugin and its dependencies.

We add the dependency plugins simply by adding them in the profile section of pom.xml.

Our goal is to debug the current plugin and the entire dependencies.

We can't find any provided solution to load plugin clas from classpath 
can someone help us with this issue

Thanks a lot
Our plugin is used only as REST ws.

deceba...@gmail.com

unread,
Dec 30, 2020, 12:01:32 AM12/30/20
to pf4j
We want the developer to run the plugin with a Main wich load the current plugin and its dependencies.

When you talk about plugin's dependencies mean libraries (external dependencies) and not other plugins. Is it correct what I say?
 
We add the dependency plugins simply by adding them in the profile section of pom.xml.

Our goal is to debug the current plugin and the entire dependencies.

We can't find any provided solution to load plugin clas from classpath 
can someone help us with this issue

I don't know to much about the structure of your project (app + plugins). I talk here about the folders structure.
Maybe a solution is to disable the plugins that you don't want them. A short intro is available in documentation [1].
Maybe a custom `PluginStatusProvider` is a solution.
Also please read [3]. Run application in `dev` (development mode) with some plugins disabled.

Please give more details.

rhajdami....@gmail.com

unread,
Dec 31, 2020, 7:30:22 AM12/31/20
to pf4j
Hi

Thank i solve my problem in fact it was easy.

i confimr that classpathPluginLoader does not exist, if i want one i have to develop it.

I take another approach simple when my plugin is compiled i automatically put it in a folder, and run the main system with only my plugin and its dependencies.
So i can debug it and its work.
So i use this solution for now.

Excuse my english not very good.

In short terms i copy my plugin and its dependencies in a forlder run the core-system in debug mode and its ok. I can debug its works very well.
thanks we can close this discution.

Pf4j is amazing ligth simple and fit perfectly my needs.
Reply all
Reply to author
Forward
0 new messages