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

spring-boot-starter-parent contains elements that must be overridden and aren't documented as such #21989

Closed
rupert-madden-abbott opened this issue Jun 16, 2020 · 2 comments
Assignees
Labels
type: regression A regression from a previous release
Milestone

Comments

@rupert-madden-abbott
Copy link
Contributor

rupert-madden-abbott commented Jun 16, 2020

Following on from #18532.

There are still some settings (in 2.3.1.RELEASE) getting inherited which need to be overridden but which are not documented:

  • scm -> developerConnection
  • scm -> connection
  • issueManagement
  • organization

A complete override would look like this:

<description/>
<url/>
<organization/>
<issueManagement/>
<developers>
    <developer/>
</developers>
<licenses>
    <license/>
</licenses>
<scm>
    <connection/>
    <developerConnection/>
    <url/>
</scm>

However, both organization and issueManagement are not required by Maven central so it would be better to remove them from spring-boot-starter-parent, to eliminate the need for overriding them.

scm developerConnection and connection are required so need adding to the documentation.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jun 16, 2020
@wilkinsona
Copy link
Member

Thank you, @rupert-madden-abbott.

scm developerConnection and connection are required so need adding to the documentation.

I'm not sure that they are required. We haven't got those in spring-boot-starter-parent in Spring Boot 2.2.x, although we do have them in some other poms.

@wilkinsona
Copy link
Member

Here are the relevant parts of the effective pom for a project using spring-boot-starter-parent 2.2.8:

  <url>https://projects.spring.io/spring-boot/#/spring-boot-starter-parent/demo</url>
  <licenses>
    <license>
      <name>Apache License, Version 2.0</name>
      <url>https://www.apache.org/licenses/LICENSE-2.0</url>
    </license>
  </licenses>
  <developers>
    <developer>
      <name>Pivotal</name>
      <email>info@pivotal.io</email>
      <organization>Pivotal Software, Inc.</organization>
      <organizationUrl>https://www.spring.io</organizationUrl>
    </developer>
  </developers>
  <scm>
    <url>https://github.com/spring-projects/spring-boot/spring-boot-starter-parent/demo</url>
  </scm>

And here's the equivalent when using 2.3.1:

  <url>https://spring.io/projects/spring-boot/demo</url>
  <organization>
    <name>Pivotal Software, Inc.</name>
    <url>https://spring.io</url>
  </organization>
  <licenses>
    <license>
      <name>Apache License, Version 2.0</name>
      <url>https://www.apache.org/licenses/LICENSE-2.0</url>
    </license>
  </licenses>
  <developers>
    <developer>
      <name>Pivotal</name>
      <email>info@pivotal.io</email>
      <organization>Pivotal Software, Inc.</organization>
      <organizationUrl>https://www.spring.io</organizationUrl>
    </developer>
  </developers>
  <scm>
    <connection>scm:git:git://github.com/spring-projects/spring-boot.git/demo</connection>
    <developerConnection>scm:git:ssh://git@github.com/spring-projects/spring-boot.git/demo</developerConnection>
    <url>https://github.com/spring-projects/spring-boot/demo</url>
  </scm>
  <issueManagement>
    <system>GitHub</system>
    <url>https://github.com/spring-projects/spring-boot/issues</url>
  </issueManagement>

Given how it's used, I think it makes sense to minimise the elements in spring-boot-starter-parent. It looks like we can safely remove organization scm/connection, scm/developerConnection, and issueManagement and not fall afoul of Maven Central's pom validation.

@wilkinsona wilkinsona changed the title More unexpected settings in effective pom spring-boot-starter-parent contains elements that must be overridden and aren't documented as such Jun 17, 2020
@wilkinsona wilkinsona added type: regression A regression from a previous release and removed status: waiting-for-triage An issue we've not yet triaged labels Jun 17, 2020
@wilkinsona wilkinsona self-assigned this Jun 17, 2020
@wilkinsona wilkinsona added this to the 2.3.2 milestone Jun 17, 2020
wilkinsona added a commit that referenced this issue Jun 17, 2020
Following the fix for gh-21989, spring-boot-starter-parent no longer
contains an <issueManagement> element. As a result the additional
content was no longer being added to the pom. This commit updates
the additions so that they are now added after the <scm> element
that is still present.

See gh-21989
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: regression A regression from a previous release
Projects
None yet
Development

No branches or pull requests

3 participants