Maven 2 & 3

Add option to redownload poms

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Won't Fix
  • Affects Version/s: 2.0 (RC)
  • Fix Version/s: None
  • Component/s: Plugins and Lifecycle
  • Labels:
    None
  • Complexity:
    Intermediate
  • Number of attachments :
    0

Description

Add an option to the command line to redownload the poms, so it's easy to get the fixes in the remote repo. Something like -f , --refresh or whatever

Issue Links

Activity

Hide
Brett Porter added a comment -

this should just be based on confidence level, rather than a cmd line parameter?

Show
Brett Porter added a comment - this should just be based on confidence level, rather than a cmd line parameter?
Hide
Edwin Punzalan added a comment -

Also, should the re-download fails, should the build fail ?

Show
Edwin Punzalan added a comment - Also, should the re-download fails, should the build fail ?
Hide
Arik Kfir added a comment -

Hi,

You could use the "If-Modified-Since" HTTP header when querying the repo. All HTTP servers support this (part of HTTP protocol). This essentially tells the server to provide the resource (POM, JAR, etc) only if it was modified after a certain date; the given date can be the date it was downloaded to the user's computer.

Even more powerful would be to have maven do this automatically once in a while. So, for example, once a week maven does this to every artifact it downloads (even without the command line parameter). Of course, this should be configured in the settings.xml file.

This would completely eliminate the stale artifacts problem in users' computers, whilst not requiring users to know about this command line switch, and not hurting performance too much (since only the deltas are re-downloaded).

The downside is that there is still an additional request to the server (once a week or whatever) but the upside is that no stale artifacts are present for too long in a user's dir.

WDYT?

Show
Arik Kfir added a comment - Hi, You could use the "If-Modified-Since" HTTP header when querying the repo. All HTTP servers support this (part of HTTP protocol). This essentially tells the server to provide the resource (POM, JAR, etc) only if it was modified after a certain date; the given date can be the date it was downloaded to the user's computer. Even more powerful would be to have maven do this automatically once in a while. So, for example, once a week maven does this to every artifact it downloads (even without the command line parameter). Of course, this should be configured in the settings.xml file. This would completely eliminate the stale artifacts problem in users' computers, whilst not requiring users to know about this command line switch, and not hurting performance too much (since only the deltas are re-downloaded). The downside is that there is still an additional request to the server (once a week or whatever) but the upside is that no stale artifacts are present for too long in a user's dir. WDYT?
Hide
Oliver Siegmar added a comment -

It should be completely forbidden, that a version (jar and pom) ever changes! This leads to very hard-to-reproduce problems if packages differ from one computer to another only because they have different versions of an archive. If a pom has to be updated, a new one should be created with an additional (packaging dependend) version field (version bumped from 1.0 to 1.0-1 for example).

Show
Oliver Siegmar added a comment - It should be completely forbidden, that a version (jar and pom) ever changes! This leads to very hard-to-reproduce problems if packages differ from one computer to another only because they have different versions of an archive. If a pom has to be updated, a new one should be created with an additional (packaging dependend) version field (version bumped from 1.0 to 1.0-1 for example).
Hide
Damien Lecan added a comment -

-1

pom, jars should never be redownloaded
A released version is build and deployed once and for all

Show
Damien Lecan added a comment - -1 pom, jars should never be redownloaded A released version is build and deployed once and for all
Hide
Brett Porter added a comment -

we don't fix poms

Show
Brett Porter added a comment - we don't fix poms
Hide
Steven Devijver added a comment -

The way this issue has been treated demonstrates why Maven is as useless as it is.

Re-downloading POM files would be a nice feature. We're using a product that allows us to manage the artifacts in our repository and edit their dependencies. We can add and remove dependencies to artifacts. It allows us to rationalize the dependencies in our projects.

You may think this is a bad practice, after all everybody is entitled an opinion. You choose however to climb in your ivory tower and rule how the world should function.

Instead I suggest you take a look at how the world functions including all its inefficiencies and bad practices. If you were anywhere near as good as say the Spring developers you would consider to include this feature as optional behavior in Maven and perhaps issue a warning that using this option could be considered a bad practice.

Show
Steven Devijver added a comment - The way this issue has been treated demonstrates why Maven is as useless as it is. Re-downloading POM files would be a nice feature. We're using a product that allows us to manage the artifacts in our repository and edit their dependencies. We can add and remove dependencies to artifacts. It allows us to rationalize the dependencies in our projects. You may think this is a bad practice, after all everybody is entitled an opinion. You choose however to climb in your ivory tower and rule how the world should function. Instead I suggest you take a look at how the world functions including all its inefficiencies and bad practices. If you were anywhere near as good as say the Spring developers you would consider to include this feature as optional behavior in Maven and perhaps issue a warning that using this option could be considered a bad practice.
Hide
Carlos Sanchez added a comment -

you can still delete your local repo and all the poms will get downloaded, so it's not impossible

or are you willing to provide the code for that option?

Show
Carlos Sanchez added a comment - you can still delete your local repo and all the poms will get downloaded, so it's not impossible or are you willing to provide the code for that option?

People

Vote (6)
Watch (8)

Dates

  • Created:
    Updated:
    Resolved: