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-8573] OS Service #2099

Merged
merged 6 commits into from
Feb 10, 2025
Merged

[MNG-8573] OS Service #2099

merged 6 commits into from
Feb 10, 2025

Conversation

cstamas
Copy link
Member

@cstamas cstamas commented Feb 10, 2025

And move the OS static helper to util, is not
profile specific.


https://issues.apache.org/jira/browse/MNG-8573

And move the OS static helper to util, is not
profile specific.

---

https://issues.apache.org/jira/browse/MNG-8573
@cstamas cstamas requested a review from gnodet February 10, 2025 11:59
@cstamas cstamas self-assigned this Feb 10, 2025
@cstamas cstamas added this to the 4.0.0-rc-3 milestone Feb 10, 2025
String family();

/**
* Returns {@code true} if you need to make extra hoops and loops.
Copy link
Contributor

Choose a reason for hiding this comment

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

I hope this javadoc could be reworded.

Copy link
Member Author

Choose a reason for hiding this comment

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

sure, am just testing our reviewers "eagle eye"

@cstamas cstamas marked this pull request as ready for review February 10, 2025 12:51
Copy link
Contributor

@elharo elharo left a comment

Choose a reason for hiding this comment

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

I don't see why we need a wrapper around the utility class. This feels like added complexity for no special purpose.

@cstamas
Copy link
Member Author

cstamas commented Feb 10, 2025

The goal is simple:

  • the API is meant for plugins and extensions, while Maven "inner stuff" do have the static helper class
  • having Service (instead of static class/methods) we are in greater control and are future proof
  • for example (unsure how feasible this would be), we could test plugins on "spoofed OS"es?

@gnodet
Copy link
Contributor

gnodet commented Feb 10, 2025

I've enhanced the javadoc, but I wonder if it would make more sense to use proper enums, as we don't even define the values.

@cstamas
Copy link
Member Author

cstamas commented Feb 10, 2025

Yes, I intentionally left them out, as IMO this service would be most used for things like:

  • print out some OS related stuff (like mvn -V does)
  • the "is windows" stuff is hot and will be most used, as I envision, as many if not all plugins has IF/ELSE logic to perform hoops and loops

I just wanted to keep this OS stuff small, minimal. And once service, we can later extend it with new methods, as required or we spot some need.

Copy link
Contributor

@gnodet gnodet left a comment

Choose a reason for hiding this comment

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

LGTM

@cstamas cstamas merged commit 2766d24 into apache:master Feb 10, 2025
13 checks passed
@cstamas cstamas deleted the MNG-8573 branch February 10, 2025 14:12
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 this pull request may close these issues.

4 participants