You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Rodrigo Gonçalves <rm...@criticalsoftware.com> on 2007/07/30 17:02:00 UTC

latest non-snapshot dependency

Hi...

In my poms I have some plugins configured without the version in order 
to use the latest one, but in my settings.xml file I need to have some 
snapshot-repositories.
So in the builds maven will use the latest version available witch is a 
snapshot version, and that is not my intension.
Is there any way to specify maven to use the latest non-snapshot version 
of a dependency?


Thx in advance...
Rodrigo.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: latest non-snapshot dependency

Posted by Stuart McCulloch <st...@jayway.net>.
On 31/07/07, Wayne Fay <wa...@gmail.com> wrote:
> As far as I understand it, this works fine so long as you are only
> connecting to non-snapshot repos.
>
> As Rodrigo mentioned, he has snapshot repos configured in his pom, and
> as such the RELEASE tag will not work as desired.

ah, ok - good to know

>
> Wayne
>
> On 7/30/07, Stuart McCulloch <st...@jayway.net> wrote:
> > On 30/07/07, Wayne Fay <wa...@gmail.com> wrote:
> > > To answer your original question, it is not currently possible to tell
> > > Maven to use the latest non-snapshot of a dependency. Something along
> > > these lines has been under discussion on the Dev list in the last
> > > month, though.
> >
> > that's weird, we've been happily using RELEASE to track the latest
> > version of our helper plugins for a while and it appears to pick the
> > right version each time (luck? chance?)
> >
> > >
> > > Your best bet is to simply specify the exact version you want, or
> > > remove the snapshot repos from your pom.
> > >
> > > Wayne
> > >
> > > On 7/30/07, Rodrigo Gonçalves <rm...@criticalsoftware.com> wrote:
> > > > Hi Stuart !
> > > >
> > > > Thx for your response...
> > > >
> > > > I've tried to use your suggestion but it does not work for every
> > > > artifacts. For example:
> > > > when I use:
> > > >
> > > >            <plugin>
> > > >                <groupId>org.apache.maven.plugins</groupId>
> > > >                <artifactId>maven-release-plugin</artifactId>
> > > >                <version>RELEASE</version>
> > > >                <configuration>
> > > >                       ...
> > > >                </configuration>
> > > >            </plugin>
> > > >
> > > > Maven tries to download version 2.0-beta-5-SNAPSHOT
> > > > "org.apache.maven.plugins:maven-release-plugin:pom:2.0-beta-5-20070426.100207-13"
> > > >
> > > > I don't know if it's relevant but I'm using a Maven 2 enterprise
> > > > repository (artifactory).
> > > >
> > > > Regards,
> > > > Rodrigo.
> > > >
> > > >
> > > > Stuart McCulloch wrote:
> > > > > On 30/07/07, Rodrigo Gonçalves <rm...@criticalsoftware.com> wrote:
> > > > >
> > > > >> Hi...
> > > > >>
> > > > >> In my poms I have some plugins configured without the version in order
> > > > >> to use the latest one, but in my settings.xml file I need to have some
> > > > >> snapshot-repositories.
> > > > >> So in the builds maven will use the latest version available witch is a
> > > > >> snapshot version, and that is not my intension.
> > > > >> Is there any way to specify maven to use the latest non-snapshot version
> > > > >> of a dependency?
> > > > >>
> > > > >
> > > > > have you tried using a meta-version, such as:
> > > > >
> > > > >     <version>RELEASE</version>
> > > > >
> > > > > that shouldn't match against any snapshots.
> > > > >
> > > > >
> > > > >> Thx in advance...
> > > > >> Rodrigo.
> > > > >>
> > > > >> ---------------------------------------------------------------------
> > > > >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > > >> For additional commands, e-mail: users-help@maven.apache.org
> > > > >>
> > > > >>
> > > > >>
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > > For additional commands, e-mail: users-help@maven.apache.org
> > > >
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> > >
> >
> >
> > --
> > Cheers, Stuart
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
Cheers, Stuart

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: latest non-snapshot dependency

