Maven Versions Plugin scans whole Maven repository

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Maven Versions Plugin scans whole Maven repository

Lukáš Satin
Hi,

Maven Versions Plugin scans whole Maven repository.

It takes about 1 hour and scans everything from com.google.* and
org.springframework.* plus other packages while they are nowhere in the
pom.xml! There is only org.springbootframework.boot, org.apache.commons,
com.oracle!

I read all articles, FAQ.

Why is this behavior? How to make it update only actual dependencies
present in pom.xml and not some transitive stuff?

[INFO] artifact com.google.api.grpc:proto-google-cloud-bigtable-v2:
checking for updates from snapshots
[INFO] artifact com.google.api.grpc:proto-google-cloud-billing-v1: checking
for updates from central
[INFO] artifact com.google.api.grpc:proto-google-cloud-billing-v1: checking
for updates from snapshots
[INFO] artifact com.google.api.grpc:grpc-google-cloud-billing-v1: checking
for updates from central
[INFO] artifact com.google.api.grpc:grpc-google-cloud-billing-v1: checking
for updates from snapshots
[INFO] artifact com.google.cloud:google-cloud-billing: checking for updates
from central
[INFO] artifact com.google.cloud:google-cloud-billing: checking for updates
from snapshots
[INFO] artifact
com.google.api.grpc:grpc-google-cloud-billingbudgets-v1beta1: checking for
updates from central
[INFO] artifact
com.google.api.grpc:grpc-google-cloud-billingbudgets-v1beta1: checking for
updates from snapshots
[INFO] artifact
com.google.api.grpc:proto-google-cloud-billingbudgets-v1beta1: checking for
updates from central
[INFO] artifact
com.google.api.grpc:proto-google-cloud-billingbudgets-v1beta1: checking for
updates from snapshots
[INFO] artifact com.google.cloud:google-cloud-billingbudgets: checking for
updates from central
[INFO] artifact com.google.cloud:google-cloud-billingbudgets: checking for
updates from snapshots
[INFO] artifact com.google.api.grpc:grpc-google-cloud-build-v1: checking
for updates from central
[INFO] artifact com.google.api.grpc:grpc-google-cloud-build-v1: checking
for updates from snapshots
[INFO] artifact com.google.api.grpc:proto-google-cloud-build-v1: checking
for updates from central
[INFO] artifact com.google.api.grpc:proto-google-cloud-build-v1: checking
for updates from snapshots
[INFO] artifact com.google.cloud:google-cloud-build: checking for updates
from central
Reply | Threaded
Open this post in threaded view
|

Re: Maven Versions Plugin scans whole Maven repository

John Patrick
The maven project doesn't have a code maven versions plugin, mojohaus
formally codehaus has a versions-maven-plugin. Is that the plugin
you're talking about? And I've just noticed they point their users
mailing list to this maven users list.

1) What is the exact command line you are executing? something like this?

$ mvn org.codehaus.mojo:versions-maven-plugin:2.7:display-dependency-updates

2) How many repo's do you point to? via your pom.xml or settings.xml
As each repo will be checked separately which might be why the high
execution time. The maven central calls might be say 10 mins but due
to slow 'snapshots' it might take 50 mins.

3) Is the project public on github or similar? i.e. can i clone it
myself and run the same command to see how long it takes for me?

4) Do you have a slow or high latency internet connection? As your
email implices you might be in the Czech Republic. You might have a
25Mbps connection but if you have multiple users streaming 4K video
and saturating the bandwidth it won't help you.

5) What location does repo1.maven.org resolve to? e.g. ping
repo1.maven.org or nslookup repo1.maven.org. Then put the ip address
into say https://ipinfo.io/ and see if that host is local to you...
mine is resoling to a UK Data Center, yours might be going somewhere
silly and non local

6) Maybe setup a nexus oss on your home/office/work network to cache
this data closer.

7) See where the time is wasted,
https://github.com/khmarbaise/maven-buildtime-profiler would help
confirm where phases/goal/plugin is taking all the time, it might just
show you what you know, which is the versions plugin is taking all the
time.

Hope some of the above is helpful or points towards the problem.
Without knowing the exact command line you're using it is a little
hard to help more. Also without seeing your pom or settings.xml as
your output shows central and something called snapshots being polled.

John

On Sat, 11 Jul 2020 at 07:39, Lukáš Satin <[hidden email]> wrote:

