logo
down
shadow

Maven: pin dependency version where dependency is managed by a BOM


Maven: pin dependency version where dependency is managed by a BOM

By : Lamine Loco
Date : November 21 2020, 03:00 PM
this one helps. Forgot about this question! In the end I could never find a way to pin the managed versions which were based on ranges. So I did stop defining the versions in the BOM and just specified them with ranges in each child pom. More boilerplate in the child poms, but not that bad.
We were still able to define properties that specified the ranges in the BOM which the children could use, making it a bit easier to bump all the ranges all when necessary.
code :


Share : facebook icon twitter icon
Maven dependency version mismatch issue - resolving outdated version of dependency from repo

Maven dependency version mismatch issue - resolving outdated version of dependency from repo


By : Pedro Lazaro
Date : March 29 2020, 07:55 AM
it fixes the issue There are two possible solutions that I found for this issue:
The first one is to specify an exact version requirement, or "hard requirement" for a specific version of a dependency, as shown below:
code :
<version>[1.5]</version>
<version>1.5</version>
Maven dependency Conflict - Trouble with understanding version managed from 2.6.0

Maven dependency Conflict - Trouble with understanding version managed from 2.6.0


By : nulldozer
Date : March 29 2020, 07:55 AM
this will help during compilation of x.platform.y.z:domain-crypto, 2.6.0 will be present and your source will be compiled against that
during compilation of x.platform.y.z:domain-processorclient, 1.1 will be present and your source will be compiled against that
maven dependency:tree log: version1 compile (version managed from version2)

maven dependency:tree log: version1 compile (version managed from version2)


By : Ishanka Madhuranga
Date : March 29 2020, 07:55 AM
should help you out Either the pom for module B or the parent pom for module B includes a section. Dependency management is used in maven to centralize the versions used for jars. It is likely overriding the version of solr-solrj you defined to be version 5.5.3. Dependency management functions in two main ways. You are probably experiencing what is described in section 2. Please see the conclusion for a summary specific to your question.
1. It is a central place for defining versions of dependencies.
code :
<dependencyManagement>
  <dependencies>
    <dependency>
      <groupId>com.mememe</groupId>
      <artifactId>mylib</artifactId>
      <version>1.1.12</version>
    </dependency>
  </dependencies>
</dependencyManagement>
<dependencies>
  <dependency>
    <groupId>com.mememe</groupId>
    <artifactId>mylib</artifactId>
  </dependency>
</dependencies>
<dependency>
  <groupId>com.youyou</groupId>
  <artifactId>yourlib</artifactId>
  <version>3.0.0</version>
</dependency>
<dependency>
  <groupId>com.morestuff</groupId>
  <artifactId>morelib</artifactId>
  <version>2.0.0</version>
</dependency>
<dependencyManagement>
  <dependencies>
    <dependency>
      <groupId>com.morestuff</groupId>
      <artifactId>morelib</artifactId>
      <version>2.5.2</version>
    </dependency>
  </dependencies>
</dependencyManagement>
<dependency>
  <groupId>com.youyou</groupId>
  <artifactId>yourlib</artifactId>
  <version>3.0.0</version>
</dependency>
<dependencyManagement>
  <dependencies>
    <dependency>
      <groupId>org.apache.solr</groupId>
      <artifactId>solr-solrj</artifactId>
      <version>5.5.3</version>
    </dependency>
  </dependencies>
</dependencyManagement>
Overriding managed version json maven dependency

Overriding managed version json maven dependency


By : root
Date : March 29 2020, 07:55 AM
hope this fix your issue To override the org.json dependency managed by Spring Boot simply add a json.version property instead of what you are trying now. (See alsothis section of the Spring Boot reference guide).
code :
<properties>
    <json.version>20180130</json.version>
