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

Some small improvements to pom.xml #1

Open
rmcdouga opened this issue Apr 30, 2021 · 0 comments
Open

Some small improvements to pom.xml #1

rmcdouga opened this issue Apr 30, 2021 · 0 comments

Comments

@rmcdouga
Copy link

rmcdouga commented Apr 30, 2021

Thanks for this. I have something similar in a gist that I use as my minimal pom.xml file.

+1 I maintained this template locally and got the idea of sharing it on github. Now it is easier to maintain.

I have a couple of suggestions for the pom.xml:

  • If you move the java.version property up a couple of lines, you could use ${java.version} in your maven.compiler.* properties (saving duplication of the 16 number and making it easier to move to newer versions).

I thought about that and decided to publish another template for Java 17. "My" way is redundant, but easier to read. I don't think we will ever have to update the property.

  • You might want to move the versions of your dependencies into properties. The Spring does this in their pom.xml and I find it handy not to have to go looking for version numbers (since it's one of the things that gets updated the most). This would make the pom.xml a little longer (maybe making it not the "smallest possible" :)), but I think it would make it a little easier to maintain.

I like to keep the versions of plugins usw. directly in the definition. I get the best "auto-completion" that way in the IDEs. Maybe I will write a blogpost about that.

I can submit a PR if you'd like. Either way, the changes are small so if you don't think they are worth it, that's OK too.

I would like to keep the pom.xml that way for now. I don't like the declaration of maven-surefire-plugin, but it is necessary for JUnit 5...

Big thanks for your feedback and your time!

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

No branches or pull requests

1 participant