You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Marco Villalobos <mv...@myspace.com> on 2008/10/07 03:51:07 UTC

maven repository update.

Hello,

 

I have  a repository called Red, and a build machine called Ark.

 

Naturally, when you do a build, Ark has its own local repository.

 

Somebody deployed artifact widget-1.1 to Red.

 

Ark already has widget-1.1 in its local repository.  But it is an older
version.  You can tell by its date timestamp.  The version of widget-1.1
in Red is newer, and correct.

 

Is there a way to tell maven to analyze the date, and update the local
repository with the newer version?

 

We tried mvn -U, but that did not work.

 

Thank you.

 

-M


Re: maven repository update.

Posted by "Mark H. Wood" <mw...@IUPUI.Edu>.
What the new user is missing is that the concept "up-to-date" is
overloaded and means very different things depending on whether it is
applied to a snapshot or to a release.

To make a long story short: if a released package needed repair then
the repaired version needed a new version number.  This is well known
to be good practice since long before Maven came along, even though we
all know of cases where someone got away with ignoring it.  The
correct response, upon noticing that two package release copies of equal
version number differ, is not "I'd better update" but "this is WRONG,
sound the alarm!"

The -help blurb could perhaps be improved by distinguishing between
"updated snapshot" and "higher release version" to show that the
concepts are different.  It would at least prompt some of us to
wonder, "what's different about these," and maybe go find out.

As a newbie myself, I often find that the Maven documentation assumes
far too much knowledge of the celebrated conventions and contains too
few pointers to them for the uninitiated.  That's why I bought the
book.  Yes, I will try to remember to report specific cases when I see
them.

-- 
Mark H. Wood, Lead System Programmer   mwood@IUPUI.Edu
Typically when a software vendor says that a product is "intuitive" he
means the exact opposite.


Re: maven repository update.

Posted by Lee Meador <le...@leemeador.com>.
How about:

-U Update and use new SNAPSHOT versions. Use new release versions if no
specific version is supplied or a version range allows it in the pom .

On Tue, Oct 7, 2008 at 4:46 PM, Stephen Connolly <
stephen.alan.connolly@gmail.com> wrote:

> The problem is that -U will also update any plugins that have not been
> locked down... so it is not just check for new snapshots
>
> 2008/10/7 Marco Villalobos <mv...@myspace.com>:
> >
> > hi,
> >
> > A dependency requires a specific version of an artifact to be declared
> explicitly in the pom.
> >
> > mvn -U does not "change" the version that is explicitly declared in the
> pom.
> >
> > For this reason, stating that -U will update releases makes people think
> that it will actually check if an artifact in the remote repository and and
> local repository with the same version name will also be compared by its
> timestamp and file size.  This is not true though.  This only applies to
> snapshots.
> >
> > Hence, it is unclear, but the wording:  "Forces a check for new snapshots
> on remote repositories." is more clear.
> >
> > This is just my opinion though, and I am sincerely trying to help.
> >
> > -M
> >
> > -----Original Message-----
> > From: Stephen Connolly [mailto:stephen.alan.connolly@gmail.com]
> > Sent: Tue 10/7/2008 2:23 PM
> > To: Maven Users List
> > Subject: Re: maven repository update.
> >
> > 2008/10/7 Wayne Fay <wa...@gmail.com>:
> >>> Perhaps the wording:  Forces a check for new snapshots on remote
> repositories.
> >>>
> >>> Is better, because the words "updated releases" makes people think the
> short version of -U will also "update releases", not just snapshots.
> >>
> >> But its not just snapshots, its also new versions of releases
> (updates)...
> >
> > And we're back to confusing everyone!
> >
> > -U will update the snapshots AND if you are using version ranges, it
> > will check to see if a newer version can satisfy the ranges.
> >
> >>
> >> Wayne
> >>
> >> ---------------------------------------------------------------------
> >> 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
>
>


-- 
-- Lee Meador
Sent from gmail. My real email address is lee AT leemeador.com

Re: maven repository update.

Posted by Wayne Fay <wa...@gmail.com>.
This thread should be evidence to just about anyone that Maven is
sufficiently complex that ANY attempt to dumb it down for a quick
description via --help is almost guaranteed to fail.

I think Maven should be *primarily* documented online, minimally
documented via --help, and a version-specific URL eg
http://maven.apache.org/cli-help/2.0.9.html (since command line
options may change with versions) should be offered via --help with
more documentation and links etc.

Otherwise I'm afraid we will need full paragraph descriptions for
things like -U.

Wayne

