Setting up Eclipse

From iDempiere en
Jump to: navigation, search

Table of Contents | Download the Code | Setting up Eclipse | Importing DB Seed Manually

Configure for Release 5.1 using Buckminster

Configuring Target Platform

  • Open the eclipse you configured following the instructions from Prerequisites page
  • Navigate to File > Switch Workspace > Other
  • On the dialog open fill the workspace with the folder where you cloned the code, named above as $IDEMPIERE_REPOSITORY, i.e. /home/carlos/sources/myexperiment)
    • Don't use spaces in the folder name
  • After the eclipse open again navigate to Window > Preferences > Plug-in Development > Target Platform
  • Push the "Add" button
  • Select "Nothing: Start with an empty target definition" and click Next
  • Fill the Name with: iDempiere Target Platform
  • Push the "Add" button
  • Select "Directory" and click Next
  • Fill Location with "${workspace_loc}/targetPlatform"
  • "Finish" button
  • Make the just created platform "iDempiere Target Platform" active and push the "Apply and Close" button

Materializing iDempiere project within Eclipse

Now is time to materialize the project, you must be connected to the internet for this stage:

  • Set Window > Preferences > Ant > Runtime > Properties > Add External > $IDEMPIERE_REPOSITORY/org.adempiere.sdk-feature/materialize.properties
    • You MUST replace the $IDEMPIERE_REPOSITORY with the corresponding folder name
    • Alternatively you can use the "Browse" button to navigate there and select the materialize.properties file
  • Navigate to File > Import > Buckminster > Materialize from Buckminster MSPEC, CQUERY or BOM
  • Push the "Next" button
  • Fill the "Enter a URL ..." box with this folder $IDEMPIERE_REPOSITORY/org.adempiere.sdk-feature/adempiere.mspec
    • You MUST replace the $IDEMPIERE_REPOSITORY with the corresponding folder name
    • Alternatively you can use the "Browse" button to navigate there and select the adempiere.mspec 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 materialization finishes you must see all the plugins on the project explorer - select all the plugins and refresh (using File > Refresh, or Right-click > Refresh). This is to let eclipse aware of the new jars downloaded during materialization.
  • Then you can build using Project > Build All, or Project > Build Automatically

Experience shows it could be helpful to restart eclipse if materialization fails or is incomplete and then start materialization again.

When this step finishes 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.

Troubleshooting missing libraries

If you get errors as “ Project '*' is missing required library: '*' ”, please follow the following steps:

  • In the projects which are missing required libraries:
    • Right click copyjars.xml > Run As > 1. Ant Build
  • Refresh all projects
  • Project > Build All

NOTE ALSO: In some countries the mirror chosen by sourceforge throws errors, in such case pointing to a direct close mirror can solve the issue, you can edit your materialize.properties file and change all links with the website download.eclipse.org with your closest mirror (i.e. netcologne.dl.sourceforge.net works well for Germany, superb-dca2 for Colombia)

Configure for Default branch using Maven Tycho

Materialize and build

On the operating system navigate to the folder where you cloned the code, named above as $IDEMPIERE_REPOSITORY, i.e. /home/carlos/sources/myexperiment), and run the next command:

cd $HOME/sources/myexperiment
mvn verify

This command download all libraries on Bundle-ClassPath, build all projects and output binaries to org.idempiere.p2/target/products

Import projects in Eclipse

  • Open again the eclipse you configured with the workspace pointing to the folder where you cloned the code
  • Turn off Project > Build automatically
  • Navigate to File > Import
  • Navigate to Maven > Existing Maven Projects
  • Click Next button and Browse to $IDEMPIERE_REPOSITORY (must appear there by default)
  • All projects must appear selected, click Finish to complete the import
  • At the end all projects are loaded into workspace

Set target platform

  • Stil in eclipse
  • Navigate to File > Import
  • Navigate to General > Existing Projects into Workspace
  • Click Next button and Browse to $IDEMPIERE_REPOSITORY/org.idempiere.p2.targetplatform
  • Click Finish to complete the import
  • Now open the file org.idempiere.p2.targetplatform.target within the project just imported org.idempiere.p2.targetplatform
    • This is the default target platform definition with remote url
  • At Target Editor, click the "Set as Active Target Platform" link
  • Wait for Eclipse to download bundles onto target platform
    • Click the "Reload Target Platform" link if some download fail
  • At the end you can enabled back Project > Build automatically


This tutorial is brought to you by Carlos Ruiz from GlobalQSS. Feel free to improve directly or suggest using the Discussion tab.