</properties>
<dependencies>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-mail</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-activemq</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-security</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-test</artifactId>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>com.ibm.icu</groupId>
        <artifactId>icu4j</artifactId>
        <version>3.4.4</version>
    </dependency>
    <dependency>
        <groupId>org.apache.poi</groupId>
        <artifactId>poi-excelant</artifactId>
        <version>3.14</version>
    </dependency>
    <dependency>
        <groupId>commons-fileupload</groupId>
        <artifactId>commons-fileupload</artifactId>
        <version>1.3</version>
    </dependency>
    <dependency>
        <groupId>org.apache.httpcomponents</groupId>
        <artifactId>httpclient</artifactId>
        <version>4.4</version>
    </dependency>
    <dependency>
        <groupId>javax.annotation</groupId>
        <artifactId>javax.annotation-api</artifactId>
        <version>1.2</version>
    </dependency>
    <dependency>
        <groupId>com.itextpdf</groupId>
        <artifactId>itextpdf</artifactId>
        <version>5.0.6</version>
    </dependency>
    <dependency>
        <groupId>com.opencsv</groupId>
        <artifactId>opencsv</artifactId>
        <version>3.8</version>
    </dependency>
    <dependency>
        <groupId>commons-httpclient</groupId>
        <artifactId>commons-httpclient</artifactId>
        <version>3.1</version>
    </dependency>
    <dependency>
        <groupId>org.apache.poi</groupId>
        <artifactId>poi-ooxml-schemas</artifactId>
        <version>3.11</version>
    </dependency>
    <dependency>
        <groupId>org.apache.poi</groupId>
        <artifactId>poi-scratchpad</artifactId>
        <version>3.2-FINAL</version>
    </dependency>
    <dependency>
        <groupId>com.google.code.gson</groupId>
        <artifactId>gson</artifactId>
        <version>2.8.0</version>
    </dependency>
    <dependency>
        <groupId>org.apache.xmlbeans</groupId>
        <artifactId>xmlbeans</artifactId>
        <version>2.6.0</version>
    </dependency>
    <dependency>
        <groupId>jstl</groupId>
        <artifactId>jstl</artifactId>
        <version>1.2</version>
    </dependency>
    <dependency>
        <groupId>com.sun.jersey</groupId>
        <artifactId>jersey-bundle</artifactId>
        <version>1.19.1</version>
    </dependency>
    <dependency>
        <groupId>org.scribe</groupId>
        <artifactId>scribe</artifactId>
        <version>1.3.7</version>
    </dependency>
    <dependency>
        <groupId>com.squareup.retrofit2</groupId>
        <artifactId>retrofit</artifactId>
        <version>2.4.0</version>
    </dependency>
    <dependency>
        <groupId>com.squareup.retrofit2</groupId>
        <artifactId>converter-jackson</artifactId>
        <version>2.4.0</version>            
    </dependency>
    <dependency>
        <groupId>com.squareup.okhttp3</groupId>
        <artifactId>logging-interceptor</artifactId>
        <version>3.10.0</version>
    </dependency>
    <dependency>
        <groupId>io.springfox</groupId>
        <artifactId>springfox-swagger-ui</artifactId>
        <version>2.8.0</version>
        <scope>compile</scope>
    </dependency>
    <dependency>
        <groupId>io.springfox</groupId>
        <artifactId>springfox-swagger2</artifactId>
        <version>2.8.0</version>
    </dependency>
    <dependency>
        <groupId>mysql</groupId>
        <artifactId>mysql-connector-java</artifactId>
        <version>5.1.6</version>
    </dependency>
    <dependency>
        <groupId>com.fasterxml.jackson.dataformat</groupId>
        <artifactId>jackson-dataformat-xml</artifactId>
    </dependency>
    <dependency>
        <groupId>javax</groupId>
        <artifactId>javaee-api</artifactId>
        <version>6.0</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>jsp-api</artifactId>
        <version>2.0</version>
        <scope>provided</scope>
    </dependency>
</dependencies>
maven dependency tree - version managed

maven dependency tree - version managed


By : user5206460
Date : March 29 2020, 07:55 AM
I hope this helps . In my project I see the following when issuing mvn dependency:tree -Dverbose: , Yes, your understanding is correct.
shadow
Privacy Policy - Terms - Contact Us © voile276.org