Improve legacy project migration by resolving nature from pom.xml#1553
Conversation
For projects identified as legacy, if the nature is not properly configured in the .project file, the correct nature is now resolved using the pom.xml file as a fallback mechanism.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@workspaces/mi/mi-extension/src/util/migrationUtils.ts`:
- Around line 990-1013: Fix the typo in the parseString error log inside
getNatureFromProjectFile: change the message from "Error occured while reading "
to "Error occurred while reading " so the console.error call in the parseString
callback uses the correct spelling; update only the string literal passed to
console.error in the parseString error branch of getNatureFromProjectFile.
There was a problem hiding this comment.
Pull request overview
This pull request improves the migration process for legacy WSO2 projects by enhancing the determineProjectType function to use pom.xml as a fallback mechanism when the .project file either doesn't contain a proper nature configuration or identifies the project as LEGACY (e.g., when it only contains org.eclipse.m2e.core.maven2Nature).
Changes:
- Refactored duplicate XML parsing logic into a new
getNatureFromProjectFilehelper function - Added fallback logic to resolve project nature from pom.xml when
.projectfile returns undefined or LEGACY nature - Added comprehensive JSDoc documentation for the new helper function
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…cking performance
978fa57
into
wso2:release/mi-3.1.5
Purpose
For projects identified as legacy, if the nature is not properly configured in the .project file, the correct nature is now resolved using the pom.xml file as a fallback mechanism.
Summary by CodeRabbit
Release Notes