Posted by Wayne Fay <wa...@gmail.com>.
As far as I understand it, this works fine so long as you are only
connecting to non-snapshot repos.

As Rodrigo mentioned, he has snapshot repos configured in his pom, and
as such the RELEASE tag will not work as desired.

Wayne

On 7/30/07, Stuart McCulloch <st...@jayway.net> wrote:
> On 30/07/07, Wayne Fay <wa...@gmail.com> wrote:
> > To answer your original question, it is not currently possible to tell
> > Maven to use the latest non-snapshot of a dependency. Something along
> > these lines has been under discussion on the Dev list in the last
> > month, though.
>
> that's weird, we've been happily using RELEASE to track the latest
> version of our helper plugins for a while and it appears to pick the
> right version each time (luck? chance?)
>
> >
> > Your best bet is to simply specify the exact version you want, or
> > remove the snapshot repos from your pom.
> >
> > Wayne
> >
> > On 7/30/07, Rodrigo Gonçalves <rm...@criticalsoftware.com> wrote:
> > > Hi Stuart !
> > >
> > > Thx for your response...
> > >
> > > I've tried to use your suggestion but it does not work for every
> > > artifacts. For example:
> > > when I use:
> > >
> > >            <plugin>
> > >                <groupId>org.apache.maven.plugins</groupId>
> > >                <artifactId>maven-release-plugin</artifactId>
> > >                <version>RELEASE</version>
> > >                <configuration>
> > >                       ...
> > >                </configuration>
> > >            </plugin>
> > >
> > > Maven tries to download version 2.0-beta-5-SNAPSHOT
> > > "org.apache.maven.plugins:maven-release-plugin:pom:2.0-beta-5-20070426.100207-13"
> > >
> > > I don't know if it's relevant but I'm using a Maven 2 enterprise
> > > repository (artifactory).
> > >
> > > Regards,
> > > Rodrigo.
> > >
> > >
> > > Stuart McCulloch wrote:
> > > > On 30/07/07, Rodrigo Gonçalves <rm...@criticalsoftware.com> wrote:
> > > >
> > > >> Hi...
> > > >>
> > > >> In my poms I have some plugins configured without the version in order
> > > >> to use the latest one, but in my settings.xml file I need to have some
> > > >> snapshot-repositories.
> > > >> So in the builds maven will use the latest version available witch is a
> > > >> snapshot version, and that is not my intension.
> > > >> Is there any way to specify maven to use the latest non-snapshot version
> > > >> of a dependency?
> > > >>
> > > >
> > > > have you tried using a meta-version, such as:
> > > >
> > > >     <version>RELEASE</version>
> > > >
> > > > that shouldn't match against any snapshots.
> > > >
> > > >
> > > >> Thx in advance...
> > > >> Rodrigo.
> > > >>
> > > >> ---------------------------------------------------------------------
> > > >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > >> For additional commands, e-mail: users-help@maven.apache.org
> > > >>
> > > >>
> > > >>
> > > >
> > > >
> > > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
>
> --
> Cheers, Stuart
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: latest non-snapshot dependency

Posted by Stuart McCulloch <st...@jayway.net>.
On 30/07/07, Wayne Fay <wa...@gmail.com> wrote:
> To answer your original question, it is not currently possible to tell
> Maven to use the latest non-snapshot of a dependency. Something along
> these lines has been under discussion on the Dev list in the last
> month, though.

that's weird, we've been happily using RELEASE to track the latest
version of our helper plugins for a while and it appears to pick the
right version each time (luck? chance?)

