Here is my pom.xml:

1. mvn versions:update-properties  works fine , the properties updated
2. mvn versions:use-next-snapshots  not work

[INFO] --- versions-maven-plugin:2.8.1:use-next-snapshots (default-cli) @
test-mymvnversion ---
[INFO] Incremental version changes allowed
[INFO] Ignoring reactor dependency:
com.***.example:submodtest:jar:1.1.1-SNAPSHOT
[INFO] Ignoring com.***.example:afeaturemod:jar:[1.3.0] as the version
number is too short
[INFO] Incremental version changes allowed

How to update the property for next snapshots?



ref:
https://www.mojohaus.org/versions-maven-plugin/examples/update-properties.html

afeaturemod.version had updated to 1.3.1-SNAPSHOT already.


if I use:

 <dependency>

    <groupId>com.panda.example</groupId>
    <artifactId>afeaturemod</artifactId>
    <version>1.3.0</version>
</dependency>


It works fine.


my current pom.xml

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"; xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="
http://maven.apache.org/POM/4.0.0
https://maven.apache.org/xsd/maven-4.0.0.xsd";>
    <modelVersion>4.0.0</modelVersion>
    <packaging>pom</packaging>

    <parent>
        <groupId>com.panda.example</groupId>
        <artifactId>example-root-pom</artifactId>
        <version>1.0.0-SNAPSHOT</version>
    </parent>

    <groupId>com.panda.example</groupId>

    <artifactId>test-mymvnversion</artifactId>
    <version>1.1.1-SNAPSHOT</version>
    <name>test-mymvnversion</name>


    <modules>
        <module>submodtest</module>
    </modules>


    <properties>
        <afeaturemod.version>1.3.0</afeaturemod.version>
    </properties>

    <dependencyManagement>

        <dependencies>

            <dependency>
                <groupId>com.panda.example</groupId>
                <artifactId>submodtest</artifactId>
                <version>${project.version}</version>
            </dependency>


            <dependency>
                <groupId>com.panda.example</groupId>
                <artifactId>afeaturemod</artifactId>
                <version>[${afeaturemod.version}]</version>
            </dependency>


        </dependencies>
    </dependencyManagement>

</project>

Reply via email to