Another example of excessive logging prompting one to find the root cause:

On Mon, 6 Feb 2023 at 15:03, James Agnew <jamesag...@gmail.com> wrote:

> Just to close the loop in case anyone finds this post.
>
> I had discounted the idea that a version range was the cause because I went
> over all of the POMs in my project and was sure none of them had a range
> version. I ended up attaching a debugger to Maven to try and figure out why
> it was doing all of this resolving and discovering... one of the libraries
> I had as a dependency in one of my modules had a range for the same
> dependency that I was importing with a specific version in my own module.
>
>
>
> On Fri, Jan 27, 2023 at 7:47 PM Łukasz Dywicki <l...@code-house.org>
> wrote:
>
> > Hello James,
> > You can configure snapshot repository to have custom update interval.
> > However from your mail I can smell some version range being used as
> > Maven would normally go only to remote repos to check is there a new
> > build of 6.3.14-SNAPSHOT of hapi-fhir-base. If you see
> > 6.1.0-PRE1-SNAPSHOT its most likely being checked because of a range
> > which is defined for hapi-fhir-base, one of its dependencies or other
> > dependencies you list in your project.
> >
> > To reduce amount of repository round trips please have a look on Maven
> > settings reference:
> > https://maven.apache.org/settings.html#Repositories
> >
> > Option you may look at is updatePolicy which can be specified inside
> > <snapshots> element. There are several values available. For example
> > always, daily, never, interval:X (where X stands for minutes).
> > Switching to inverval:24 might prevent you from seeing update check
> > after midnight, but you will have it at the start of every day!
> >
> > Hope that it helps you . ;-)
> > Łukasz
> > --
> > http://code-house.org
> > PS. Thank you for a great library!
> >
> > On 27.01.2023 22:47, James Agnew wrote:
> > > I'm wondering if this is something others have seen and perhaps
> something
> > > I'm doing wrong.
> > >
> > > I have a Maven project that uses a SNAPSHOT version of a library. I
> know
> > > Maven needs to check the maven-metadata.xml file every day in order to
> > > check if a new version of the snapshot is available, but in my case it
> > > seems to be downloading this file for every version of the snapshot
> that
> > > ever existed.
> > >
> > > My pom.xml references the dependency ca.uhn.hapi.fhir:hapi-fhir-base
> with
> > > <version>6.3.14-SNAPSHOT</version>, but in my build logs I see lines
> such
> > > as:
> > >
> > > 16:34:58.543 INFO Downloading from oss-snapshots:
> > >
> >
> https://oss.sonatype.org/content/repositories/snapshots/ca/uhn/hapi/fhir/hapi-fhir/6.1.0-PRE1-SNAPSHOT/maven-metadata.xml
> > > 16:36:29.663 INFO Downloading from oss-snapshots:
> > >
> >
> https://oss.sonatype.org/content/repositories/snapshots/ca/uhn/hapi/fhir/hapi-fhir-base/6.1.0-PRE2-SNAPSHOT/maven-metadata.xml
> > > 16:36:34.835 INFO Downloading from oss-snapshots:
> > >
> >
> https://oss.sonatype.org/content/repositories/snapshots/ca/uhn/hapi/fhir/hapi-fhir-base/6.1.0-PRE3-SNAPSHOT/maven-metadata.xml
> > >
> > > ..and many more. Downloading all of these versions for all of the
> modules
> > > in this library is adding tons of time and noise to my build. Is there
> a
> > > way to configure Maven to not do this?
> > >
> > > Cheers,
> > > James
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> > For additional commands, e-mail: users-h...@maven.apache.org
> >
> >
>

Reply via email to