Skip to content

ngiger/bootstrap-elexis-3

Repository files navigation

A simple way to bootstrap an Eclipse environment for Elexis 3

© Copyright 2014 Niklaus Giger <niklaus.giger@member.fsf.org>

Here I used to maintain a small ruby script which was for a few months the easiest way to setup an Elexis 3 development environment. But Marco Descher came up with a better alternative based on the Eclipse Oomp-Installer

Another approach for compiling elexis-3 and generating installable products using Docker is found in the project elexis-dockerfiles

Installation using Eclipse_Oomph_Installer

This is now integrated into the source of the elexis-3-core project. For details, see https://github.com/elexis/elexis-3-core/tree/master/ch.elexis.sdk

Missing in both setup is

  • choosing the 3lexisFormatterProfile.xml of the elexis-3-core repository as Java Formatting style

Installation using a ruby script

In this repository you find a small ruby script bootstrap_elexis_3_env.rb which installs an Eclipse (Kepler) and a checkout of the elexis-3-core and base repositories into the current directory. This script took less than 3 minutes (depends on the download speed) in my setup.

Prerequisites:

  • Java8. You may install a JDK from Oracle
  • git. You may download a version from git-scm.com

Steps:

  • git clone https://github.com/ngiger/bootstrap-elexis-3.git
  • cd bootstrap-elexis-3
  • ./bootstrap_elexis_3_env.rb # At the end it should start the eclipse creating an empty workspace in ./workspace
    • Correct your workspace settings by double clicking on the workspace-mechanic button on the lower left
    • Apply the changes as suggested by
    • Afterwards the button should change to Applied. Workspace mechanic will check regularly whether your workspace is still up to date.
    • (Optional) Under Help..Install new software click “Available Software sites”, then click on “Import” the file p2_sites.xml in the cloned bootstrap-elexis-3.
      • Select “JInto” from the drop down “Work with”. Select OpenSource/Jinto.
  • From the Eclipse main menu, select: File – Import…Git – Projects from Git, then Existing local repository. Click “Add” and browse to the elexis-3-core sub directory of the checkout of your cloned bootstrap-elexis-3 repository. Click “Finish”, then “Next”. In Select “Import existing projects”
  • Repeat the same procedure for elexis-3-base
  • In the “Package Explorer” view open ch.elexis.target/juno-target.target (The mars target is not yet functional). Wait till the “Resolving Target Definition” task has reached 100%. Then click on “Set as Target Platform”.
  • Download the DemoDB and unzip it to your $HOME/elexis directory.
  • In the “Package Explorer” view, select ch.elexis.core.application/ElexisCore.launch and select debug/ElexisCore in the context menu. If you are running under MacOSX, please use the (OS X) variant.
  • You will be prompted for a username and password. Enter test for both.
  • You should be now inside a running Elexis which announces itself with the version Elexis ${versionFromPomViaGroovy}. The curious name is set, because the official building is done using Maven, which would result in version number like 3.1.0-a20141224-1331.
  • If you have workspace-mechanic installed in your Eclipse installation, all your workspaces are regularly checked whether they have your preferredd settings. They live $INSTALL_DIR/configuration/com.google.eclipse.mechanic/mechanic, as ~/eclipse/mechanic did not work on MacOSX.

Note of June 14, 2014: As the update site for com.wdev91.eclipse.copyright vanished, I uncommented the line in bootstrap_elexis_3_env.rb.

Example install log

--2014-02-28 14:13:26--  http://mirror.switch.ch/eclipse/tools/buckminster/products/director_latest.zip
Auflösen des Hostnamen »mirror.switch.ch (mirror.switch.ch)«... 130.59.10.36, 2001:620:0:8::20
Verbindungsaufbau zu mirror.switch.ch (mirror.switch.ch)|130.59.10.36|:80... verbunden.
HTTP-Anforderung gesendet, warte auf Antwort... 200 OK
Länge: 9377181 (8.9M) [application/zip]
In »»director_latest.zip«« speichern.
<..>
2014-02-28 14:13:26 (13.5 MB/s) - »»director_latest.zip«« gespeichert [9377181/9377181]
<...>
Klone nach '/opt/kepler/checkout/elexis-3-core'...
Klone nach '/opt/kepler/checkout/elexis-3-base'...
Installing epp.package.rcp 2.0.1.20130919-0803.
Installing com.inventage.tools.versiontiger 1.2.0.RELEASE.
Installing org.eclipse.m2e.sdk.feature.feature.group 1.4.0.20130601-0317.
Installing com.wdev91.eclipse.copyright 1.4.0.
Installing com.google.eclipse.mechanic 0.3.4.
Operation completed in 119526 ms.
--2014-02-28 14:15:40--  http://www.guh-software.de/jinto/de.guhsoft.jinto-0.13.5.zip
<..>
2014-02-28 14:15:41 (846 KB/s) - »»de.guhsoft.jinto-0.13.5.zip«« gespeichert [788669/788669]
Archive:  de.guhsoft.jinto-0.13.5.zip
  inflating: plugins/de.guhsoft.jinto.doc_0.13.0.jar
<..>

More info

  • myWorkspaceMechanics has some more changes to the workspace preferences
  • Record and propose your changes using the PreferenceRecorder to the Elexis developer list
  • director/director -list -r http://www.wdev91.com/update allows you to list all installable units of a given P2-update site. Unfortunately some P2-site (eg. jinto) work only inside the Eclipse but not via the buckminster director

Alternatives/not choosen paths

  • Setup-Eclipse. Disadvantages creates 50MB big installers
  • A full VM (Too big, unclear how to create)
  • docker Disadvantages, Linux-only, project is young, but promising (low on resources) but maybe I will use this solution as part of setup

Troubleshooting

  • No demoDB found. Search in in the console window of the Eclipse IDE for Checking demo database availability and verify the path.
  • Linux-users might work around crashes like this

No bp log location saved, using default.
[000:000] Browser XEmbed support present: 1
[000:000] Browser toolkit is Gtk2.
[000:000] Using Gtk2 toolkit
No bp log location saved, using default.
[000:005] No bp log location saved, using default.
[000:006] Browser XEmbed support present: 1
[000:006] Browser toolkit is Gtk2.
[000:006] Using Gtk2 toolkit
[000:000] No bp log location saved, using default.

by adding -vmargs -Dorg.eclipse.swt.browser.DefaultType=mozilla to the invocation of eclipse.

About

Bootstrap an elexis 3 environment (Eclipse, Checkout)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages