Skip to content

Conversation

@mbien
Copy link
Member

@mbien mbien commented Sep 14, 2025

make sure that properties are correctly removed when removed by the user and that they are set in the specified order

UI:

  • renamed "remember as" to "save as", since it persists it to the project config
  • don't show save-as and history UI in re-run action, since those were only implemented for the run-goal action
  • avoid storing repeated runs in history
  • made the goal customizer panel slightly larger (similer to the ant sibling)
  • minor code improvements

fixes #5251

@mbien mbien added this to the NB28 milestone Sep 14, 2025
@mbien mbien added Maven [ci] enable "build tools" tests UI User Interface ci:dev-build [ci] produce a dev-build zip artifact (7 days expiration, see link on workflow summary page) labels Sep 14, 2025
@mbien mbien force-pushed the improve-maven-rerun-prop-handling branch from 68c27e1 to f041ab2 Compare September 15, 2025 02:27
@mbien
Copy link
Member Author

mbien commented Sep 22, 2025

@jglick wondering if you are available for more reviews, you likely helped developing maven support back then.

Object retValue = DialogDisplayer.getDefault().notify(dd);
if (retValue == DialogDescriptor.OK_OPTION) {
pnl.applyValues(mapping);
maps.getActions().remove(mapping); // deduplicate
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this the main fix?

Copy link
Member Author

Choose a reason for hiding this comment

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

no, this is just convenience that the same item isn't repeatedly stored in history if you re-run it. marked the main fix via comment

Comment on lines +204 to +217
// clear props in case of removal or changed order
for (String prop : new ArrayList<>(rc.getProperties().keySet())) {
rc.setProperty(prop, null);
}
PropertySplitter split = new PropertySplitter(epProperties.getText());
String token = split.nextPair();
while (token != null) {
String[] prp = StringUtils.split(token, "=", 2); //NOI18N
if (prp.length == 2) {
String[] prp = token.split("=", 2); //NOI18N
if (prp.length == 2 && !prp[0].isBlank()) {
rc.setProperty(prp[0], prp[1]);
}
token = split.nextPair();
}

Copy link
Member Author

Choose a reason for hiding this comment

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

@jglick this is the main fix

Copy link
Contributor

@jglick jglick left a comment

Choose a reason for hiding this comment

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

Sounds OK. Did not test.

@mbien
Copy link
Member Author

mbien commented Sep 22, 2025

thanks a lot for reviewing! will switch to the suggested hash() utility method before merge.

make sure that properties are correctly removed when removed
by the user and that they are set in the specified order

UI:
 - renamed "remember as" to "save as", since it persists it to the
   project config
 - don't show save-as and history UI in re-run action, since those
   were only implemented for the run-goal action
 - avoid storing repeated runs in history
 - made the goal customizer panel slightly larger (similer to the ant
   sibling)
 - minor code improvements
@mbien mbien force-pushed the improve-maven-rerun-prop-handling branch from f041ab2 to bb5b83e Compare September 22, 2025 18:25
@mbien mbien merged commit 46d33ad into apache:master Sep 22, 2025
93 of 96 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:dev-build [ci] produce a dev-build zip artifact (7 days expiration, see link on workflow summary page) Maven [ci] enable "build tools" tests UI User Interface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Not possible to remove parameter from mvn run when using "Re-run with different parameters"

2 participants