Skip to content

feat: align added dependencies with project conventions #11

@gnodet

Description

@gnodet

Summary

When promoting a transitive dependency to declared via pilot:dependencies, the added <dependency> should follow the project's existing conventions — just like maven-dependency-plugin#1599 does with its -Dalign feature.

Claude Code on behalf of Guillaume Nodet

Current Behavior

addTransitive() adds a full GAV <dependency> entry regardless of how the project manages its dependencies.

Desired Behavior

Detect and follow the project's conventions:

  • Managed deps: if most existing deps are version-less (delegated to <dependencyManagement>), add managed entry + version-less dep
  • Version properties: if most versions use ${...}, create a version property
  • Property naming: follow the dominant pattern (.version, -version, Version, version. prefix)

Dependencies

Blocked on maveniverse/domtrip#170 — convention-aligned dependency addition in PomEditor. Once domtrip 1.1.0 is released with addAligned(), bump the dependency and wire it up in DependenciesTui.addTransitive().

Scope

  • Update addTransitive() in DependenciesTui to use PomEditor.dependencies().addAligned()
  • Update tests to cover convention-aligned additions

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions