Closed karianna closed 5 years ago
I would say 'yes'. Not because I would like it but because it's pragmatical and based on experience from migrating builds from Maven 2.2.1 through various versions up to the version 3.5.2 and from JDK 5 to the latest JDK 10 through the years in projects which were inheriting jvnet parent which had explicit plugin versions defined in the 'release' profile. Current solution is supposed to give all 'subprojects' freedom of choice for their minimal Maven/JDK versions and allow them to 'migrate' at their own pace.
The problem faced here (and hopefully somehow resolved) is that once the version for the plugin is defined for the plugin in profile/build/plugin and there is some issue with the plugin, it is not easy to fix or workaround that issue (by copying the profile into his project or not using the 'release' profile at all). For the real example, let's assume the version of javadoc plugin is defined in the parent to be some '2.8' version, the project 'X' inherits the parent and uses Mvn 3.3.9 and JDK 8 for the build. Say project 'X' moves to JDK 9. What happens is that javadoc build is going to fail because version 2.8 of the javadoc plugin does not run correctly on JDK 9. So the javadoc plugin version needs to be updated in project 'X'. How?
I understand that there is always an option to submit PR and release new version of the parent pom - is this really something we want to be doing for every encountered incompatibility?
I also see the 'overhead' this means for spec projects (or any other simple project covered by one pom), OTOH I do not consider this as a big 'overhead' for bigger projects which typically do have some project level specific parent pom.
It can be a bit of a maintenance headache for sub projects if they constantly have to update the parent. That said, the Apache Commons projects and Apache Maven itself manages this OK (as does my own company (we've gone through 80 parents). I'll submit a PR and see what more people say, I'm happy to be overruled :-).
OK PR is in - detailed feedback welcome!
I believe there is a parent pom for projects now. Closing @karianna if you disagree please reopen.
Do we want to set those explicitly? It's considered good practice to do so in a parent POM for repeatable builds.