On Tue, Oct 7, 2008 at 2:46 PM, Stephen Connolly
<st...@gmail.com> wrote:
> The problem is that -U will also update any plugins that have not been
> locked down... so it is not just check for new snapshots
>
> 2008/10/7 Marco Villalobos <mv...@myspace.com>:
>>
>> hi,
>>
>> A dependency requires a specific version of an artifact to be declared explicitly in the pom.
>>
>> mvn -U does not "change" the version that is explicitly declared in the pom.
>>
>> For this reason, stating that -U will update releases makes people think that it will actually check if an artifact in the remote repository and and local repository with the same version name will also be compared by its timestamp and file size.  This is not true though.  This only applies to snapshots.
>>
>> Hence, it is unclear, but the wording:  "Forces a check for new snapshots on remote repositories." is more clear.
>>
>> This is just my opinion though, and I am sincerely trying to help.
>>
>> -M
>>
>> -----Original Message-----
>> From: Stephen Connolly [mailto:stephen.alan.connolly@gmail.com]
>> Sent: Tue 10/7/2008 2:23 PM
>> To: Maven Users List
>> Subject: Re: maven repository update.
>>
>> 2008/10/7 Wayne Fay <wa...@gmail.com>:
>>>> Perhaps the wording:  Forces a check for new snapshots on remote repositories.
>>>>
>>>> Is better, because the words "updated releases" makes people think the short version of -U will also "update releases", not just snapshots.
>>>
>>> But its not just snapshots, its also new versions of releases (updates)...
>>
>> And we're back to confusing everyone!
>>
>> -U will update the snapshots AND if you are using version ranges, it
>> will check to see if a newer version can satisfy the ranges.
>>
>>>
>>> Wayne
>>>
>>> ---------------------------------------------------------------------
>>> 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
>
>

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


Re: maven repository update.

Posted by Stephen Connolly <st...@gmail.com>.
The problem is that -U will also update any plugins that have not been
locked down... so it is not just check for new snapshots

2008/10/7 Marco Villalobos <mv...@myspace.com>:
>
> hi,
>
> A dependency requires a specific version of an artifact to be declared explicitly in the pom.
>
> mvn -U does not "change" the version that is explicitly declared in the pom.
>
> For this reason, stating that -U will update releases makes people think that it will actually check if an artifact in the remote repository and and local repository with the same version name will also be compared by its timestamp and file size.  This is not true though.  This only applies to snapshots.
>
> Hence, it is unclear, but the wording:  "Forces a check for new snapshots on remote repositories." is more clear.
>
> This is just my opinion though, and I am sincerely trying to help.
>
> -M
>
> -----Original Message-----
> From: Stephen Connolly [mailto:stephen.alan.connolly@gmail.com]
> Sent: Tue 10/7/2008 2:23 PM
> To: Maven Users List
> Subject: Re: maven repository update.
>
> 2008/10/7 Wayne Fay <wa...@gmail.com>:
>>> Perhaps the wording:  Forces a check for new snapshots on remote repositories.
>>>
>>> Is better, because the words "updated releases" makes people think the short version of -U will also "update releases", not just snapshots.
>>
>> But its not just snapshots, its also new versions of releases (updates)...
>
> And we're back to confusing everyone!
>
> -U will update the snapshots AND if you are using version ranges, it
> will check to see if a newer version can satisfy the ranges.
>
>>
>> Wayne
>>
>> ---------------------------------------------------------------------
>> 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: maven repository update.

Posted by Marco Villalobos <mv...@myspace.com>.
hi,

A dependency requires a specific version of an artifact to be declared explicitly in the pom.

mvn -U does not "change" the version that is explicitly declared in the pom.

For this reason, stating that -U will update releases makes people think that it will actually check if an artifact in the remote repository and and local repository with the same version name will also be compared by its timestamp and file size.  This is not true though.  This only applies to snapshots.

Hence, it is unclear, but the wording:  "Forces a check for new snapshots on remote repositories." is more clear.

This is just my opinion though, and I am sincerely trying to help.

-M

-----Original Message-----
From: Stephen Connolly [mailto:stephen.alan.connolly@gmail.com]
Sent: Tue 10/7/2008 2:23 PM
To: Maven Users List
Subject: Re: maven repository update.
 
2008/10/7 Wayne Fay <wa...@gmail.com>:
>> Perhaps the wording:  Forces a check for new snapshots on remote repositories.
>>
>> Is better, because the words "updated releases" makes people think the short version of -U will also "update releases", not just snapshots.
>
> But its not just snapshots, its also new versions of releases (updates)...

And we're back to confusing everyone!

-U will update the snapshots AND if you are using version ranges, it
will check to see if a newer version can satisfy the ranges.

>
> Wayne
>
> ---------------------------------------------------------------------
> 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: maven repository update.

Posted by Stephen Connolly <st...@gmail.com>.
2008/10/7 Wayne Fay <wa...@gmail.com>:
>> Perhaps the wording:  Forces a check for new snapshots on remote repositories.
>>
>> Is better, because the words "updated releases" makes people think the short version of -U will also "update releases", not just snapshots.
>
> But its not just snapshots, its also new versions of releases (updates)...

