Difference between revisions of "Setting up Eclipse"

From iDempiere en
(Reorganize)
Tag: visualeditor
(Updated Eclipse setup for iDempiere 8.2)
Tag: visualeditor
Line 62: Line 62:
  
 
* At the end you can enabled back Project > Build automatically
 
* At the end you can enabled back Project > Build automatically
 +
* In case there are files with compilation errors you can right click on the iDempiere project and select Maven > Update Projects, then press OK
  
  

Revision as of 21:21, 10 June 2021

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

Materialize and build

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

cd $HOME/sources/idempiere
mvn verify

This command download all libraries on Bundle-ClassPath, build all projects and output binaries to org.idempiere.p2/target/products. If not, verify with mvn -version that maven is using the correct java-version.

Setup workspace in Eclipse

  • Open again the eclipse you configured with the workspace pointing to the folder where you cloned the code
    • Following the example here this folder would be $HOME/sources/idempiere
  • Turn off Project > Build automatically
  • Navigate to Window > Preferences > General > Workspace
    • set "Text file encoding" to "UTF-8" (if default is different)
    • set "New text file line delimiter" to "Unix" (if default is different)
  • Navigate to Window > Preferences > Java > Compiler
    • set Java > Compiler > Compiler compliance level to "11"
  • in Java > Installed JREs add the java-11-openjdk JRE if not present and select it as the active JRE:
    • click the Add button, then
    • select Standard VM, click next
    • enter "/usr/lib/jvm/java-11-openjdk-amd64" as JRE Home, click finish
    • click the Checkbox next to the new entry to apply the changes.
  • Not required, is a personal preference, but normally I switch here to Java perspective and choose to Working Sets as the Top Level Elements

Import projects in Eclipse

  • Navigate to File > Import
  • Navigate to Maven > Existing Maven Projects
  • Click Next button and Browse to $IDEMPIERE_REPOSITORY (must appear there by default)
    • Following the example here this folder would be $HOME/sources/idempiere
  • All projects must appear selected, click Finish to complete the import
    • At the end all projects are loaded into workspace
  • Sometimes eclipse creates changes to the workspace, you can discard those changes at this point via right click on the projects and choosing Replace With > HEAD Revision

(just for 8.2) Import target platform

These steps are required if you work on 8.2, but not required with the current master branch (a.k.a. 8.2.z)

  • Still 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

Set target platform

  • Now open the file org.idempiere.p2.targetplatform.target within the project org.idempiere.p2.targetplatform
    • This is the default target platform definition with remote url
    • Here eclipse takes some time downloading the required dependencies, you can prepare some Colombian coffee and wait patiently :)
  • At Target Editor, click the "Set as Active Target Platform" link
  • Wait for Eclipse to finish downloading bundles onto target platform
    • Click the "Reload" button if some download fail, until there are not red errors on the Locations list
  • At the end you can enabled back Project > Build automatically
  • In case there are files with compilation errors you can right click on the iDempiere project and select Maven > Update Projects, then press OK


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

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

Cookies help us deliver our services. By using our services, you agree to our use of cookies.