Skip to content

example of Eclipse RCP applicatione developed with PDE and Maven Tycho build

License

Notifications You must be signed in to change notification settings

klibio/example.pde.rcp

Repository files navigation

example for Eclipse RCP applications

build pipelines

github action output
Deploy doc on GitHub Pages Official Doc
CI build continuous build
SNAPSHOT build snapshot
RELEASE build release

pre-requisites

based on github repo klibio/bootstrap

tycho build example

contains examples of eclipse products, features and bundles/plugins for

  • Equinox Headless application
  • Eclipse 4 RCP UI Products application (feature and plugin based)
  • Components 1 + 2 containing features/bundles

creating products for following os, ws, arch configurations

  • macosx.cocoa.aarch64
  • macosx.cocoa.x86_64
  • linux.gtk.aarch64
  • linux.gtk.x86_64
  • win32.win32.x86_64

with Maven Tycho build version 4.0.4 using Java 17 signing with self-signed code certificate

repository structure

+
|- .mvn                     # containing tycho extension and custom toolchain
|
+- bundles/                 # top-level product-bundles
|   +- e.r.app.ui/              # Eclipse RCP application UI bundle 
|   +- e.r.headless/            # Eclipse headless application bundle 
|   +- e.r.view/                # view bundle
|
+- certificates/            # code-signing
|
+- comp1/                   # component 1 - domain feature
|   +- bundles/                 # comp1 bundle folder
|   |   +- e.r.comp1.view/          # comp1 view bundle
|   |   +- build.properties         # aggregator component1.bundles
|   |
|   +- features/            # comp1 feature folder
|   |   +- e.r.comp1.feature/   # comp1 feature
|   |   +- build.properties     # aggregator component1.features
|
+- comp2/                   # component 2 - domain feature
|   +- bundles/                 # comp2 bundle folder
|   |   +- e.r.comp2.view/          # comp2 view bundle
|   |   +- build.properties         # aggregator component2.bundles
|   |
|   +- features/                # comp1 feature folder
|   |   +- e.r.comp2.feature/       # comp2 feature
|   |   +- build.properties         # aggregator component2.features
|
+- feature/                 # root feature folder
|   +- e.r.feature.all/         # container feature for everything
|   +- e.r.feature.app.ui/      # Eclipse RCP application UI feature
|   +- e.r.feature.headless/    # Headless application feature
|
+- releng/                  # release engineering folder
|   +- e.r.products/            # products
|   +- e.r.site/                # repository/update site
|   +- target.platform/         # target platform
|
+- build.sh                 # execute build and create log file inside _log
|
+- pom.xml                  # parent pom containing modules for
                                feature
                                bundles
                                comp1/feature
                                comp1/bundles
                                comp2/feature
                                comp2/bundles
                                releng

W-I-P

local build and deployments

export 'REPOSILITE_ID=reposilite.klib.io'
export 'REPOSILITE_URL=https://reposilite.klib.io'
export 'REPOSILITE_USERNAME=klib-snapshots'
export 'REPOSILITE_TOKEN=<your-token-here>'
./build.sh --jar-signing --gpg-signing --deploy

deploy snapshot

# starting point is current development version e.g. 0.1.0-SNAPSHOT

# before the SNAPSHOT deployment , validate via local build
./build.sh --jar-signing --gpg-signing

# build and deploy bundle to SNAPSHOT repository
./build.sh --jar-signing --gpg-signing --deploy

# continue development until next deployment

deploy release

# starting point is current development version e.g. 0.1.0-SNAPSHOT

# before the RELEASE deployment, validate via local build
./build.sh --jar-signing --gpg-signing

# set the release version before building and deploying
./mvnw org.eclipse.tycho:tycho-versions-plugin:set-version -DnewVersion=0.1.0

# build and deploy bundle to RELEASE repository
./build.sh --jar-signing --gpg-signing --deploy

# tag release
git tag -a rel_0.1.0 -m "release 0.1.0" && git push --tags

# start next development release cycle with new version e.g. 0.2.0-SNAPSHOT
./mvnw org.eclipse.tycho:tycho-versions-plugin:set-version -DnewVersion=0.2.0-SNAPSHOT

# start next development release cycle with new version 
git add . \
  && git commit -m "starting next dev cycle - new version 0.2.0-SNAPSHOT" \
  && git push

# continue development until next deployment
# deploy locally available repository to artifactory
releng/upload_to_artifactory.sh \
    $(pwd)/releng/repo.sdk/target/repository \
    smaragd-internet-mirror-generic-local \
    example.pde.rcp/repo.sdk/$(date +'%Y%m%d-%H%M%S')
./build.sh

Useful analyse

Output the generated poms

-Dpolyglot.dump.pom=pom.xml just keep in mind that pom.xml takes precedence over pomless configuration, so maybe choose a different name if you only like to use this for debug purpose!

outputs a tree view of the P2 dependecies of a tycho project

MIND the hardcoded version

./mvnw \
    org.eclipse.tycho:tycho-p2-plugin:4.0.7:dependency-tree \
    --log-file log/build_$(date +%Y%m%d-%H%M%S).log

Remarks

creation of example.rcp.app.ui.plugin.product

creating example.rcp.app.ui.plugin.product with only bundle example.rcp.app.ui
and Add Required Plugins (Include optional dependencies is switched off)
and Running is giving error
org.eclipse.e4.core.di.InjectionException: java.lang.IllegalStateException: Could not create any rendering factory. Aborting ...
missing bundle org.eclipse.e4.ui.workbench.renderers.swt

Links

Tycho build

Maven

Errors occured during creation