Something seems very wrong here

On Thursday, 15 December 2016, Christian Schulte <[email protected]> wrote:

> Am 12/15/16 um 09:16 schrieb Christian Schulte:
> > Am 12/15/16 um 07:53 schrieb Stephen Connolly:
> >> That may be at odds with the code and docs but it is the only think that
> >> makes sense to me, depMgmt is about managing dependencies... the bit you
> >> want to manage is versions and exclusions, everything else is just the
> >> matching as I see it
> >
> > Maven core and the resolver handle this differently. In the core, only
> > the elements from dependency management are copied to the dependencies,
> > not overridden or provided at dependency level. In the resolver, all
> > elements of a dependency get overridden by the management information,
> > regardless of what has been in the model.
>
> <dependencyManagement>
>   <dependencies>
>     <dependency>
>       <groupId>GID</groupId>
>       <artifactId>AID</artifactId>
>       <version>1</version>
>       <scope>test</scope>
>     </dependency>
>   </dependencies>
> </dependencyManagement>
>
> <dependency>
>   <groupId>GID</groupId>
>   <artifactId>AID</artifactId>
> </dependency>
>
> ModelBuilder: Will copy scope and version to the dependency. No scope
> means default scope (compile). If this is the intended scope, it needs
> to be overridden explicitly for the ModelBuilder to not copy the scope
> from the managenent. Same for the version. Like so:
>
>
> <dependency>
>   <groupId>GID</groupId>
>   <artifactId>AID</artifactId>
>   <scope>compile</scope>
> </dependency>
>
> The resolver will still manage the scope to 'test' on that dependency.
> Same for the version. If that dependency would have a <version>, the
> ModelBuilder would not apply the managed version, the resolver would.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected] <javascript:;>
> For additional commands, e-mail: [email protected] <javascript:;>
>
>

-- 
Sent from my phone

Reply via email to