Hi Trent! Just use the <updatePolicy> setting in the <repository> section for the specific repository and set it to 'never' or 'daily'.
You can either set this in your own pom.xml or in your ~/.m2/settings.xml [1]. LieGrue, strub [1] http://maven.apache.org/ref/2.0.8/maven-settings/settings.html --- On Fri, 8/5/11, Trent Larson <[email protected]> wrote: > From: Trent Larson <[email protected]> > Subject: How can we avoid "checking for updates" for jars we already have? > To: [email protected] > Date: Friday, August 5, 2011, 10:53 PM > Our Maven builds suddenly started > failing a few days ago, apparently because > our chosen mirror (for repo1.maven.org/maven2) is no longer > accessible. > > Here is the output: > > [INFO] artifact org.springframework:spring-core: checking > for updates from > central > [WARNING] repository metadata for: 'artifact > org.springframework:spring-core' could not be retrieved > from repository: > central due to an error: Error transferring file > [INFO] Repository 'central' will be blacklisted > [INFO] > ------------------------------------------------------------------------ > [ERROR] BUILD ERROR > [INFO] > ------------------------------------------------------------------------ > [INFO] Failed to resolve artifact. > > No versions are present in the repository for the artifact > with a range > [2.5.2,3) > org.springframework:spring-core:jar:null > > > I can think of a few solutions: > > - Let's just avoid downloading jars we already have! > We've got the > following in our .m2/repository: > org/springframework/spring-core/2.5.5/spring-core-2.5.5.jar > > This seems like the simplest solution... I guess I don't > understand why > Maven is checking external repos for something it already > has. BTW, we > don't depend on spring-core directly, so I assume it's due > to a transitive > dependency from this: > <dependency> > > <groupId>org.springframework</groupId> > > <artifactId>spring</artifactId> > <version>2.5.5</version> > </dependency> > > - Maybe there's a metadata setting for those Spring > artifacts where I can > force it to stop going external. (I tried specifying > spring-core directly > so it won't look elsewhere, to no avail.) It looks > like it's seeking some > "range" of versions for some reason. Maybe there's a > way to specify the > version of this transitive dependency in some other > dependency somewhere. > But I don't see any way to do those things. (How can > I see which other > thing is including this particular spring-core?) > > - If we can get to repo1.maven.org/maven2, that would be > nice, but we > cannot. (At least, it doesn't come up in my > browser.) And we used to use a > mirror, but now we can't get to any of the known mirrors, > either. Someone > just mentioned that there have been issues due to the > recent IP > changes<http://www.sonatype.com/people/2011/07/the-central-repository-is-getting-faster-are-you-ready-for-the-new-ips/>, > and that seems to say that repo1 is still available... but > shouldn't it come > up in my browser? > > Thanks for any ideas. > Trent > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
