From 8fc77bc3377cc8fd9b790f5c5d4b2dbc57bfa196 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Tue, 9 Sep 2025 16:29:53 +0000
Subject: [PATCH 1/2] Initial plan
From c1756d73b340a963c45d5c9d7810452ff8a202ee Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Tue, 9 Sep 2025 16:37:34 +0000
Subject: [PATCH 2/2] Fix Java version compatibility and add build verification
script
Co-authored-by: richposada <454664+richposada@users.noreply.github.com>
---
README.md | 19 +++++++++++--
asset-manager/pom.xml | 2 +-
build-all.sh | 66 +++++++++++++++++++++++++++++++++++++++++++
3 files changed, 84 insertions(+), 3 deletions(-)
create mode 100755 build-all.sh
diff --git a/README.md b/README.md
index 7fdd345..20b023c 100644
--- a/README.md
+++ b/README.md
@@ -10,8 +10,23 @@
- [Todo Web API with Oracle Database](https://github.com/Azure-Samples/java-migration-copilot-samples/tree/main/todo-web-api-use-oracle-db) A To-do application using Oracle database for storage. It leverages Oracle-specific SQL features and data types, for instance, VARCHAR2. This sample migrates the application to use Azure Database for PostgreSQL instead.
-- [Student Web App - Jakarta EE](jakarta-ee/student-web-app) A Java EE web application running on Open Liberty with a hybrid architecture that supports both traditional servlets and Spring MVC. The application manages student profiles with CRUD operations and demonstrates migrating from Ant to Maven and Java EE to Jakarta EE.
-
+- [Student Web App - Jakarta EE](jakarta-ee/student-web-app) A Java EE web application running on Open Liberty with a hybrid architecture that supports both traditional servlets and Spring MVC. The application manages student profiles with CRUD operations and demonstrates migrating from Ant to Maven and Java EE to Jakarta EE.
+
+## Building All Projects
+
+To quickly verify that all Maven projects build successfully, you can use the provided build script:
+
+```bash
+./build-all.sh
+```
+
+This script will:
+- Check your Java version
+- Build all Maven-based sample projects
+- Provide a summary of successful and failed builds
+
+**Requirements**: Java 17 or later
+
## Branches
* `main`: source projects
diff --git a/asset-manager/pom.xml b/asset-manager/pom.xml
index f46b46d..c52a128 100644
--- a/asset-manager/pom.xml
+++ b/asset-manager/pom.xml
@@ -16,7 +16,7 @@
pom
- 21
+ 17
diff --git a/build-all.sh b/build-all.sh
new file mode 100755
index 0000000..1a2bca4
--- /dev/null
+++ b/build-all.sh
@@ -0,0 +1,66 @@
+#!/bin/bash
+set -e
+
+echo "Java Migration Copilot Samples - Build Verification Script"
+echo "=========================================================="
+
+# Check Java version
+echo "Java version:"
+java -version
+
+echo ""
+echo "Building all Maven projects..."
+echo ""
+
+# Array of Maven projects
+MAVEN_PROJECTS=(
+ "mi-sql-public-demo"
+ "rabbitmq-sender"
+ "todo-web-api-use-oracle-db"
+ "asset-manager"
+)
+
+FAILED_PROJECTS=()
+SUCCESSFUL_PROJECTS=()
+
+for project in "${MAVEN_PROJECTS[@]}"; do
+ echo "=== Building $project ==="
+ if [ -d "$project" ]; then
+ cd "$project"
+ if mvn clean compile -q; then
+ echo "✅ $project - SUCCESS"
+ SUCCESSFUL_PROJECTS+=("$project")
+ else
+ echo "❌ $project - FAILED"
+ FAILED_PROJECTS+=("$project")
+ fi
+ cd ..
+ else
+ echo "⚠️ $project - DIRECTORY NOT FOUND"
+ FAILED_PROJECTS+=("$project")
+ fi
+ echo ""
+done
+
+echo "=========================================================="
+echo "BUILD SUMMARY"
+echo "=========================================================="
+echo "Successful projects: ${#SUCCESSFUL_PROJECTS[@]}"
+for project in "${SUCCESSFUL_PROJECTS[@]}"; do
+ echo " ✅ $project"
+done
+
+if [ ${#FAILED_PROJECTS[@]} -gt 0 ]; then
+ echo ""
+ echo "Failed projects: ${#FAILED_PROJECTS[@]}"
+ for project in "${FAILED_PROJECTS[@]}"; do
+ echo " ❌ $project"
+ done
+ echo ""
+ echo "Build completed with failures!"
+ exit 1
+else
+ echo ""
+ echo "All projects built successfully! 🎉"
+ exit 0
+fi
\ No newline at end of file