-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
Add Support for Maven Profiles in Effective POM Generation
Overview
Add capability to consider active Maven profiles when generating the effective POM for linting. This improves accuracy of linting by considering profile specific dependencies and configurations.
Problem Statement
Currently, the Mule Linter generates an effective pom by calling Maven, but does not consider active profiles. This leads to potential false positives/negatives when projects use profile specific dependencies or configurations.
Proposed Solution
- Obtain set of active profiles from Maven context and use them when generating effective pom
- Add optional CLI parameter to specify active profiles for linting
Detailed Requirements
Maven Profile Support
- Add support to obtain active profiles from Maven context
- Use active profile list when calling Maven for effective POM generation
CLI Enhancement
- Add new parameter:
--profilesor-p - Accept comma-separated list of profile IDs
Technical Implementation Notes
- Update MuleApplication to accept a new optional constructor parameter for a profile List
- Update getEffectivePomFile to use profile list when calling Maven DefaultInvoker()
- Maintain backward compatibility for projects not using profiles
Additional Context
This enhancement will be particularly useful for projects that use different dependencies or configurations across environments (dev, test, prod) through Maven profiles.
Metadata
Metadata
Assignees
Labels
No labels