Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-6564

Lack of ability to overwrite properties of specified dependencies

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.3.9
    • None
    • Dependencies
    • None

    Description

      For example, if I want to update the flyway version to 4.2.0 in spring boot 1.5 (by default Flyway 3.2.1) I want to do something like this: 

      <properties>
        <flyway.version>4.2.0</flyway.version>
        <springboot.version>1.5.17.RELEASE</springboot.version>
      </properties>
      
      <dependencyManagement>
        <dependencies>
          <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-dependencies</artifactId>
            <version>${springboot.version}</version>
            <type>pom</type>
            <scope>import</scope>
          </dependency>
        <dependencies>
      </dependencyManagement>
      

      The flyway dependency is already defined in the dependency management of spring-boot-dependencies:

      <dependency>
        <groupId>org.flywaydb</groupId>
        <artifactId>flyway-core</artifactId>
        <version>${flyway.version}</version>
      </dependency>
      

      But that same pom also defines flyway.version to be 3.2.1. When I include the flyway dependency in my own dependency management, my application does correctly use Flyway 4.2.0, but if I only provide the property, it incorrectly uses version 3.2.1, meaning that my property was ignored. I have heard from others that you can forcefully override a property by using a commandline parameter or an environment variable, but I would prefer to use a property in my pom file instead.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              rikschaaf Rik Schaaf
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated: