question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Override unwanted settings inherited from spring-boot-starter-parent in Maven projects

See original GitHub issue

Maven-based projects that use spring-boot-starter-parent inherit the <licenses> and <developers> from the parent. We should override these in the pom.xml of generated Maven projects. The following appears to be the minimum effective override:

<developers>
    <developer />
</developers>
<licences>
    <license />
</licences>

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
wilkinsonacommented, Jun 7, 2021

#1242 and the discussion on Twitter has given me cause to think about this some more. The key argument that led to us declining this, IIRC, was the following:

There are a number of reports that user switch the parent to one of their own. If we added those overrides, they would know have to switch the parent and potentially removes those override as the value in their parent is what they want

Not having to do too much when you switch to a custom parent is undoubtedly a good thing and this is a point in favour of not having the overrides. However, it comes at a cost and I now think that cost is rather high.

If we generated the overrides and a project switched to a custom parent while leaving the overrides in place, it would have no license declared. IANAL, but my understanding is that a lack of license doesn’t really indicate anything. You can’t, for example, slap a license of your choosing on someone else’s code just because it doesn’t have a license. On the other hand, not generating the excludes leaves generated projects inheriting Spring Boot’s Apache v2 license which has a high change of being the wrong license. Whether or not that inherited license has any legal weight is an unknown, but it feels to me that no license is much better than a potentially incorrect license. The same goes for the other settings that we’d have to override. They all feel to me like it’s better for them to be absent than incorrect.

0reactions
snicollcommented, Nov 27, 2019

We’ve discussed this one and we’ve agreed not to apply those for projects generated by initializr with our conventions. There is some information in the ref guide about it, I’ve opened https://github.com/spring-projects/spring-boot/issues/19165 to make sure that part is properly described as we already have a link in HELP.md to that.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Spring boot starter dependency overwrites netty version of the ...
Your pom will be inheriting a dependencyManagement section from the spring poms you have used in its parent hierarchy.
Read more >
Spring Boot Maven Plugin Documentation
Maven users can inherit from the spring-boot-starter-parent project to obtain ... (You can override that by setting a Maven property called ...
Read more >
Override Maven Plugin Configuration from Parent - Baeldung
Default Configuration Inheritance. Plugin configurations allow us to reuse a common build logic across projects. If the parent has a plugin, ...
Read more >
Using Maven's Bill of Materials (BOM) - Reflectoring
As Java developers, we may maintain many applications using Maven for their dependency management. These applications need upgrades from ...
Read more >
Spring Boot 官文阅读笔记(二)- Using Spring Boot | 伤神的博客
Maven users can inherit from the spring-boot-starter-parent project to ... With that setup, you can also override individual dependencies by ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found