Issue Details (XML | Word | Printable)

Key: MNG-1258
Type: Improvement Improvement
Status: Closed Closed
Resolution: Won't Fix
Priority: Major Major
Assignee: Brett Porter
Reporter: Carlos Sanchez
Votes: 6
Watchers: 8
Operations

If you were logged in you would be able to see more operations.
Maven 2 & 3

Add option to redownload poms

Created: 20/Oct/05 04:43 PM   Updated: 04/Dec/07 04:21 AM   Resolved: 05/Sep/07 02:39 AM
Return to search
Component/s: Plugins and Lifecycle
Affects Version/s: 2.0 (RC)
Fix Version/s: None

Time Tracking:
Not Specified

Issue Links:
Related

Complexity: Intermediate


 Description  « Hide

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



Brett Porter added a comment - 20/Oct/05 04:46 PM

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


Edwin Punzalan added a comment - 23/Oct/05 10:13 PM

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


Arik Kfir added a comment - 02/Jul/06 03:15 AM

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?


Oliver Siegmar added a comment - 16/May/07 03:37 AM

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).


Damien Lecan added a comment - 21/Jun/07 03:53 AM

-1

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


Brett Porter added a comment - 05/Sep/07 02:39 AM

we don't fix poms


Steven Devijver added a comment - 04/Dec/07 02:25 AM

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.


Carlos Sanchez added a comment - 04/Dec/07 04:21 AM

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?