Howdy,

As you say and quote the spec:
"Soft requirement for 1.0. Use 1.0 if no other version appears earlier
in the dependency tree."

For direct dependency there CANNOT be per definitionem "earlier
version in the tree".

But I am open for discussion...

T

On Thu, Oct 23, 2025 at 12:08 PM Vladimir Sitnikov
<[email protected]> wrote:
>
> >I am a member of a school that teaches that a tool should never
> >override user input :)
>
> Franky, I think there should be a specification, and the tool should follow
> the specification
> rather than try figuring out the intention of the end-user.
>
> The current specification for dependency declaration is as follows:
> https://maven.apache.org/pom.html#Dependency_Version_Requirement_Specification
>
> > 1.0: Soft requirement for 1.0. Use 1.0 if no other version appears
> earlier in the dependency tree.
>
> Apparently, selectionStrategy=highest skipper=versioned changes the behavior
> for "1.0 soft requirement" as "if no other version appears earlier in the
> dependency tree" becomes invalid.
>
> That means "selectionStrategy=highest skipper=versioned" should have its
> own specified behavior.
>
> >In other words, IF a user has a POM that states dep 1.1 (so is a
> > direct dependency)
>
> To my best knowledge, the POM specification says nothing regarding "direct
> dependency".
>
> At the same time, there's "[1.0]: Hard requirement for 1.0. Use 1.0 and
> only 1.0."
> So I would accept if Maven resolves to 1.0 if the user configures
> <version>[1.0]</version>,
> however I do not see reasons to treat <version>1.0</version> as if it was
> "user enforces the exact 1.0 version".
>
> How does the tool distinguish "user intentionally wants to enforce the
> version" from "user adds a soft version requirement"?
> 1.0 is described as a "soft requirement" in the first place.
> The specification should go the first, not the tool.
>
> WDYT?
>
> Vladimir

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to