I tested with a very simple test case and made sure to delete the dependency and dependent from the local reposoitory.
With maven 2.2.1 it behaves as I posted, always doing one initial check and pulling down the newer version if available. With maven 3.0.1 it behaves correctly and does not go to the remote repository at all. We are using 2.2.1 in our environment. I will open an issue on 2.2.1 today. Are those still being fixed at all? Is it possible to do patches ourselves locally? Does anyone know which code/module would control this checking? --- On Thu, 12/16/10, Johannes Homuth <johannes.hom...@sourcepark.de> wrote: From: Johannes Homuth <johannes.hom...@sourcepark.de> Subject: Re: updatePolicy="never" always does 1 initial check? To: "Maven Users List" <users@maven.apache.org> Date: Thursday, December 16, 2010, 3:59 AM Yes you are right. Maven should never check the remote repo if you have configured the updatePolicy to never and the artefact is locally installed. >From the documentation updatePolicy String The frequency for downloading updates - can be "always", "daily" (default), "interval:XXX" (in minutes) or "never" (only if it doesn't exist locally). http://maven.apache.org/ref/3.0/maven-settings/settings.html The only thing I could imagine that you may have another version of the artefact or placed it in the wrong folder of your local repo. edrico wrote: > I'm having an issue with marking my repository as > <updatePolicy>never</updatePolicy>. It seems as though even with the never > parameter, the first time an artifact is referenced, an initial check to the > remote repo happens. After that, the metadata.xml is created locally and > further checks for updates don't occur. > situation: > artifactB depends on artifactA > > Procedure: > 1) install artifactA locally 2) build artifactB locally, with repo > updatepolicy never. The hope would be that the locally installed artifactA > will be used, without ever contacting the remote repository. > result: > Maven goes to the remote repository to get info on artifactA ("checking for > updates") If there is a newer than local version, it is downloaded. > metadata.xml is created locally with name metada-<repoid>.xml > > This is causing me all kinds of headaches. Is it working as designed? I would > think updatePolicy=never should never check for updates if there is a local > copy. > Can someone point me to the code that is making the decision to Check for > Updates? > > > > > > -- B.Sc. Johannes Homuth ------------------------------------------------------- SOURCEPARK GmbH Helmholtzstr. 2-9, Gebäude M 10587 Berlin Tel.: +49 (0) 30 / 39 80 68 30 Fax: +49 (0) 30 / 39 80 68 39 e-mail: jhom...@sourcepark.de www: www.sourcepark.de ------------------------------------------------------ SOURCEPARK GmbH Sitz der Gesellschaft: Berlin / Amtsgericht Charlottenburg HRB 80254 Geschäftsführung: Matthias Barmeier, Harald Dürr ------------------------------------------------------ Diese Email kann vertrauliche und/oder rechtlich geschützte Informationen enthalten. Wenn sie nicht der richtige Adressat sind oder diese E-Mail irr- tümlich erhalten haben, informieren Sie bitte sofort diesen Absender und ver- nichten Sie diese E-Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser E-Mail ist nicht gestattet. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org