Installation in Eclipse
This page can contain obsolete information, please refer to Installing iDempiere
To develop with source code you have to install the source tree in an Eclipse environment.
Installing iDempiere from the source up to a running system is a complex and error-prone process. I urgently recommend to first get some experience by installing it from an installation package and getting used to things like Java version, PostgreSQL configuration, etc.
- If there are any issues in your installation process you may have a look at the "official" installation pages at http://www.globalqss.com/wiki/index.php/IDempiere. These pages are written by Carlos Ruiz and contain the first full-usable installation documentation. They are some years old and work with older versions but they still contain great wisdom.
- 1 Prerequisities
- 2 Download iDempiere source tree
- 3 Setting up Eclipse Workspace
- 4 Start iDempiere
- Linux, MS Windows or MacOS
Most developers work with Debian Linux or Ubuntu Linux.
- Java 6 is recommended. You can use Java6 from Sun or OpenJDK (recommended). (iDempiere runs with Java7 also but will throw some warnings.)
aptitude install openjdk-7-jdk openjdk-7-source openjdk-7-doc
- PostgreSQL 9.1 or higher (iDempiere does still work with 8.4 but there are some special issues)
aptitude install postgresql postgresql-contrib
In the standard Debian installation of PostgreSQL there is no administrator access with a password and no access through TCP/IP. You have to configure that. This is not the scope of this document. If you have questions here I urgently recommend to first install iDempiere from an installation package and get some experience there.
- Mercurial Client (hg commandline)
aptitude install mercurial
Older versions of iDempiere suggested to use Eclipse Indige 3.7.2. Nowadays it is tested to use actual versions up to Eclipse 4.4 Luna (and no reason not to use higher versions in future). If you have problems with this installation and ask for help in the forum or in IRC you should know (and tell) which version you installed.
Eclipse Plugin: Eclipse Mercurial
You should install the EclipseMercurial Plugin. There is another good introduction about it. You can install it both from the Eclipse Marketplace (the new way; in the Help menu) or enter a new update site and choose the package "Mercurial Eclipse" (nothing else) (the longer established way).
Eclipse Plugin: Buckminster
You need the Buckminster Plugin to assemble the iDempiere project. You have to enter the appropriate update site in the Eclipse "Software Update" window (Menu in Eclipse: Help > Install New Software > Add). The link to the update site can be found at the Buckminster download page. It depends on the Eclipse version you are using (see here to see which Eclipse Name belongs to which version number). For Eclipse 4.4 Luna the Update site is:
If you install Buckminster on a later version of Eclipse, you must use a specially modified version of Buckminster 4.5. Do not use the standard Buckminster plugin. For Eclipse 4.6 Neon the Update site is:
Choose following packages, the rest are not required:
- Buckminster - Core
- Buckminster - Maven support
- Buckminster - PDE support
Download iDempiere source tree
Choose a trunk repository you trust (e.g. the following) and clone it:
hg clone https://bitbucket.org/idempiere/idempiere idempiere
If you have problems have a look at our Download Tips.
Setting up Eclipse Workspace
Navigate to "File > Switch Workspace > Other" and choose the previously cloned directory as a workspace.
You get an empty workspace and can use the following way to make Eclipse aware of the iDempiere projects:
- File -> Import... -> General -> Existing Projects into Workspace -> Next -> "Browse" to the workspace repository -> Finish
- If you are in trouble there are some excellent resources about setting up Eclipse From Heng Sin Low (the originator of OSGi ADempiere), From Dominik Zajac and From Carlos Ruiz.
Materializing iDempiere project within Eclipse
Next step is to "materialize" the project. This means that all dependencies are downloaded from the internet.
- Navigate to File > Import > Buckminster > Materialize from Buckminster MSPEC, CQUERY or BOM
- Push the "Next" button and fill the "Enter a URL ..." box (using the "Browse" button) with ".../org.adempiere.sdk-feature/adempiere.mspec"
- Here eclipse takes some time to review dependencies and after that you can push the "Finish" button
Now is a good time to brew some coffee (better Colombian coffee) - Eclipse will download and configure the whole project and this can be time consuming.
After materializing you should first refresh all your projects (mark all projects and use the context menu). Then use "Project -> Clean..." and rebuild all projects. This takes a while and should clear away all error messages. Then I close the "doc" project to get rid of the last error message - it has some unresolved dependencies and is not used for compiling. If you use Java7 you have some hundred warning messages (but they are no real problems), if using Java6 there should be not many of these messages left.
When this step finishes it is recommended to close eclipse and take a backup of the $IDEMPIERE_REPOSITORY folder, in case something mess later you can restore the backup and you won't need to download again the whole thing from internet.
Eclipse uses so-called "launch configurations" to start a given piece of code using given plugins and given dependencies with given arguments etc. Some of these launch configurations are already preconfigured in the iDempiere workspace.
To start iDempiere try "Run -> Debug Configurations..." and choose what you want to start by selecting one of the launch configurations under "Eclipse Application":
- install.app - lets you create an idempiere.properties file that contains the configuration for the server
- server.product - starts the zk webserver (needs an idempiere.properties file).
- swingclient.product - starts the swing client
In the most developer versions the plugin list (the list of OSGi plugins that are needed to get the whole application running) is not well maintained all the time. You can go to the tab "Plug-Ins" and press the "Validate Plug-Ins" button to check that and press "Add Required Plug-Ins" to add the missing ones.
Then you can start the application.
Modifying the launch configuration
Sometimes I want to have different settings to work with different databases (e.g. test and production). To do that I create a copy of the launch configuration "server.product". I rename the copy according to my needs, e.g. "myown-server.product". Then I go to the tab "Arguments" and add the following to the "VM Arguments" (the lower text field):
To create this file you can copy your idempiere.properties or you can even make a copied launch configuration of the "install.product".
You can change other things, e.g. you can add your own plugin to the "Plug-Ins" tab etc.