I'm trying to use the maven versions plugin's "use-releases" goal to update 
-SNAPSHOT references to release references when release versions exist.

I've had success in doing this in cases where the version is defined directly 
within the dependency.  For example, it successfully changes


        <dependency>
            <groupId>my-group-id</groupId>
            <artifactId>my-artifact-id</artifactId>
            <version>1.6-SNAPSHOT</version>
        </dependency>
to


        <dependency>
            <groupId>my-group-id</groupId>
            <artifactId>my-artifact-id</artifactId>
            <version>1.6</version>
        </dependency>

However, if the dependency references a property, 


        <dependency>
            <groupId>my-group-id</groupId>
            <artifactId>my-artifact-id</artifactId>
            <version>${my.version}</version>
        </dependency>

        <properties>
            <my.version>1.6-SNAPSHOT</my.version>
        </properties>

it doesn't change the property value and leaves it at 1-6-SNAPSHOT.

I messed around with the "update-properties" goal a bit, but that doesn't seem 
like what I'm looking for since it's changing things to the most recent 
versions whereas I just want to move from snapshot to release.  But I'd like 
one goal to run that would do this in properties as well as versions referenced 
directly in the dependency section.

I'm relatively new to maven, so if I need to think about this differently, 
please let me know.

Thanks,
Mike

Reply via email to