spring-projects / spring-projects/spring-boot

Remove bootArchives configuration in favour of adding task dependencies to assemble

Open
#34,963 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type: enhancement
Dominant language
Java
Stars
81.5k
Forks
42.7k
Avg merge
2d 4h
Merged PRs (30d)
65

Description

This issue is follow-on from https://github.com/spring-projects/spring-boot/issues/34812. Our bootArchives configuration is very similar to Gradle's archives configuration. Following some advice from @jvandort, we've learned that Gradle is moving away from archives:

However, the important thing to note here is that the purpose of archives is not for it to be selected with attribute matching. We have specialized configurations for selecting specific artifacts: runtimeElements and apiElements in a java project, to name a few. archives is currently used a generic “bag of artifacts” which are to be built when the assemble task is executed. We are migrating away from the archives configuration by instead adding task dependencies directly to the assemble task instead of using the archives configuration as a middle-man. The reasoning for this is that we never intended archives to participate in dependency-resolution.

We should do the same. We'll probably need to figure out how to do that in a backwards-compatible manner as I suspect that removing bootArchives without first deprecating it may cause problems for some users.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the bootArchives configuration and the assemble task, using issue #34812 for the prior context. Determine how task dependencies can replace the configuration while preserving compatibility, including whether bootArchives must be deprecated before removal; done means the migration path is defined without breaking users.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.