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

[MNG-7354] Refactor MavenCli to ease extensibility #634

Closed
wants to merge 13 commits into from

Conversation

gnodet
Copy link
Contributor

@gnodet gnodet commented Dec 9, 2021

@michael-o This is a small refactoring, the goal is mainly to make mvnd main class not to rewrite the whole MavenCli.
The consequence for mvnd is in the following commit apache/maven-mvnd@6d2fb40.

@cstamas
Copy link
Member

cstamas commented Dec 9, 2021

Nice!


private static final String MVN_MAVEN_CONFIG = ".mvn/maven.config";
public static final String MVN_MAVEN_CONFIG = ".mvn/maven.config";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that this property will likely go away with #602

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reading #602, I'm not sure I agree with adding more intelligence in the launch scripts and removing it from the java code. This will make tools embedding maven much more difficult to behave consistently with maven.

@AlexanderAshitkin
Copy link

AlexanderAshitkin commented Dec 11, 2021

Allowing to ovveride dozens of methods makes MavenCli contract vague and could complicate miantenance. going forward It will be easier to maintain MavenCli with public api/interface extracted. For clients it will be easier as well to implement custom logic by delegation. So far it is unclear how to use and extend this class correctly and safely

@gnodet
Copy link
Contributor Author

gnodet commented Dec 13, 2021

Allowing to ovveride dozens of methods makes MavenCli contract vague and could complicate miantenance. going forward It will be easier to maintain MavenCli with public api/interface extracted. For clients it will be easier as well to implement custom logic by delegation. So far it is unclear how to use and extend this class correctly and safely

The main usage is apache/maven-mvnd@6d2fb40

@gnodet gnodet closed this Oct 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants