Skip to content

The Unified and Autonomous Development Platform

chore: Add rebuild command to dev.sh

Robin Shen15ce99d1b749
diff --git a/dev.sh b/dev.sh
index 8f2e555e99..582d76df35 100755
--- a/dev.sh
+++ b/dev.sh
@@ -110,17 +110,21 @@ compile_changed() {
done
}
-build_project() {
+rebuild_project() {
build_reference="server-product/target/sandbox"
+ run_maven compile "$@"
+ if [ ! -d "$build_reference" ]; then
+ echo "Maven compile did not create $build_reference" >&2
+ exit 1
+ fi
+ touch "$build_reference"
+}
+build_project() {
+ build_reference="server-product/target/sandbox"
if [ ! -d "$build_reference" ]; then
echo "Development sandbox not found. Running: mvn compile"
- run_maven compile
- if [ ! -d "$build_reference" ]; then
- echo "Maven compile did not create $build_reference" >&2
- exit 1
- fi
- touch "$build_reference"
+ rebuild_project
return
fi
@@ -151,6 +155,7 @@ usage() {
echo "Commands:"
echo " run Start the dev server and hot-load rebuilt classes; restart if hot loading fails"
echo " build Build with Maven when needed, otherwise compile changed files with ECJ"
+ echo " rebuild Build all modules with Maven"
echo " test Run tests with Maven"
echo " install Install project artifacts with Maven"
echo " clean Clean build outputs with Maven"
@@ -167,6 +172,11 @@ case "$1" in
build_project "$@"
exit
;;
+ rebuild)
+ shift
+ rebuild_project "$@"
+ exit
+ ;;
clean)
shift
run_maven clean "$@"