Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion asset-manager/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<packaging>pom</packaging>

<properties>
<java.version>21</java.version>
<java.version>17</java.version>
</properties>

<modules>
Expand Down
66 changes: 66 additions & 0 deletions build-all.sh
Original file line number Diff line number Diff line change
@@ -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