>
> Your best bet is to simply specify the exact version you want, or
> remove the snapshot repos from your pom.
>
> Wayne
>
> On 7/30/07, Rodrigo Gonçalves <rm...@criticalsoftware.com> wrote:
> > Hi Stuart !
> >
> > Thx for your response...
> >
> > I've tried to use your suggestion but it does not work for every
> > artifacts. For example:
> > when I use:
> >
> >            <plugin>
> >                <groupId>org.apache.maven.plugins</groupId>
> >                <artifactId>maven-release-plugin</artifactId>
> >                <version>RELEASE</version>
> >                <configuration>
> >                       ...
> >                </configuration>
> >            </plugin>
> >
> > Maven tries to download version 2.0-beta-5-SNAPSHOT
> > "org.apache.maven.plugins:maven-release-plugin:pom:2.0-beta-5-20070426.100207-13"
> >
> > I don't know if it's relevant but I'm using a Maven 2 enterprise
> > repository (artifactory).
> >
> > Regards,
> > Rodrigo.
> >
> >
> > Stuart McCulloch wrote:
> > > On 30/07/07, Rodrigo Gonçalves <rm...@criticalsoftware.com> wrote:
> > >
> > >> Hi...
> > >>
> > >> In my poms I have some plugins configured without the version in order
> > >> to use the latest one, but in my settings.xml file I need to have some
> > >> snapshot-repositories.
> > >> So in the builds maven will use the latest version available witch is a
> > >> snapshot version, and that is not my intension.
> > >> Is there any way to specify maven to use the latest non-snapshot version
> > >> of a dependency?
> > >>
> > >
> > > have you tried using a meta-version, such as:
> > >
> > >     <version>RELEASE</version>
> > >
> > > that shouldn't match against any snapshots.
> > >
> > >
> > >> Thx in advance...
> > >> Rodrigo.
> > >>
> > >> ---------------------------------------------------------------------
> > >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > >> For additional commands, e-mail: users-help@maven.apache.org
> > >>
> > >>
> > >>
> > >
> > >
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
Cheers, Stuart

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: latest non-snapshot dependency

Posted by Wayne Fay <wa...@gmail.com>.
To answer your original question, it is not currently possible to tell
Maven to use the latest non-snapshot of a dependency. Something along
these lines has been under discussion on the Dev list in the last
month, though.

Your best bet is to simply specify the exact version you want, or
remove the snapshot repos from your pom.

Wayne

On 7/30/07, Rodrigo Gonçalves <rm...@criticalsoftware.com> wrote:
> Hi Stuart !
>
> Thx for your response...
>
> I've tried to use your suggestion but it does not work for every
> artifacts. For example:
> when I use:
>
>            <plugin>
>                <groupId>org.apache.maven.plugins</groupId>
>                <artifactId>maven-release-plugin</artifactId>
>                <version>RELEASE</version>
>                <configuration>
>                       ...
>                </configuration>
>            </plugin>
>
> Maven tries to download version 2.0-beta-5-SNAPSHOT
> "org.apache.maven.plugins:maven-release-plugin:pom:2.0-beta-5-20070426.100207-13"
>
> I don't know if it's relevant but I'm using a Maven 2 enterprise
> repository (artifactory).
>
> Regards,
> Rodrigo.
>
>
> Stuart McCulloch wrote:
> > On 30/07/07, Rodrigo Gonçalves <rm...@criticalsoftware.com> wrote:
> >
> >> Hi...
> >>
> >> In my poms I have some plugins configured without the version in order
> >> to use the latest one, but in my settings.xml file I need to have some
> >> snapshot-repositories.
> >> So in the builds maven will use the latest version available witch is a
> >> snapshot version, and that is not my intension.
> >> Is there any way to specify maven to use the latest non-snapshot version
> >> of a dependency?
> >>
> >
> > have you tried using a meta-version, such as:
> >
> >     <version>RELEASE</version>
> >
> > that shouldn't match against any snapshots.
> >
> >
> >> Thx in advance...
> >> Rodrigo.
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >> For additional commands, e-mail: users-help@maven.apache.org
> >>
> >>
> >>
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: latest non-snapshot dependency

