Add customize plugin to package with core
while do IDEMPIERE-3136, i also contribute a patch to help easy add customizes plug-in to create product package
this wiki to explain how to use this feature
1. To extend core of idempiere, you can create some customize plug-in or get from other one.
you have some option to attach this plug-in into core.
- a. compile, export plug-in to binary and install binary by felix or telnet.
- b. setup to build, package customize plugin with core plugin
new feature focus to (b) method.
follow (b) method you have some job to do:
- modify rmap to buckminster can find out customize plug-in.
- modified at least one feature to include your plug-in into workspace
this improve, help to include plug-in with minnimize modify core file.
How to use it
1. example you have idempiere source at [root]/idempiere
you have customize plug-in at folder struct like:
[root]/for_carlos/plug-in-1 [root]/for_carlos/plug-in-2 [root]/libero/plug-in-1 [root]/libero/plug-in-2 [root]/myself/plug-in-1 [root]/myself/plug-in-2
2. create a feature with id org.idempiere.customize-feature, example place it at [root]/myself
3. use org.idempiere.customize-feature to include your customize plug-in, feature
4. modify used file materialize.properties like bellow (about materialize.properties, reference Offline_all_material_of_idempiere)
extend.bundle.folder.1=../for_carlos extend.bundle.folder.2=../libero extend.bundle.folder.3=../myself
5. redo materialize your workspace that's all. now when you do invoke action "create product" your plugin also package with core plug-in
what's strong point
- you only change only file materialize.properties from core,
- so easy to resolve when conflic happend in case you update idempiere source.
- you event don't touch core, if you already setup Offline_all_material_of_idempiere with a file materialize.properties place out of [root]/idempiere folder
- add plug-in to workspace auto done by materialize process, don't need do manual
what's weak point still exists
- you can't control auto start plug-in if don't do more.
- i see have three method to set auto start
- 1. use tab configuration of server.product, i did like this way, because it touch core file
- 2. at first time run server, use telnet or felix to set auto start,
- osgi will save your change, so next time when restart server not need do it again
- 3. write script run when finish action "create product" to modify auto start setting
- on file "idempiere-server/configuration/org.eclipse.equinox.simpleconfigurator/bundles.info"
- i never try to implement it, just idea
- still need to change launch of eclipse to active customize plug-in when run from eclipse.
- reason by launching on eclipse now use plug-in collection.
how this feature are implemented
1. idempiere core have feature with id is org.idempiere.customize-feature
2. feature org.idempiere.customize-feature and all plugin/feature include on it already setup to package with action "create product"
3. so, if we can override this feature, we can add my customize plugin without touch core.
this job complete by bellow implement
- rmap setup a search path name "extend.workspace"
- this search path can define 10 local provide, with url get from materialize.properties so we have room to customize folder struct
- rmap also setup to extend.workspace have higher priority to workspace.project and workspace.feature
- so when we drop a new org.idempiere.customize-feature feature into extend path, it will take over place of org.idempiere.customize-feature on core