Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Assess and upgrade Azure workloads between plans, tiers, or SKUs with automated migration steps
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
references/languages/java/workflow/phase-1-precheck.md
1# Phase 1: Precheck23Load this file when executing Phase 1. Refer back to [`upgrade-success-criteria`](../rules/upgrade-success-criteria.md) and [`upgrade-strategy`](../rules/upgrade-strategy.md) for success criteria and strategy, and [`../rules/troubleshooting.md`](../rules/troubleshooting.md) when failures occur.45| Category | Scenario | Action |6| ------------------- | -------------------------------- | ------------------------------------------------------ |7| Unsupported Project | Not a Maven/Gradle project | STOP with error |8| Unsupported Project | Git not installed or not managed | Log warning, continue without git |9| Invalid Goal | No legacy Azure SDK deps found | STOP — nothing to migrate |10| Java Version | Below JDK 8 | Include Java upgrade as part of the migration plan |1112**Prerequisites**: JDK 8+ and Maven or Gradle must be pre-installed.1314**Environment detection**:1516Detect available JDKs:171. Check `JAVA_HOME` and `JDK_HOME` environment variables182. Run `java -version` and `javac -version` to detect the default JDK193. Search common JDK installation paths (platform-specific: Program Files on Windows, /usr/lib/jvm on Linux, /Library/Java on macOS)204. Check for version manager installations (SDKMAN, ASDF, jenv, Jabba)215. For each found JDK, read the `release` file to determine the version2223Report all found JDKs with their path, version, and discovery source.2425Detect build tools:261. Check for Maven Wrapper (`mvnw`/`mvnw.cmd`) or Gradle Wrapper (`gradlew`/`gradlew.bat`) in the project root — prefer wrappers when present272. If a wrapper exists, read `.mvn/wrapper/maven-wrapper.properties` or `gradle/wrapper/gradle-wrapper.properties` to determine the wrapper-defined version283. Run `mvn --version` or `gradle --version` to detect system installations294. Check `MAVEN_HOME`/`M2_HOME` environment variables3031Report all found installations with their path, version, and source.3233**On success**: Create `.github/java-upgrade/{RUN_ID}/plan.md` from the Plan Template — replace placeholders (`<RUN_ID>`, `<PROJECT_NAME>`, `<current_branch>`, `<current_commit_id>`, datetime) and follow the HTML-comment instructions to populate each section.34