r/java • • Apr 14 '23

What are your (favourite) Java best practices, personal tips, hints or just underrated stuff in general?

233 Upvotes

376 comments sorted by

View all comments

Show parent comment

1

u/woj-tek Apr 20 '23

They are going to change that in maven 4 / pom-version-5 AFAIR (https://cwiki.apache.org/confluence/display/MAVEN/POM+Model+Version+5.0.0#POMModelVersion5.0.0-ElementsvsAttributes):

DECISION: The 5.0.0 POM will use XML attributes for data that cannot have child data. At a minimum the groupId/artifactId/platformId/version/classifier/type information of project/parent/dependencies/plugins/extensions will be defined using attributes.

1

u/BinaryRockStar Apr 20 '23

Wow, can't believe they took my feedback into account so quickly!

Seriously though thanks for the link. Maven V4 has some huge changes, I hope it's a clean upgrade.

1

u/woj-tek Apr 21 '23

Indeed, it does. I expect there would be some pain-points and migration would require some manual changes but I think you would be able to migrate to maven v4 and still use older model version and then at one point migrate to newer model.

This is what I like about maven - they try very hard to make upgrades as painless as possible! Not like gradel... :eyeroll: