You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Ralph Pöllath <li...@poellath.org> on 2010/11/27 17:57:53 UTC

How to make sure the local repository contains the latest version of a specific artifact?

Hi,

I'm looking for a simple way to make sure my local repository contains
the latest version of a specific artifact (make Maven check the
corporate repository and download a newer version if available).

I guess I could create a POM containing a dependency on the artifact
and build that, but since I'd like to script that task, I wonder
whether there's a simpler solution, maybe through some plugin that I
haven't seen so far.

In case you're wondering why I want to do this, I'm considering to
abuse Maven as some sort of a package manager.

Cheers,
-Ralph.

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


Re: How to make sure the local repository contains the latest version of a specific artifact?

Posted by Antonio Petrelli <an...@gmail.com>.
2010/11/27 Ralph Pöllath <li...@poellath.org>:
> I'm looking for a simple way to make sure my local repository contains
> the latest version of a specific artifact (make Maven check the
> corporate repository and download a newer version if available).
>
> I guess I could create a POM containing a dependency on the artifact
> and build that, but since I'd like to script that task, I wonder
> whether there's a simpler solution, maybe through some plugin that I
> haven't seen so far.

Aether might help:
https://docs.sonatype.org/display/AETHER/Home

Antonio

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


Re: How to make sure the local repository contains the latest versionof a specific artifact?

Posted by Stephen Connolly <st...@gmail.com>.
Once I get my changes to m-release-p out and add two goals to v-m-p we'll be
able to develop with ranges and release locked down to pinned versions

- Stephen

---
Sent from my Android phone, so random spelling mistakes are a direct result
of using swype to type on the screen

On 29 Nov 2010 08:54, "Anders Hammar" <an...@hammar.net> wrote:

I agree, I don't like version ranges either.
But, for some reason he wants to always use the latest version and then
specifying with no upper limit could do the trick. However, I would never
use that for any build I'd like to be able to reproduce. In my case that
would be everything I use Maven for...:-)

/Anders


On Mon, Nov 29, 2010 at 07:33, Moser, Christian <cm...@metrohm.com> wrote:

> Don't use ranges at all...

Re: How to make sure the local repository contains the latest versionof a specific artifact?

Posted by Anders Hammar <an...@hammar.net>.
I agree, I don't like version ranges either.
But, for some reason he wants to always use the latest version and then
specifying with no upper limit could do the trick. However, I would never
use that for any build I'd like to be able to reproduce. In my case that
would be everything I use Maven for...:-)

/Anders

On Mon, Nov 29, 2010 at 07:33, Moser, Christian <cm...@metrohm.com> wrote:

> Don't use ranges at all, sooner or later they will lead to ugly problems..
>
> I would recommend to use the maven version plugin with or without
> properties as version placeholder.
>
>
> http://mojo.codehaus.org/versions-maven-plugin/examples/display-dependency-updates.html
>
>
> http://mojo.codehaus.org/versions-maven-plugin/examples/update-properties.html
>
> As long as you use the maven version convention, it will work like a charm.
>
> - Chris
>
>
>
> -----Ursprüngliche Nachricht-----
> Von: anders.g.hammar@gmail.com [mailto:anders.g.hammar@gmail.com] Im
> Auftrag von Anders Hammar
> Gesendet: Samstag, 27. November 2010 22:36
> An: Maven Users List
> Betreff: Re: How to make sure the local repository contains the latest
> versionof a specific artifact?
>
> Use ranges for specifying the version of the artifact?
>
> /Anders
>
> On Sat, Nov 27, 2010 at 17:57, Ralph Pöllath <li...@poellath.org> wrote:
>
> > Hi,
> >
> > I'm looking for a simple way to make sure my local repository contains
> > the latest version of a specific artifact (make Maven check the
> > corporate repository and download a newer version if available).
> >
> > I guess I could create a POM containing a dependency on the artifact
> > and build that, but since I'd like to script that task, I wonder
> > whether there's a simpler solution, maybe through some plugin that I
> > haven't seen so far.
> >
> > In case you're wondering why I want to do this, I'm considering to
> > abuse Maven as some sort of a package manager.
> >
> > Cheers,
> > -Ralph.
> >
> > ---------------------------------------------------------------------
> > 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
>
>

AW: How to make sure the local repository contains the latest versionof a specific artifact?

Posted by "Moser, Christian" <cm...@metrohm.com>.
Don't use ranges at all, sooner or later they will lead to ugly problems..

I would recommend to use the maven version plugin with or without properties as version placeholder.

http://mojo.codehaus.org/versions-maven-plugin/examples/display-dependency-updates.html

http://mojo.codehaus.org/versions-maven-plugin/examples/update-properties.html

As long as you use the maven version convention, it will work like a charm.

- Chris



-----Ursprüngliche Nachricht-----
Von: anders.g.hammar@gmail.com [mailto:anders.g.hammar@gmail.com] Im Auftrag von Anders Hammar
Gesendet: Samstag, 27. November 2010 22:36
An: Maven Users List
Betreff: Re: How to make sure the local repository contains the latest versionof a specific artifact?

Use ranges for specifying the version of the artifact?

/Anders

On Sat, Nov 27, 2010 at 17:57, Ralph Pöllath <li...@poellath.org> wrote:

> Hi,
>
> I'm looking for a simple way to make sure my local repository contains
> the latest version of a specific artifact (make Maven check the
> corporate repository and download a newer version if available).
>
> I guess I could create a POM containing a dependency on the artifact
> and build that, but since I'd like to script that task, I wonder
> whether there's a simpler solution, maybe through some plugin that I
> haven't seen so far.
>
> In case you're wondering why I want to do this, I'm considering to
> abuse Maven as some sort of a package manager.
>
> Cheers,
> -Ralph.
>
> ---------------------------------------------------------------------
> 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: How to make sure the local repository contains the latest version of a specific artifact?

Posted by Anders Hammar <an...@hammar.net>.
Use ranges for specifying the version of the artifact?

/Anders

On Sat, Nov 27, 2010 at 17:57, Ralph Pöllath <li...@poellath.org> wrote:

> Hi,
>
> I'm looking for a simple way to make sure my local repository contains
> the latest version of a specific artifact (make Maven check the
> corporate repository and download a newer version if available).
>
> I guess I could create a POM containing a dependency on the artifact
> and build that, but since I'd like to script that task, I wonder
> whether there's a simpler solution, maybe through some plugin that I
> haven't seen so far.
>
> In case you're wondering why I want to do this, I'm considering to
> abuse Maven as some sort of a package manager.
>
> Cheers,
> -Ralph.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>