No I am definitely looking for use-latest-releases. Assume that I am using something like slf4j-api, at a particular release level. I want to automatically upgrade as they fix bugs. But I do not want to automatically upgrade to a release that is backwards incompatible. Thus I want to define the range of acceptable releases.

If I was current dependent on:
<dependency>
    <groupId>org.slf4j</groupId>
    <artifactId>slf4j-api</artifactId>
    <version>1.6.3</version>
</dependency>

I might know that when this project makes backward incompatible changes they bump their minor number. So I would not want to upgrade to version 1.7.x automatically. Hence I would set my configuration to use the version range [1.6,1.7). That would mean everything starting at 1.6 and ending just before 1.7. My current version (1.6.3) would fit in this range. But if you check online there are also release versions: 1.6.4, 1.6.5, 1.6.6, 1.7.0, 1.7.1, 1.7.2, 1.7.3, 1.7.4, 1.7.5. Without a version range the use-latest-release would take me up to 1.7.5. But I do not want to upgrade to a 1.7.x version. I want to upgrade to a 1.6.x version, specifically I want it to upgrade to 1.6.6.

On 10/15/2013 11:43 AM, Arnout Engelen wrote:
Hi Mike,

Sorry for reply'ing in private, but the mailinglist software is giving me a hard time. Feel free to reply in public.

Are you sure you're looking for 'use-latest-releases' and not 'use-latest-versions'? I always get confused about those, but luckily http://mojo.codehaus.org/versions-maven-plugin/examples/advancing-dependency-versions.html shows the difference well.

I'm not sure I understand the description of your problem entirely, but wouldn't your concern be resolved by simply setting the 'allowMajorUpdates' option to 'false'? Or do you specifically need per-dependency control?


Kind regards,

Arnout


On Sun, Oct 6, 2013 at 6:19 AM, Mike Power <mpo...@alumni.calpoly.edu <mailto:mpo...@alumni.calpoly.edu>> wrote:

    I would like to take away some of the maintenance it comes with
    upgrading dependencies.  The use-latest-releases goal of the
    versions plugin looks almost ideal.  The problem I see is that
    often dependencies will have major minor and incremental version.
     A change in a major version would tend to indicate a change in
    the interfaces provided by the dependency that is not backwards
    compatible.  I want to be able to update a dependency to the
    latest release version in a specific range.  That way I could
    configure the build so that it will always update for minor and
    incremental changes but it will not update for major changes.
    Since these changes would generally be backward compatible this
    could be automated to upgrade a dependency every new release.

    I imagine this kind of thing would be configured like:
                    <plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>versions-maven-plugin</artifactId>
                        <version>2.1</version>
                        <configuration>
                            <dependency>
    <groupId>org.mockito</groupId>
    <artifactId>mockito-all</artifactId>
                                <version>[1.9, 2)</version>
                            </dependency>
                            <dependency>
    <groupId>org.powermock</groupId>
                                <version>[1.4, 1.5)</version>
                            </dependency>
                            <dependency>
    <artifactId>ftpserver-core</artifactId>
                                <version>[1.0, 2]</version>
                            </dependency>
                        </configuration>
                    </plugin>


    Thoughts?

-- Michael Power


    ---------------------------------------------------------------------
    To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email




Reply via email to