Thank you Aditya and Michael,
I worked with various versions of the same plugin. So I had several mytest*
plugins in the plugin directory with the same mount point in the
ofbiz-component.xml file. I did not remember that OFBiz runs through all
directories and reads the ofbiz-component.xml files for each.
Now I moved all the directories I made for backup into a directory outside
of the ofbiz directory. Now it works as far as I can tell. I use WinMerge to
compare the directories for changes.
Georg
-----Ursprüngliche Nachricht-----
From: Michael Brohl
Sent: Monday, November 2, 2020 6:36 PM
To: [email protected]
Subject: Re: How to return to a previous plugin version?
Additionally, I'd recommend putting a component-load.xml in the plugins
directory where you can specify which plugin(s) should be loaded and in
which order.
For a quick change, simply comment out the plugins you do not need and
restart ofbiz.
component-load.xml
<component-loader xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/component-loader.xsd">
   <load-component component-location="mytest"/>
   <load-component component-location="mytest-2"/>
  <!-- <load-component component-location="mytest-current"/> -->
</component-loader>
You should be able to see the loading of your plugin(s) in the log like
this:
2020-11-02 14:56:23,028 |main |CatalinaContainer            |I|
Creating context [mytest]
Best regards,
Michael Brohl
ecomify GmbH - www.ecomify.de
Am 02.11.20 um 07:19 schrieb Aditya Sharma:
Hi Georg,
What I suspect with a cursory reading is as you made a replica the values
of mount point etc may be the same
https://github.com/apache/ofbiz-plugins/blob/trunk/ecommerce/ofbiz-component.xml#L55
As you are new to OFBiz, I would recommend using the Gradle task to create
a new plugin instead of replicating it.
if you just want to play with it with various versions of same plugin. I
would recommend you is to initialise plugin as a local git repo and create
separate branches for drastic changes. This way it would easy to track the
changes also.
https://git-scm.com/docs/git-init
HTH
Thanks and Regards,
Aditya Sharma
On Mon, Nov 2, 2020 at 2:11 AM Georg Potthast <[email protected]>
wrote:
For testing I create a plugin, e.g. mytest: “gradlew
createPlugin -PpluginId=mytestâ€. To be able to fall back to a working
version, I frequently copy this plugin directory to e.g. mytest-1,
mytest-2
etc. When I decide to use the mytest-1 directory again, I rename the
directory I am currently working with to mytest-current and copy mytest-1
to
mytest. Then I restart ofbiz and expect that to work with this mytest
directory.
However, OFBiz seems to continue to work with the former current
directory.
E.g. I have made three menu items in mytest-current while I had just two
menu items in the older mytest-1 directory. After copying the mytest-1
directory to mytest and restarting OFBiz, I still have three menu items
displayed although there should be only two.
What could be the reason for this and what do I have to do to properly
fall
back to the state of mytest-1?