Update minor versions of dependencies stored in properties

855 views Asked by At

I'm trying to use maven to update to latest minor versions using maven-versions-plugin. The goal use-latest-versions has a flag allowMajorUpdates. But this will set the versions directly in the dependency.

mvn versions:use-latest-versions -DallowMajorUpdates=false

Where I'm located they store version numbers in the properties section of the pom.xml. And they want to keep it that way.

<properties>
    <!-- This should be updated to 1.3, even if 2.0 exists -->
    <an-app-version>1.2</an-app-version>
</properties>
<dependencies>
    <dependency>
        <groupId>com.example</groupId>
        <artifactId>an-app</artifactId>
        <version>${an-app-version}</version>
    </dependency>
</dependencies>

The update-properties goal updates the properties like I want, but I don't want to allow major updates.

mvn versions:update-properties

I'm using maven 3.3.9. Any suggestions?

0

There are 0 answers