Skip to content

Avoid empty body warnings imposed by default activation of expandEmptyElements #2520

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Pankraz76
Copy link
Contributor

@Pankraz76 Pankraz76 commented Jun 23, 2025

Closes #2519.

@Pankraz76 Pankraz76 marked this pull request as draft June 23, 2025 11:10
@Pankraz76 Pankraz76 marked this pull request as ready for review June 23, 2025 14:27
@Goooler Goooler requested a review from Copilot June 23, 2025 16:40
@Goooler Goooler changed the title avoid empty body warnings emposed by default activation of expandEmptyElements Avoid empty body warnings emposed by default activation of expandEmptyElements Jun 23, 2025
Copilot

This comment was marked as outdated.

@Pankraz76

This comment was marked as outdated.

@Pankraz76 Pankraz76 force-pushed the patch-1 branch 2 times, most recently from 48ccc6b to 300e68b Compare June 23, 2025 20:09
@Goooler
Copy link
Member

Goooler commented Jun 24, 2025

Would you mind adding tests for this?

@Pankraz76
Copy link
Contributor Author

Would you mind adding tests for this?

no of course not, will impose QA.

@Pankraz76 Pankraz76 changed the title Avoid empty body warnings emposed by default activation of expandEmptyElements Avoid empty body warnings imposed by default activation of expandEmptyElements Jun 24, 2025
@Pankraz76
Copy link
Contributor Author

Pankraz76 commented Jun 24, 2025

missing format. Im used to maven and quarkus fixing itself, not having to run the goal manually.

Can we impose this here as well plz?

Run apply goal, ideally on dev machine only, like we want to do in:

@Pankraz76 Pankraz76 changed the title Avoid empty body warnings imposed by default activation of expandEmptyElements fix(lib): Avoid empty body warnings imposed by default activation of expandEmptyElements Jun 24, 2025
@Goooler Goooler changed the title fix(lib): Avoid empty body warnings imposed by default activation of expandEmptyElements Avoid empty body warnings imposed by default activation of expandEmptyElements Jun 24, 2025
@Pankraz76
Copy link
Contributor Author

is it a feature then, or dont we need convention commits on this?

@jbduncan
Copy link
Member

is it a feature then, or dont we need convention commits on this?

Nah, we don't use conventional commits in this project. :)

@jbduncan
Copy link
Member

jbduncan commented Jun 24, 2025

missing format. Im used to maven and quarkus fixing itself, not having to run the goal manually.

Oh, how so? How do Maven and Quarkus do this?

@Pankraz76
Copy link
Contributor Author

Pankraz76 commented Jun 24, 2025

missing format. Im used to maven and quarkus fixing itself, not having to run the goal manually.

Oh, how so? How do Maven and Quarkus do this?

thanks for interest. please see here:

@Pankraz76

This comment was marked as off-topic.

@@ -27,7 +27,7 @@ public class SortPomCfg implements Serializable {

public String lineSeparator = System.getProperty("line.separator");

public boolean expandEmptyElements = true;
Copy link
Member

Choose a reason for hiding this comment

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

I'm not a maven user - does this affect end-user behavior enough that we should note it in the CHANGELOG.md?

Copy link
Contributor Author

@Pankraz76 Pankraz76 Jun 25, 2025

Choose a reason for hiding this comment

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

Might not be important enough to warrant urgent attention.

On the other hand, many of these cases may now be obsolete, since the Convention over Configuration principle is now fixed and no longer needs to be overridden, from outside.

Ideally, a new build should even fail, given attention that the config has now changed, as the relevant client code is now redundant/wrong:

<expandEmptyElements>false</expandEmptyElements>

https://github.com/apache/maven-parent/blob/f4ab7c2eb04865071186c57a263243c72b6e8d52/pom.xml#L1236

If you want me to add some notes, let me know.

@Pankraz76 Pankraz76 requested a review from nedtwigg June 25, 2025 09:03
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.

avoid empty body warnings emposed by default activation of expandEmptyElements
4 participants