diff --git a/README.md b/README.md index cff6c99..9a9899e 100644 --- a/README.md +++ b/README.md @@ -38,30 +38,46 @@ To build this repository locally, you need: The root Maven build inherits from `../dbeaver`, and the product aggregate also includes sibling modules from `../../../dbeaver-common` and `../../../dbeaver`. -### Clone the required repositories +## Repository layout + +`dbvr` is built together with sibling repositories. Clone all of them into the +same parent directory so the relative paths in the Maven/Tycho build resolve +correctly ```bash git clone https://github.com/dbeaver/dbeaver-common.git git clone https://github.com/dbeaver/dbeaver.git git clone https://github.com/dbeaver/dbeaver-jdbc-libsql.git git clone https://github.com/dbeaver/dbvr.git +git clone https://github.com/dbeaver/idea-rcp-launch-config-generator.git +git clone https://github.com/dbeaver/dbeaver-osgi-common.git +``` +## Build product +```bash +mvn -f product/aggregate/pom.xml \ +-Dheadless-platform \ +-Pproduct-dbvr-ce \ +-Dbuild.all-environments \ +package ``` -Arrange them as sibling directories so the relative paths in the Maven/Tycho build resolve correctly. - -### Build the project +## Develop in IDEA -From the `dbvr` repository root: +To generate IntelliJ IDEA project files and RCP launch configurations, run from the `dbvr` repository root: ```bash -mvn -f product/aggregate/pom.xml \ - -Dheadless-platform \ - -Pproduct-dbvr-ce \ - -Dbuild.all-environments \ - package +./generate_workspace.sh ``` -This is the same aggregate build profile used by the repository CI workflow. +On Windows use `generate_workspace.cmd`. + +Then run +```bash +cd ../dbeaver +``` +```bash +mvn generate-sources +``` ### Run the CLI diff --git a/generate_workspace.cmd b/generate_workspace.cmd new file mode 100644 index 0000000..cd20c4a --- /dev/null +++ b/generate_workspace.cmd @@ -0,0 +1,2 @@ +@echo off +call %~dp0\..\idea-rcp-launch-config-generator\runGenerator.cmd -f %~dp0 \ No newline at end of file diff --git a/generate_workspace.sh b/generate_workspace.sh new file mode 100755 index 0000000..174ded0 --- /dev/null +++ b/generate_workspace.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env sh + +script_dir="$(realpath "$(dirname "$0")")" +repositories_root_dir="$(realpath "$script_dir/..")" + +"$repositories_root_dir"/idea-rcp-launch-config-generator/runGenerator.sh "$script_dir" \ No newline at end of file diff --git a/osgi-app.properties b/osgi-app.properties new file mode 100644 index 0000000..e2ab440 --- /dev/null +++ b/osgi-app.properties @@ -0,0 +1,28 @@ +workspaceName=dbvr-ce +featuresPaths=\ + dbeaver/features;\ + dbvr/features; +bundlesPaths=\ + dbeaver-common/modules;\ + dbeaver/plugins;\ + dbeaver/test;\ + dbeaver-jdbc-libsql;\ + dbvr/bundles;\ + dbvr/test; +repositories=\ + https://repo.dbeaver.net/p2/ce/latest/;\ + https://download.eclipse.org/releases/${eclipse-version}/; +testLibraries=\ + org.junit;\ + org.mockito.mockito-core;\ + junit-jupiter-api;\ + org.opentest4j;\ + org.hamcrest.core +productsPaths=\ + dbvr/product/community/dbvr.product;\ + dbvr/product/community-unittest/dbvr-unittest.product;\ + dbeaver/product/community/DBeaver.product; +ideaConfigurationFilesPaths=\ + dbvr/.ide/.idea +optionalFeatureRepositories=\ + dbeaver/product/repositories