Difference between revisions of "Installation in Eclipse"
(Make some versions and links more actual) |
(new links to the very actual version) |
||
| Line 29: | Line 29: | ||
===Eclipse Plugin: Eclipse Mercurial=== | ===Eclipse Plugin: Eclipse Mercurial=== | ||
| − | + | You should install the [https://bitbucket.org/mercurialeclipse/main/wiki/Home EclipseMercurial Plugin]. THere is [http://mercurial.selenic.com/wiki/MercurialEclipse 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). | |
http://mercurialeclipse.eclipselabs.org.codespot.com/hg.wiki/update_site/stable | http://mercurialeclipse.eclipselabs.org.codespot.com/hg.wiki/update_site/stable | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
===Eclipse Plugin: Buckminster=== | ===Eclipse Plugin: Buckminster=== | ||
Revision as of 16:47, 1 March 2015
To develop with source code you have to install the source tree in an Eclipse environment.
Prerequisities
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 a bit outdated but still contain great wisdom.
OS
http://www.globalqss.com/wiki/index.php/IDempiere
- Linux, MS Windows or MacOS
JDK
- Java6 is recommended. You can use Java6 from Sun or OpenJDK6 (recommended). (iDempiere runs with Java7 also but will throw some warnings.)
Database
- PostgreSQL 9.1 or higher (iDempiere does still work with 8.4 but there are some special issues)
Source Management Tool
- Mercurial Client (hg commandline)
Eclipse
- Suggest using Eclipse Indigo 3.7.2.
- It is safest and easiest to perform iDempiere development in Eclipse Indigo (Version 3.7). Most of problems always are related to using a different version than described in prerequisites.
- Also some one reported newer versions also working: Eclipse Juno 4.2 by TBayen, Eclipse Kepler SP2 (4.3) by Banym. If you are going to use the versions other than 3.7, you do it for your own risk.
- Download the correct version here [1] (Look on the right hand side for the correct version other than the latest)
Since iDempiere 3.x it is recommended to use Eclipse Luna (according to User:TBayen).
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).
http://mercurialeclipse.eclipselabs.org.codespot.com/hg.wiki/update_site/stable
Eclipse Plugin: Buckminster
- Menu in Eclipse: Help > Install New Software > Add
- Update Site:
- For Eclipse Indigo: using 3.7. Update site: http://download.eclipse.org/tools/buckminster/updates-3.7
- For Eclipse Juno: using 4.2. Update site: http://download.eclipse.org/tools/buckminster/updates-4.2
- For Eclipse Kepler: using 4.3. Update site: http://download.eclipse.org/tools/buckminster/updates-4.3
- Choose following packages, the rest are not required:
- Buckminster - Core
- Buckminster - Maven support
- Buckminster - PDE support
You may see at the older prerequisities page at http://www.globalqss.com/wiki/index.php/IDempiere/Install_Prerequisites_on_Ubuntu
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
Download Tips
If you got low speed or failed when connect to https://bitbucket.org (This happens often in China), here are the steps to follow:
- Step 1: Download the packed source code from https://sourceforge.net/projects/idempiere . For example, the latest one is idempiere_hgrepo_v2.0.zip
- Step 2: Extract the file to your folder, example:
$ unzip -d /app/idempiere idempiere_hgrepo_v2.0.zip
- Step 3: pull changes from the specified source
$ cd /app/idempiere // Replace with your folder ... $ hg pull -u
- Now, you get the codes up to date.
Setting up Eclipse Workspace
There are two excellent resources explaining graphically what is required to setup Eclipse:
- From Heng Sin Low (the originator of OSGi Adempiere movement): http://kenai.com/projects/hengsin/pages/Building
- From Dominik Zajac: http://www.banym.de/eclipse/build-the-idempiere-project-using-eclipse-with-buckminster
- Navigate to "File > Switch Workspace > Other" and choose the previously cloned directory as a workspace.
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 with the folder $IDEMPIERE_REPOSITORY/org.adempiere.sdk-feature/adempiere.mspec
- (You must replace the $IDEMPIERE_REPOSITORY with the corresponding folder name or even better you can use the "Browse" button to navigate there and select the adempiere.cquery file)
- 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.
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.
(see also http://www.globalqss.com/wiki/index.php/IDempiere/Setting_up_Eclipse)
NoClassDefFoundError
"Java.lang.NoClassDefFoundError: org/eclipse/pde/internal/core/target/provisional/ITargetPlatformService"
The error seems to be related to Eclipse Juno.
The error will not appear for a previous version of Eclipse Indigo 3.7.
rebuild and start
You could mark all projects and use the context menu to refresh your eclipse projects. After that you use the menu "Project -> Clean..." to rebuild the whole workspace. After that you should be able to start the iDempiere Code.
To start iDempiere try "Run -> Debug Configurations..." and choose the configuration for "Eclipse Application/swingclient.product". You should now be able to start it.
