Skip to content

Add support for property defined version update in the goal use-dep-version #474

Closed
@amalakar

Description

I noticed that currently use-dep-version works only when the version is defined inline, as in the following works:

mvn versions:use-dep-version  -DdepVersion=2.3.1 '-Dincludes=javax.xml.bind:jaxb-api'
--- a/example/pom.xml
+++ b/example/pom.xml
@@ -80,7 +80,7 @@
         <dependency>
             <groupId>javax.xml.bind</groupId>
             <artifactId>jaxb-api</artifactId>
-            <version>2.3.0</version>
+            <version>2.3.1</version>
         </dependency>

But the following property defined version doesn't get updated:

    <properties>
      <jaxb.version>2.3.0</jaxb.version>
    </properties>

        <dependency>
            <groupId>javax.xml.bind</groupId>
            <artifactId>jaxb-api</artifactId>
            <version>${jaxb.version}</version>
        </dependency>

This is a feature request to make use-dep-version work for property defined dependencies too.

Use case: we have many internal repositories which depends on few internal common libraries, sometimes we would want to update all of those repos to the latest version of the common libraries for bugs/security issues etc. But the downstream maven projects sometimes would have the version defined as a property or sometimes as inline version. If one command could handle both cases we could easily update all the repos to the target version.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions