apache / apache/maven

[MNG-6564] Lack of ability to overwrite properties of specified dependencies

Open
#8,681 7 comments 0 reactions 0 assignees View on GitHub
enhancement priority:major
Dominant language
Java
Stars
5.3k
Forks
3.1k
Avg merge
20h 42m
Merged PRs (30d)
297

Description

**[Rik Schaaf](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=rikschaaf)** opened **[MNG-6564](https://issues.apache.org/jira/browse/MNG-6564?redirect=false)** and commented

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: 

```xml

  4.2.0
1.5.17.RELEASE

 
   
      org.springframework.boot
      spring-boot-dependencies
      ${springboot.version}
      pom
      import
   
 

```

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

```xml

org.flywaydb
flyway-core
${flyway.version}

```

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.

---

**Affects:** 3.3.9

**Issue Links:**
- [MNG-5982](https://issues.apache.org/jira/browse/MNG-5982) The POM for ... is invalid, transitive dependencies ... while property was overriden

- [MNG-7417](https://issues.apache.org/jira/browse/MNG-7417) Several classes do not set properties properly for building requests

0 votes, 6 watchers

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.