And we're back to confusing everyone!

-U will update the snapshots AND if you are using version ranges, it
will check to see if a newer version can satisfy the ranges.

>
> Wayne
>
> ---------------------------------------------------------------------
> 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: maven repository update.

Posted by Wayne Fay <wa...@gmail.com>.
> Perhaps the wording:  Forces a check for new snapshots on remote repositories.
>
> Is better, because the words "updated releases" makes people think the short version of -U will also "update releases", not just snapshots.

But its not just snapshots, its also new versions of releases (updates)...

Wayne

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


RE: maven repository update.

Posted by Marco Villalobos <mv...@myspace.com>.

Also,

mvn --help

-U,--update-snapshots         Forces a check for updated releases and
                              snapshots on remote repositories

Implies that a release can be updated, which it cannot.

Perhaps the wording:  Forces a check for new snapshots on remote repositories.

Is better, because the words "updated releases" makes people think the short version of -U will also "update releases", not just snapshots.


-----Original Message-----
From: Marco Villalobos [mailto:mvillalobos@myspace.com]
Sent: Tue 10/7/2008 1:51 PM
To: Maven Users List; Maven Users List
Subject: RE: maven repository update.
 

Well, think from the perspective of the lay developer, which I am :)

First thing that'll happen is that a developer will notice that the repository version of an artifact
is actually different than what is in his local repository.

Then he'll think, "how can I update my repository?"

He might google, "maven update repository".  He probably wouldn't be happy with those results, then
he'll go through the maven website, or sonatype's online maven book.

Eventually he'll stumble on the documentation index link:

http://maven.apache.org/guides/index.html

He'll see a beautiful link that says, "repositories".

http://maven.apache.org/guides/introduction/introduction-to-repositories.html

But alas, the information is not there either.

Then perhaps he'll try mvn --help

Which will state:

-U,--update-snapshots         Forces a check for updated releases and
                              snapshots on remote repositories

And he'll think, "ah, my repository will be forced to update with a -U."

He'll try.  Doesn't work.

Then he'll google "mvn -U" does not work,
or a variety of patterns describing his situation.

He'll come upon a link like this:
http://jira.codehaus.org/browse/MNG-2601

And nothing seems to work, until he turns to the newsgroup and finds out:  oh, that's not possible, it's a rule.

To answer your question, I think this should be in the introduction to repositories section.
It is required knowledge for repository management.

http://maven.apache.org/guides/introduction/introduction-to-repositories.html

-M
-----Original Message-----
From: Wayne Fay [mailto:waynefay@gmail.com]
Sent: Tue 10/7/2008 11:52 AM
To: Maven Users List
Subject: Re: maven repository update.
 
On Tue, Oct 7, 2008 at 10:51 AM, Marco Villalobos
<mv...@myspace.com> wrote:
>
> This convention makes sense.  I wish it was more clearly documented though, and easier
> to find the rule behind this convention.

Where specifically would you expect to see such documentation? As a
new user to Maven, you have a unique perspective that those of us who
have been around for a while simply do not possess. If the docs can be
changed to suit your expectations, perhaps it will help future new
users who do not understand this "rule".

>
> Even the command line --help almost suggest that it is possible to do this update.

Again, what specifically in --help is not clear, and how can it be fixed?

Wayne

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


 



 

RE: maven repository update.

Posted by Marco Villalobos <mv...@myspace.com>.
Well, think from the perspective of the lay developer, which I am :)

First thing that'll happen is that a developer will notice that the repository version of an artifact
is actually different than what is in his local repository.

Then he'll think, "how can I update my repository?"

He might google, "maven update repository".  He probably wouldn't be happy with those results, then
he'll go through the maven website, or sonatype's online maven book.

Eventually he'll stumble on the documentation index link:

http://maven.apache.org/guides/index.html

He'll see a beautiful link that says, "repositories".

http://maven.apache.org/guides/introduction/introduction-to-repositories.html

But alas, the information is not there either.

Then perhaps he'll try mvn --help

Which will state:

-U,--update-snapshots         Forces a check for updated releases and
                              snapshots on remote repositories

And he'll think, "ah, my repository will be forced to update with a -U."

He'll try.  Doesn't work.

Then he'll google "mvn -U" does not work,
or a variety of patterns describing his situation.

He'll come upon a link like this:
http://jira.codehaus.org/browse/MNG-2601

And nothing seems to work, until he turns to the newsgroup and finds out:  oh, that's not possible, it's a rule.

To answer your question, I think this should be in the introduction to repositories section.
It is required knowledge for repository management.

http://maven.apache.org/guides/introduction/introduction-to-repositories.html

