feat: 'self-contained' builds for Maven plugins
Metadata
Current evaluation
Merged via squash after passing all CI checks and receiving two approvals. Introduces a self-contained build attribute for Maven plugins that forces rewriting Maven source versions from backstage artifacts and enables automatic backstage artifact discovery.
Suggested action: —
No scores available.
Issue body
This commit introduces the "self-contained" build-attribute. This introduction only applies to Maven-based ("maven" and "maven-use") plugins for now, and when enabled causes the plugins to *always* rewrite the required version of Maven sources based on those artifacts available in the backstage (produced by maven-use parts) and in /usr/share/maven-repo (produced by Maven-related archive packages).
A side effect of this is that Maven builds now *always* discovers artifacts in the backstage. This is desirable as a default behavior anyway, as the expectation is that parts will consume from the shared "stage" (and now also the backstage) when building. Note that if the build isn't self-contained, the discovery of the artifacts in the backstage doesn't mean that they said artifacts *will* be used, just that they *can* be used.
- [ ] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
- [ ] Have you added an entry to the changelog (`docs/reference/changelog.rst`)?
-----
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Merged via squash after passing all CI checks and receiving two approvals. Introduces a self-contained build attribute for Maven plugins that forces rewriting Maven source versions from backstage artifacts and enables automatic backstage artifact discovery. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged squashed PR adding a self-contained build attribute for Maven plugins. It rewrites Maven source versions using backstage artifacts and enforces backstage discovery during builds, standardizing shared stage consumption for Maven-based plugins. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1148 feat: Plugin-constrained build-attributes | craft-parts | merged | Merged. Adds plugin-constrained build-attributes to craft-parts, requiring explicit plugin support. Currently implements the 'self-contained' attribute for maven and maven-use plugins. Approved and passed all CI checks. | |
| #1163 feat(maven-use): consume binaries directly | craft-parts | merged | Merged a squashed commit enabling the maven-use plugin to directly consume pre-built Maven artifacts as sources when a maven-use directory exists. Approved by three reviewers, passed all CI checks, and includes integration tests. |