Building iDempiere without Eclipse

From iDempiere en
Jump to: navigation, search

Table of Contents | Creating Installers from Eclipse | Building iDempiere without Eclipse

It is possible to build iDempiere without Eclipse, thanks to the Buckminster headless functionality.

Install Buckminster director

cd $DIRECTOR_HOME  # replace DIRECTOR_HOME with your preferred folder for this
unzip director_latest.zip
  • Using director download buckminster headless into $BUCKMINSTER_HOME folder (you decide which folder)
director -r https://github.com/hengsin/headless/raw/master/4.5/ -d $BUCKMINSTER_HOME -p Buckminster -i org.eclipse.buckminster.cmdline.product
# Note: replace $BUCKMINSTER_HOME with your preferred folder for this
  • Install the prerequisites (Core, PDE, Maven) into Buckminster
cd $BUCKMINSTER_HOME
buckminster install https://github.com/hengsin/headless/raw/master/4.5/ org.eclipse.buckminster.core.headless.feature
buckminster install https://github.com/hengsin/headless/raw/master/4.5/ org.eclipse.buckminster.pde.headless.feature
buckminster install https://github.com/hengsin/headless/raw/master/4.5/ org.eclipse.buckminster.maven.headless.feature

Clone iDempiere code

  • Clone the repository you downloaded on Download the Code step (you can also use your actual installation, but I prefer to clone it to avoid mixing environments)
cd $HOME/sources  # Or use the folder where you downloaded the idempiere project
hg clone idempiere testheadless

Materialize the project

  • Create the target platform (replace below $HOME/sources with the folder where you have your cloned repositories)
cd $BUCKMINSTER_HOME
buckminster -data $HOME/sources/testheadless importtargetdefinition -A "$HOME/sources/testheadless/org.adempiere.sdk-feature/build-target-platform.target"
  • Materialize the project
buckminster -L DEBUG -consoleLog -data $HOME/sources/testheadless import -P $HOME/sources/testheadless/org.adempiere.sdk-feature/materialize.properties "$HOME/sources/testheadless/org.adempiere.sdk-feature/adempiere.cquery"

Build the project

  • Build
cd $BUCKMINSTER_HOME
buckminster -L DEBUG -consoleLog -data $HOME/sources/testheadless build -t
  • Perform site.p2 action
    • For 5.1
buckminster -L DEBUG -consoleLog -data $HOME/sources/testheadless perform \
    -P $HOME/sources/testheadless/org.adempiere.server-feature/buckminster_linux_gtk_x86_64.properties \
    org.adempiere.server:eclipse.feature#site.p2
    • For 4.1 and before
buckminster -L DEBUG -consoleLog -data $HOME/sources/testheadless perform \
    -D 'qualifier.replacement.*=generator:buildTimestamp' \
    -D "generator.buildTimestamp.format='v'yyyyMMdd-HHmm" \
    -D 'target.os=*'      \
    -D 'target.ws=*'     \
    -D 'target.arch=*'      \
    'org.adempiere.server:eclipse.feature#site.p2'
  • Perform create.product.zip action for linux x86_64
    • For 5.1
buckminster -L DEBUG -consoleLog -data $HOME/sources/testheadless perform \
    -P $HOME/sources/testheadless/org.adempiere.server-feature/buckminster_linux_gtk_x86_64.properties \
    'org.adempiere.server:eclipse.feature#create.product.zip'
    • For 4.1 and before
buckminster -L DEBUG -consoleLog -data $HOME/sources/testheadless perform \
    -D 'qualifier.replacement.*=generator:buildTimestamp' \
    -D "generator.buildTimestamp.format='v'yyyyMMdd-HHmm" \
    -D 'target.os=linux'  \
    -D 'target.ws=gtk'   \
    -D 'target.arch=x86_64' \
    -D product.features=org.idempiere.eclipse.platform.feature.group \
    -D product.profile=DefaultProfile \
    -D product.id=org.adempiere.server.product \
    'org.adempiere.server:eclipse.feature#create.product.zip'
  • After this step the server installer must be found at:
$HOME/buckminster.output/org.adempiere.server_5.1.0-eclipse.feature/idempiereServer.gtk.linux.x86_64.zip
  • On jenkins build, we want output and temp go to ${WORKSPACE}, so add two below properties after -P to override value on properties file
    -D buckminster.output.root=${WORKSPACE}/buckminster.output \
    -D buckminster.temp.root=${WORKSPACE}/buckminster.temp \

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