>
> Hi,
>
> Maven Versions Plugin scans whole Maven repository.
>
> It takes about 1 hour and scans everything from com.google.* and
> org.springframework.* plus other packages while they are nowhere in the
> pom.xml! There is only org.springbootframework.boot, org.apache.commons,
> com.oracle!
>
> I read all articles, FAQ.
>
> Why is this behavior? How to make it update only actual dependencies
> present in pom.xml and not some transitive stuff?
>
> [INFO] artifact com.google.api.grpc:proto-google-cloud-bigtable-v2:
> checking for updates from snapshots
> [INFO] artifact com.google.api.grpc:proto-google-cloud-billing-v1: checking
> for updates from central
> [INFO] artifact com.google.api.grpc:proto-google-cloud-billing-v1: checking
> for updates from snapshots
> [INFO] artifact com.google.api.grpc:grpc-google-cloud-billing-v1: checking
> for updates from central
> [INFO] artifact com.google.api.grpc:grpc-google-cloud-billing-v1: checking
> for updates from snapshots
> [INFO] artifact com.google.cloud:google-cloud-billing: checking for updates
> from central
> [INFO] artifact com.google.cloud:google-cloud-billing: checking for updates
> from snapshots
> [INFO] artifact
> com.google.api.grpc:grpc-google-cloud-billingbudgets-v1beta1: checking for
> updates from central
> [INFO] artifact
> com.google.api.grpc:grpc-google-cloud-billingbudgets-v1beta1: checking for
> updates from snapshots
> [INFO] artifact
> com.google.api.grpc:proto-google-cloud-billingbudgets-v1beta1: checking for
> updates from central
> [INFO] artifact
> com.google.api.grpc:proto-google-cloud-billingbudgets-v1beta1: checking for
> updates from snapshots
> [INFO] artifact com.google.cloud:google-cloud-billingbudgets: checking for
> updates from central
> [INFO] artifact com.google.cloud:google-cloud-billingbudgets: checking for
> updates from snapshots
> [INFO] artifact com.google.api.grpc:grpc-google-cloud-build-v1: checking
> for updates from central
> [INFO] artifact com.google.api.grpc:grpc-google-cloud-build-v1: checking
> for updates from snapshots
> [INFO] artifact com.google.api.grpc:proto-google-cloud-build-v1: checking
> for updates from central
> [INFO] artifact com.google.api.grpc:proto-google-cloud-build-v1: checking
> for updates from snapshots
> [INFO] artifact com.google.cloud:google-cloud-build: checking for updates
> from central

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Maven Versions Plugin scans whole Maven repository

Dennis Lundberg-2
In reply to this post by Lukáš Satin
Hi,

This is most likely due to a dependency on something from Spring Boot. I
have seen this as well. In many of the Spring Boot POMs they declare a ton
of dependencies in dependency management, to make sure all their components
use the same versions. The versions-maven-plugin might go through all of
them, because they are transitive dependencies of Spring Boot, depending on
how the dependency on Spring Boot artifact is declared and which Spring
Boot artifact it is.

--
Dennis Lundberg


Den lör 11 juli 2020 kl 08:39 skrev Lukáš Satin <[hidden email]>:

> Hi,
>
> Maven Versions Plugin scans whole Maven repository.
>
> It takes about 1 hour and scans everything from com.google.* and
> org.springframework.* plus other packages while they are nowhere in the
> pom.xml! There is only org.springbootframework.boot, org.apache.commons,
> com.oracle!
>
> I read all articles, FAQ.
>
> Why is this behavior? How to make it update only actual dependencies
> present in pom.xml and not some transitive stuff?
>
> [INFO] artifact com.google.api.grpc:proto-google-cloud-bigtable-v2:
> checking for updates from snapshots
> [INFO] artifact com.google.api.grpc:proto-google-cloud-billing-v1: checking
> for updates from central
> [INFO] artifact com.google.api.grpc:proto-google-cloud-billing-v1: checking
> for updates from snapshots
> [INFO] artifact com.google.api.grpc:grpc-google-cloud-billing-v1: checking
> for updates from central
> [INFO] artifact com.google.api.grpc:grpc-google-cloud-billing-v1: checking
> for updates from snapshots
> [INFO] artifact com.google.cloud:google-cloud-billing: checking for updates
> from central
> [INFO] artifact com.google.cloud:google-cloud-billing: checking for updates
> from snapshots
> [INFO] artifact
> com.google.api.grpc:grpc-google-cloud-billingbudgets-v1beta1: checking for
> updates from central
> [INFO] artifact
> com.google.api.grpc:grpc-google-cloud-billingbudgets-v1beta1: checking for
> updates from snapshots
> [INFO] artifact
> com.google.api.grpc:proto-google-cloud-billingbudgets-v1beta1: checking for
> updates from central
> [INFO] artifact
> com.google.api.grpc:proto-google-cloud-billingbudgets-v1beta1: checking for
> updates from snapshots
> [INFO] artifact com.google.cloud:google-cloud-billingbudgets: checking for
> updates from central
> [INFO] artifact com.google.cloud:google-cloud-billingbudgets: checking for
> updates from snapshots
> [INFO] artifact com.google.api.grpc:grpc-google-cloud-build-v1: checking
> for updates from central
> [INFO] artifact com.google.api.grpc:grpc-google-cloud-build-v1: checking
> for updates from snapshots
> [INFO] artifact com.google.api.grpc:proto-google-cloud-build-v1: checking
> for updates from central
> [INFO] artifact com.google.api.grpc:proto-google-cloud-build-v1: checking
> for updates from snapshots
> [INFO] artifact com.google.cloud:google-cloud-build: checking for updates
> from central
>
Reply | Threaded
Open this post in threaded view
|