Posted by Stuart McCulloch <st...@jayway.net>.
On 30/07/07, Rodrigo Gonçalves <rm...@criticalsoftware.com> wrote:
> Hi Stuart !
>
> Thx for your response...
>
> I've tried to use your suggestion but it does not work for every
> artifacts. For example:
> when I use:
>
>             <plugin>
>                 <groupId>org.apache.maven.plugins</groupId>
>                 <artifactId>maven-release-plugin</artifactId>
>                 <version>RELEASE</version>
>                 <configuration>
>                        ...
>                 </configuration>
>             </plugin>
>
> Maven tries to download version 2.0-beta-5-SNAPSHOT
> "org.apache.maven.plugins:maven-release-plugin:pom:2.0-beta-5-20070426.100207-13"
>
> I don't know if it's relevant but I'm using a Maven 2 enterprise
> repository (artifactory).

could be another pom is using the plugin without a version

to find out you can use "mvn -X ..." to trace where the
snapshot dependency comes from during the build.

FYI, the best way to pass plugin versions to child projects is
by using a <pluginManagement>... section, as explained at:

    http://maven.apache.org/pom.html#plugin_management

lastly, check the maven-metadata.xml file on the server
just in case the release stanza has the wrong version

> Regards,
> Rodrigo.
>
>
> Stuart McCulloch wrote:
> > On 30/07/07, Rodrigo Gonçalves <rm...@criticalsoftware.com> wrote:
> >
> >> Hi...
> >>
> >> In my poms I have some plugins configured without the version in order
> >> to use the latest one, but in my settings.xml file I need to have some
> >> snapshot-repositories.
> >> So in the builds maven will use the latest version available witch is a
> >> snapshot version, and that is not my intension.
> >> Is there any way to specify maven to use the latest non-snapshot version
> >> of a dependency?
> >>
> >
> > have you tried using a meta-version, such as:
> >
> >     <version>RELEASE</version>
> >
> > that shouldn't match against any snapshots.
> >
> >
> >> Thx in advance...
> >> Rodrigo.
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >> For additional commands, e-mail: users-help@maven.apache.org
> >>
> >>
> >>
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
Cheers, Stuart

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: latest non-snapshot dependency

Posted by Rodrigo Gonçalves <rm...@criticalsoftware.com>.
Hi Stuart !

Thx for your response...

I've tried to use your suggestion but it does not work for every 
artifacts. For example:
when I use:

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>RELEASE</version>
                <configuration>
                       ...
                </configuration>
            </plugin>

Maven tries to download version 2.0-beta-5-SNAPSHOT
"org.apache.maven.plugins:maven-release-plugin:pom:2.0-beta-5-20070426.100207-13"

I don't know if it's relevant but I'm using a Maven 2 enterprise 
repository (artifactory).

Regards,
Rodrigo.


Stuart McCulloch wrote:
> On 30/07/07, Rodrigo Gonçalves <rm...@criticalsoftware.com> wrote:
>   
>> Hi...
>>
>> In my poms I have some plugins configured without the version in order
>> to use the latest one, but in my settings.xml file I need to have some
>> snapshot-repositories.
>> So in the builds maven will use the latest version available witch is a
>> snapshot version, and that is not my intension.
>> Is there any way to specify maven to use the latest non-snapshot version
>> of a dependency?
>>     
>
> have you tried using a meta-version, such as:
>
>     <version>RELEASE</version>
>
> that shouldn't match against any snapshots.
>
>   
>> Thx in advance...
>> Rodrigo.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>>     
>
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: latest non-snapshot dependency

Posted by Stuart McCulloch <st...@jayway.net>.
On 30/07/07, Rodrigo Gonçalves <rm...@criticalsoftware.com> wrote:
> Hi...
>
> In my poms I have some plugins configured without the version in order
> to use the latest one, but in my settings.xml file I need to have some
> snapshot-repositories.
> So in the builds maven will use the latest version available witch is a
> snapshot version, and that is not my intension.
> Is there any way to specify maven to use the latest non-snapshot version
> of a dependency?

have you tried using a meta-version, such as:

    <version>RELEASE</version>

that shouldn't match against any snapshots.

>
>
> Thx in advance...
> Rodrigo.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
Cheers, Stuart

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org