Skip to content

Add global maven goal presets - #7537

Merged
mbien merged 1 commit into
apache:masterfrom
mbien:global-goal-presets
Jul 22, 2024
Merged

Add global maven goal presets#7537
mbien merged 1 commit into
apache:masterfrom
mbien:global-goal-presets

Conversation

@mbien

@mbien mbien commented Jul 2, 2024

Copy link
Copy Markdown
Member
  • add mvnw updater and a few maveniverse toolbox diagnostic goals as global preset
  • add right click menu actions which lead to the global and project rule editors for easy add/edit/remove
  • some layout adjustments to both global and custom goal windows so that they resize nicely
  • minor language level cleanup

image

"Edit Global Goals" (new) will open the (already existing) window:
image

(also accessible from maven execution options)

note:
I reverted a few things to not change too much at once. What I originally planned was to combine the global and per-project goal editor windows and I wanted to move the global editor panel to a card in the main maven options. However, the problem is that the two windows and the tools->options windows have different ways how to handle persistence, so this would have been too much at once. Still something we can do at some point.

@mbien mbien added Maven [ci] enable "build tools" tests ci:dev-build [ci] produce a dev-build zip artifact (7 days expiration, see link on workflow summary page) labels Jul 2, 2024
@mbien mbien added this to the NB23 milestone Jul 2, 2024
@neilcsmith-net

Copy link
Copy Markdown
Member

Looks good!

Ideally would have a link to Edit Project Goals that opens the right section of the project properties, between the Other Goals... and Edit Global Goals... links. Possibly another separator between Other Goals... and the edit actions to emphasize execution vs edit?

@mbien
mbien force-pushed the global-goal-presets branch from 73b033c to 2448b58 Compare July 3, 2024 21:45
@mbien

mbien commented Jul 3, 2024

Copy link
Copy Markdown
Member Author

@neilcsmith-net updated the screenshot, let me know what you think

@neilcsmith-net

Copy link
Copy Markdown
Member

Thanks! Think that works and a good change for NB23.

We could perhaps (in future!) standardize some of the terminology here. We use Goals and Actions in different places, and neither entirely overlaps with Maven's concept of Goal.

@mbien

mbien commented Jul 5, 2024

Copy link
Copy Markdown
Member Author

we would probably have to call it "action" everywhere to be technically correct, since compile is a phase and compile:compile a goal which happens to be in that phase. The action presets work for both, phases and goals.

Its just that goal is the more familiar term most likely, so if it happens to support phases it is probably ok to call the menu entry point "Edit Goals..."?

I would probably leave it as is for now tbh but I would also have no problem to change it to "Edit Actions...".

@mbien
mbien requested a review from neilcsmith-net July 8, 2024 22:22
@mbien
mbien requested review from matthiasblaesing and sdedic July 16, 2024 16:15
@mbien

mbien commented Jul 16, 2024

Copy link
Copy Markdown
Member Author

refreshing since dev build expired

@mbien
mbien force-pushed the global-goal-presets branch from 2448b58 to e376b6a Compare July 16, 2024 16:19
-->
<actions>
<action>
<actionName>CUSTOM-Add/Update Wrapper (mvnw)</actionName>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'd recommend to use identifier-like action names. These CUSTOM- are used in user-defined actions in the userdir.

@mbien mbien Jul 19, 2024

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I considered this but if they don't have the prefix, they won't show up.

and secondly: as soon a user adds/removes/edits them, the action definitions will be copied to the user dir as-is.

The action presets are essentially custom actions which aren't in the user dir yet. If the user has a nbactions.xml already won't be merged with it - so they are no defaults in the classic sense.

@mbien

mbien commented Jul 22, 2024

Copy link
Copy Markdown
Member Author

planning to merge this before freeze

@matthiasblaesing matthiasblaesing left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Change looks sane to me. We could do a bit of bikeshedding about what are worthy default goals, but they are not totally of what I would expect.

 - add mvnw updater and a few maveniverse toolbox diagnostic
   goals as global preset
 - add right click menu actions which lead to the global and project
   rule editors for easy add/edit/remove
 - some layout adjustments to both global and custom goal windows so
   that they resize nicely
 - minor language level cleanup
@mbien mbien removed the ci:dev-build [ci] produce a dev-build zip artifact (7 days expiration, see link on workflow summary page) label Jul 22, 2024
@mbien
mbien force-pushed the global-goal-presets branch from e376b6a to d136c79 Compare July 22, 2024 22:33
@mbien
mbien merged commit 91c23e0 into apache:master Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Maven [ci] enable "build tools" tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants