sergehuber opened a new pull request, #737:
URL: https://github.com/apache/unomi/pull/737
#### Summary
This PR implements UNOMI-887 by introducing a single, enhanced build.sh for
Unomi 3.x that standardizes build, deploy, and optional Karaf run. It replaces
multiple ad‑hoc scripts and adds strong error handling, readable output, and
comprehensive environment validation.
#### What’s changed
- Added: build.sh (unified build/deploy/run, colorized output, progress,
traps with line/function traces).
- Removed: buildAndRun.sh, buildAndRunNoTests.sh, compileDeploy.sh,
generate-package.sh.
- Preflight validation: Java/Maven/GraphViz, memory/disk, Maven settings,
port availability.
- Flexible flags: --skip-tests, --integration-tests, --single-test,
--use-opensearch, --it-debug/ports/suspend, -X/--offline,
--no-maven-cache/--purge-maven-cache, --deploy/--karaf-home,
--debug/ports/suspend, --no-karaf, --auto-start.
- Deployment helpers: copy KAR to Karaf deploy, purge Karaf caches; optional
GeoLite2/Geonames copy if present.
- Environment: honors NO_COLOR; macOS/Linux friendly with Apple Silicon
guidance.
#### Rationale
- Improve developer experience and reduce troubleshooting time via proactive
checks and clearer, structured feedback.
- Standardize and simplify common workflows into one entrypoint that’s
easier to maintain as Unomi evolves.
#### How to use
- Show help and examples:
- ./build.sh --help
- Typical builds:
- ./build.sh
- ./build.sh --integration-tests --use-opensearch
- ./build.sh --skip-tests
- Deploy to an existing Karaf:
- export UNOMI_VERSION=3.0.0-SNAPSHOT
- ./build.sh --deploy --karaf-home ~/apache-karaf
- Debug:
- ./build.sh --debug --debug-port 5005 --debug-suspend
- ./build.sh --integration-tests --single-test
org.apache.unomi.itests.graphql.GraphQLEventIT --it-debug --it-debug-suspend
#### Testing done
- Verified all CLI flags, including integration-test selection and debug
modes.
- Validated error handling (traps, line numbers, function traces) and color
output on supported terminals.
- Tested deployment to an existing Karaf instance and optional data file
copy.
#### Backwards compatibility
- Removes legacy scripts in favor of build.sh; workflows are preserved with
clearer flags.
- No functional changes to product modules; only build ergonomics improved.
#### Documentation
- Self-documented via ./build.sh --help with examples; aligns with NO_COLOR
standard.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]