Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Support for Maven Profiles in Effective POM Generation #178

Open
erangel opened this issue Oct 25, 2024 · 0 comments · May be fixed by #179
Open

Add Support for Maven Profiles in Effective POM Generation #178

erangel opened this issue Oct 25, 2024 · 0 comments · May be fixed by #179

Comments

@erangel
Copy link
Contributor

erangel commented Oct 25, 2024

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

  1. Obtain set of active profiles from Maven context and use them when generating effective pom
  2. 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: --profiles or -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.

@erangel erangel linked a pull request Oct 25, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant