On 24/01/2025 13:47, Guillaume Nodet wrote:
> Le ven. 24 janv. 2025 à 11:25, Mark Raynsford <
>> Are there details somewhere on the dependency "inference"?
>>
> 
> This goes back to https://issues.apache.org/jira/browse/MNG-6656
> To summarize (and it has changed since the original commit), if your pom
> uses model 4.1.0, for each dependency that has no version directly
> specified,
> Maven will look in the whole project (from the root project and all child
> subprojects)
> for a matching groupId:artifactId.  If there's only one, it will use that
> version.
> So you don't have to manage that version in the root pom as it's usually
> done.
> The groupId can also be inferred, so you can only specify the artifactId.

Sounds like it'll be useful for cutting out a lot of this kind of thing:

https://github.com/io7m-com/cedarbridge/blob/539d68ba110157c4822d9802cdce200cca507488/com.io7m.cedarbridge.tests/pom.xml#L31

It's a "tests" module that has a dependency on all of the other modules
within the project.

-- 
Mark Raynsford | https://www.io7m.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org

Reply via email to