Howdy

Did you check the gist i posted earlier? It already solves it (by tweaking
deps, and making compress-core depend on compress, similar pattern that
hamcrest did)

T

On Sat, Oct 11, 2025, 14:47 Vladimir Sitnikov <[email protected]>
wrote:

> Thanks Tamas, Piotr.
>
> I indeed oversimplified the example, so it resulted in an
> accidental "nearest wins" case. Can we put it aside for now?
>
> I've updated the example so the maven4 project depends on
> commons-compress:1.0.0 and commons-compress-tar:2.0.0 **indirectly**.
> In other words, the case is as Piotr suggests: the application uses two
> independent libraries which in turn depend on 1.0.0 and 2.0.0 versions of
> the commons-compress library.
>
> Tamas: "goal to solve" is to make Maven converge to 2.0.0. Does that sound
> clear to you?
>
> See the updated example: [1]
>
> The outcome does not change though. Maven 4.0.0-rc-4 still ends up with
> both commons-compress:1.0.0 and commons-compress-core:2.0.0
> on the same classpath.
>
> [1]
>
> https://github.com/vlsi/jarsplit/blob/db6d1f264d2451442ec7275a013da068dbe81e93/lib-user-maven4/pom.xml
>
> Vladimir
>

Reply via email to