Difference between revisions of "Building iDempiere without Eclipse"

From iDempiere en
(about use lower case of variable environment on buckminster)
(Moving to discussion page)
Line 73: Line 73:
 
     -D buckminster.output.root=${WORKSPACE}/buckminster.output \
 
     -D buckminster.output.root=${WORKSPACE}/buckminster.output \
 
     -D buckminster.temp.root=${WORKSPACE}/buckminster.temp \
 
     -D buckminster.temp.root=${WORKSPACE}/buckminster.temp \
−
 
−
== Know issue ==
 
−
=== use environment variable on buckminster command  ===
 
−
on jenkins, I use jenkins Global properties to add my customize environment variables.
 
−
 
−
after that i use this variable inside buckmister command, when variable name on upper case it's ok,
 
−
 
−
but when it's lower case, buckminster treat like don't have this variable
 
−
 
−
example:
 
−
  MY_VARIABLE=success
 
−
  import -D myproperties=${MY_VARIABLE}
 
−
  on runtime it become: import '-D' 'myproperties=success'
 
−
 
−
 
−
  my_varialbe=fail
 
−
  import -D myproperties=${my_varialbe}
 
−
  on runtime it become: import '-D' 'myproperties='
 
−
 
  
 
''This tutorial is brought to you by [[User:CarlosRuiz|Carlos Ruiz]] from [http://globalqss.com GlobalQSS].  Feel free to improve directly or suggest using the Discussion tab.
 
''This tutorial is brought to you by [[User:CarlosRuiz|Carlos Ruiz]] from [http://globalqss.com GlobalQSS].  Feel free to improve directly or suggest using the Discussion tab.

Revision as of 08:37, 11 January 2018

⇐ 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:
/tmp/buckminster/build/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.

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