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 advanced filtering features to Pom Editor Maven Plugin, including module filtering #23

Open
dellamas opened this issue May 4, 2023 · 1 comment

Comments

@dellamas
Copy link

dellamas commented May 4, 2023

Problem Description:

Currently, the Pom Editor Maven Plugin has limited filtering capabilities for elements in the POM file. For large and complex projects with many dependencies and plugins, it can be difficult to manually manage the POM without the ability to filter elements based on specific criteria. Additionally, when a project has an original POM and POM templates in each module, manual editing can be even more cumbersome.
Proposed Solution:

Add advanced filtering features to the Pom Editor Maven plugin to allow users to filter POM elements based on specific criteria, including module filtering. The advanced filtering features would allow users to edit the POM more efficiently and accurately, saving time and reducing the risk of manual errors.
CLI Examples:

Filter dependencies by group and module

 mvn pom-editor:filter -DpomFile=pom.xml -DgroupId=com.example -Dmodule=core

Filter plugins by artifact ID and module

mvn pom-editor:filter -DpomFile=pom.xml -DartifactId=maven-compiler-plugin -Dmodule=webapp

Filter dependencies by scope and module

mvn pom-editor:filter -DpomFile=pom.xml -Dscope=runtime -Dmodule=core

Benefits:

Facilitates POM editing in large and complex projects.
Reduces the risk of manual errors when filtering POM elements.
Saves time for developers, making POM editing more efficient and accurate.

Acknowledgments:

We appreciate your consideration and feedback on this idea. We look forward to hearing your opinions and suggestions

@dearrudam
Copy link
Contributor

@dellamas, we are very happy you are interested in helping us and there are plenty of ways you can do so. Thanks for your interest in this project! 👍

This proposal is very good and worthy!

I totally agree with you:

For large and complex projects with many dependencies and plugins, it can be difficult to manually manage the POM without the ability to filter elements based on specific criteria.

Right now, the plugin doesn't look for dependencies declared on parent POM files and it doesn't handle Maven multi-module projects with many POM files, but it is something that it's on the radar for sure!

What the add-dep goal does is: it will look up the matched dependency on the target POM file in order to update with the given version, classifier, type, and scope or add the given dependency if it's not declared on the target POM file.

IMHO I think the proposal should get be refined. 🥇

Please, could you re-create this proposal by using the New Goal Proposal issue form? Try to provide all the required fields of the form in order to help us to understand the whole proposal, since the objective, requested goals syntaxes, and possible scenarios with expected results. Here's a sample of a new goal proposal created by using this issue form.

One more time, thank you for your interest in this project and for your proposal! 👍

Will be amazing to make this proposal come true! 👏!

Let me know if you need help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

2 participants