-M
-----Original Message-----
From: Wayne Fay [mailto:waynefay@gmail.com]
Sent: Tue 10/7/2008 11:52 AM
To: Maven Users List
Subject: Re: maven repository update.
 
On Tue, Oct 7, 2008 at 10:51 AM, Marco Villalobos
<mv...@myspace.com> wrote:
>
> This convention makes sense.  I wish it was more clearly documented though, and easier
> to find the rule behind this convention.

Where specifically would you expect to see such documentation? As a
new user to Maven, you have a unique perspective that those of us who
have been around for a while simply do not possess. If the docs can be
changed to suit your expectations, perhaps it will help future new
users who do not understand this "rule".

>
> Even the command line --help almost suggest that it is possible to do this update.

Again, what specifically in --help is not clear, and how can it be fixed?

Wayne

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


 

Re: maven repository update.

Posted by Wayne Fay <wa...@gmail.com>.
On Tue, Oct 7, 2008 at 10:51 AM, Marco Villalobos
<mv...@myspace.com> wrote:
>
> This convention makes sense.  I wish it was more clearly documented though, and easier
> to find the rule behind this convention.

Where specifically would you expect to see such documentation? As a
new user to Maven, you have a unique perspective that those of us who
have been around for a while simply do not possess. If the docs can be
changed to suit your expectations, perhaps it will help future new
users who do not understand this "rule".

>
> Even the command line --help almost suggest that it is possible to do this update.

Again, what specifically in --help is not clear, and how can it be fixed?

Wayne

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


RE: maven repository update.

Posted by Marco Villalobos <mv...@myspace.com>.
This convention makes sense.  I wish it was more clearly documented though, and easier
to find the rule behind this convention.

Even the command line --help almost suggest that it is possible to do this update.

Regardless, I agree with this convention, and the reason behind it.

Thank you very much.

-M

-----Original Message-----
From: carlossg@gmail.com on behalf of Carlos Sanchez
Sent: Mon 10/6/2008 7:06 PM
To: Maven Users List
Subject: Re: maven repository update.
 
no, there is not.
Artifacts are not supposed to change after being released. You'd have
to manually copy/delete the file

On Mon, Oct 6, 2008 at 6:51 PM, Marco Villalobos
<mv...@myspace.com> wrote:
> Hello,
>
>
>
> I have  a repository called Red, and a build machine called Ark.
>
>
>
> Naturally, when you do a build, Ark has its own local repository.
>
>
>
> Somebody deployed artifact widget-1.1 to Red.
>
>
>
> Ark already has widget-1.1 in its local repository.  But it is an older
> version.  You can tell by its date timestamp.  The version of widget-1.1
> in Red is newer, and correct.
>
>
>
> Is there a way to tell maven to analyze the date, and update the local
> repository with the newer version?
>
>
>
> We tried mvn -U, but that did not work.
>
>
>
> Thank you.
>
>
>
> -M
>
>

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


 

Re: maven repository update.

Posted by Carlos Sanchez <ca...@carlossanchez.eu>.
no, there is not.
Artifacts are not supposed to change after being released. You'd have
to manually copy/delete the file

On Mon, Oct 6, 2008 at 6:51 PM, Marco Villalobos
<mv...@myspace.com> wrote:
> Hello,
>
>
>
> I have  a repository called Red, and a build machine called Ark.
>
>
>
> Naturally, when you do a build, Ark has its own local repository.
>
>
>
> Somebody deployed artifact widget-1.1 to Red.
>
>
>
> Ark already has widget-1.1 in its local repository.  But it is an older
> version.  You can tell by its date timestamp.  The version of widget-1.1
> in Red is newer, and correct.
>
>
>
> Is there a way to tell maven to analyze the date, and update the local
> repository with the newer version?
>
>
>
> We tried mvn -U, but that did not work.
>
>
>
> Thank you.
>
>
>
> -M
>
>

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


Re: maven repository update.

Posted by Wendy Smoak <ws...@gmail.com>.
On Mon, Oct 6, 2008 at 6:51 PM, Marco Villalobos
<mv...@myspace.com> wrote:

> I have  a repository called Red, and a build machine called Ark.
> Naturally, when you do a build, Ark has its own local repository.
> Somebody deployed artifact widget-1.1 to Red.
> Ark already has widget-1.1 in its local repository.  But it is an older
> version.  You can tell by its date timestamp.  The version of widget-1.1
> in Red is newer, and correct.
> Is there a way to tell maven to analyze the date, and update the local
> repository with the newer version?
> We tried mvn -U, but that did not work.

A released version should never change.   If widget is under
development, its version number should be 1.1-SNAPSHOT.  Then Maven
will behave as you expect, checking for newer versions and updating
the local repository.

-- 
Wendy

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