maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tomo Suzuki <suzt...@google.com.INVALID>
Subject Re: Company-wide pom and dependency management best practices
Date Tue, 06 Aug 2019 14:40:35 GMT
Hi Nick,

> I see where the different versions for a dependency are coming from?

I use "mvn dependency:tree -Dverbose=true" to get the detail of tree. It
shows unselected nodes.

> how can I make sure that the dependencies in the Spring Boot import take
preference over the other dependency imports

I would also take your approach of "a dependency management pom" (BOM, bill
of materials) to control transitive dependencies.
https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Dependency_Management


On Tue, Aug 6, 2019 at 10:31 AM Nick Stolwijk <nick.stolwijk@gmail.com>
wrote:

> Hi all,
>
> We have a company-wide pom for specific applications. In our case for
> Spring Boot applications. In this pom some of the stuff is for the build
> (plugin management, deployment management) and some for the dependencies
> (scope import for dependencyManagement).
>
> We had a buildproblem where one of the Spring Boot dependencies had the
> wrong version. It turned out the version of one of the dependencies for
> Spring Boot was overridden by another dependencyManagement import.
>
> The first question is, how can I see where the different versions for a
> dependency are coming from? I know of the dependency:tree, but that only
> shows the resolved version and not all the version options.
>
> The second question is, how can I make sure that the dependencies in the
> Spring Boot import take preference over the other dependency imports. My
> idea is to break apart the Spring Boot parent we have into a build pom and
> a dependency management pom and require that every application import the
> dependency import pom as first dependency under dependency management.
> Would this work or am I missing something?
>
> Is there any documentation about the best practices for inheriting build
> configuration and dependency management?
>
> With regards,
>
> Nick Stolwijk
>
> ~~~ Try to leave this world a little better than you found it and, when
> your turn comes to die, you can die happy in feeling that at any rate you
> have not wasted your time but have done your best ~~~
>
> Lord Baden-Powell
>


-- 
Regards,
Tomo

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message