If you’re an iDempiere developer with many implementations simultaneously, this scenario might sound familiar to you.
You are working at the same time on two different projects which use different plug-ins and different databases. You change often from one to the other, and you also like to have a clean version of iDempiere vanilla with a pristine database. Let’s be honest, it makes everything easier to keep that one. When someone reports a bug, you can easily check if the bug is in iDempiere vanilla or caused by some of your plug-ins or perhaps data corruption.
To make your life easier, you keep the same source code and version on all your implementations, so you only need one workspace in Eclipse. However, by default every time you want to change from one project to the other, you would need to modify the launcher by adding and removing custom plug-ins and running install.app to change the database. if you have to do this often, it is simply a waste of time and can be easily improved.
This is how I do it (BTW – I’ve documented this on the iDempiere wiki, if you think I missed any step or important thing, please feel free to add it):
Create a copy of the idempiere.properties files and give it a meaningful name.
I usually create an idempiere folder in my home directory and copy all the custom properties files there:
cp idempiere.properties /home/diego/.idempiere/freibier.properties
Open the new properties files and change the database configuration accordingly (name, host, port).
Create a new launcher on Eclipse.
Open the Run Configurations window, right click on the server.product launcher and click on ‘duplicate’.
Give it a meaningful name. I usually use the same name from the properties file. F.i. server.product freibier.
Open the plug-ins tab and add all the plug-ins you need for each project. Finally, navigate to the Arguments Tab and add at the end of the VM arguments the following property
-DPropertyFile=/home/diego/.idempiere/freibier.properties
Repeat steps 1 and 2 for every project you want.
That’s it, now you can run each launcher independently every time without having to change anything else.
Do you have a different way of doing this? Please leave a comment below explaining how you do it and let us all learn from you
I am a systems engineer with a great passion for open source, software development, and technology in general. I have been part of the iDempiere community since 2012. I believe the enterprise world is one of the most aggressive environments out there. Companies tend to ruthlessly compete against each other. That is why seeing competitors co-exist and cooperate in harmony in iDempiere (and OSS communities in general) is so interesting to me.