Re: Maven Versions Plugin scans whole Maven repository

Nick_S
I had the same issue a while back [1]. We now use use-latest-versions and
no longer use properties for versions most of the time.

Hth,

[1] https://www.mail-archive.com/users@.../msg142064.html
Nick Stolwijk

~~~ Try to leave this world a little better than you found it and, when
your turn comes to die, you can die happy in feeling that at any rate you
have not wasted your time but have done your best ~~~

Lord Baden-Powell


On Wed, Jul 22, 2020 at 2:27 PM Dennis Lundberg <[hidden email]> wrote:

> Hi,
>
> This is most likely due to a dependency on something from Spring Boot. I
> have seen this as well. In many of the Spring Boot POMs they declare a ton
> of dependencies in dependency management, to make sure all their components
> use the same versions. The versions-maven-plugin might go through all of
> them, because they are transitive dependencies of Spring Boot, depending on
> how the dependency on Spring Boot artifact is declared and which Spring
> Boot artifact it is.
>
> --
> Dennis Lundberg
>
>
> Den lör 11 juli 2020 kl 08:39 skrev Lukáš Satin <[hidden email]>:
>
> > Hi,
> >
> > Maven Versions Plugin scans whole Maven repository.
> >
> > It takes about 1 hour and scans everything from com.google.* and
> > org.springframework.* plus other packages while they are nowhere in the
> > pom.xml! There is only org.springbootframework.boot, org.apache.commons,
> > com.oracle!
> >
> > I read all articles, FAQ.
> >
> > Why is this behavior? How to make it update only actual dependencies
> > present in pom.xml and not some transitive stuff?
> >
> > [INFO] artifact com.google.api.grpc:proto-google-cloud-bigtable-v2:
> > checking for updates from snapshots
> > [INFO] artifact com.google.api.grpc:proto-google-cloud-billing-v1:
> checking
> > for updates from central
> > [INFO] artifact com.google.api.grpc:proto-google-cloud-billing-v1:
> checking
> > for updates from snapshots
> > [INFO] artifact com.google.api.grpc:grpc-google-cloud-billing-v1:
> checking
> > for updates from central
> > [INFO] artifact com.google.api.grpc:grpc-google-cloud-billing-v1:
> checking
> > for updates from snapshots
> > [INFO] artifact com.google.cloud:google-cloud-billing: checking for
> updates
> > from central
> > [INFO] artifact com.google.cloud:google-cloud-billing: checking for
> updates
> > from snapshots
> > [INFO] artifact
> > com.google.api.grpc:grpc-google-cloud-billingbudgets-v1beta1: checking
> for
> > updates from central
> > [INFO] artifact
> > com.google.api.grpc:grpc-google-cloud-billingbudgets-v1beta1: checking
> for
> > updates from snapshots
> > [INFO] artifact
> > com.google.api.grpc:proto-google-cloud-billingbudgets-v1beta1: checking
> for
> > updates from central
> > [INFO] artifact
> > com.google.api.grpc:proto-google-cloud-billingbudgets-v1beta1: checking
> for
> > updates from snapshots
> > [INFO] artifact com.google.cloud:google-cloud-billingbudgets: checking
> for
> > updates from central
> > [INFO] artifact com.google.cloud:google-cloud-billingbudgets: checking
> for
> > updates from snapshots
> > [INFO] artifact com.google.api.grpc:grpc-google-cloud-build-v1: checking
> > for updates from central
> > [INFO] artifact com.google.api.grpc:grpc-google-cloud-build-v1: checking
> > for updates from snapshots
> > [INFO] artifact com.google.api.grpc:proto-google-cloud-build-v1: checking
> > for updates from central
> > [INFO] artifact com.google.api.grpc:proto-google-cloud-build-v1: checking
> > for updates from snapshots
> > [INFO] artifact com.google.cloud:google-cloud-build: checking for updates
> > from central
> >
>