exist icon indicating copy to clipboard operation
exist copied to clipboard

[BUG] Build: Many downloads from different repos.

Open dizzzz opened this issue 5 months ago • 4 comments

After removing the ".m2/repository" directory I see a lof of the following messages:

Downloading from clojars.org: https://clojars.org/repo/org/apache/httpcomponents/httpcore/4.4.12/httpcore-4.4.12.jar
Downloading from clojars.org: https://clojars.org/repo/commons-io/commons-io/2.6/commons-io-2.6.jar
Downloading from clojars.org: https://clojars.org/repo/com/evolvedbinary/j8fu/j8fu/1.23.0/j8fu-1.23.0.jar
Downloading from clojars.org: https://clojars.org/repo/net/jcip/jcip-annotations/1.0/jcip-annotations-1.0.jar

Downloading from exist-db: https://repo.exist-db.org/repository/exist-db/org/apache/maven/maven-plugin-api/3.5.2/maven-plugin-api-3.5.2.jar
Downloading from exist-db: https://repo.exist-db.org/repository/exist-db/org/apache/maven/maven-model/3.5.2/maven-model-3.5.2.jar
Downloading from exist-db: https://repo.exist-db.org/repository/exist-db/org/apache/maven/maven-artifact/3.5.2/maven-artifact-3.5.2.jar
Downloading from exist-db: https://repo.exist-db.org/repository/exist-db/org/apache/commons/commons-lang3/3.5/commons-lang3-3.5.jar

Downloading from evolved-binary: https://repo.evolvedbinary.com/repository/exist-db/org/apache/maven/maven-plugin-api/3.5.2/maven-plugin-api-3.5.2.jar
Downloading from evolved-binary: https://repo.evolvedbinary.com/repository/exist-db/org/apache/maven/maven-model/3.5.2/maven-model-3.5.2.jar
Downloading from evolved-binary: https://repo.evolvedbinary.com/repository/exist-db/org/apache/maven/maven-artifact/3.5.2/maven-artifact-3.5.2.jar
Downloading from evolved-binary: https://repo.evolvedbinary.com/repository/exist-db/org/apache/commons/commons-lang3/3.5/commons-lang3-3.5.jar

I am not sore of these are actual download steps, but if so then some repos get big loads and maybe big bills for this.

  1. are these artifacts actually downloaded from these server
  2. as these look to me mostly very generic JAR files, why aren't they retrieved from a central repo?

dizzzz avatar Jul 28 '25 19:07 dizzzz

other interesting logs (note: clean repository dir!)

[INFO] Artifact net.jcip:jcip-annotations:jar:1.0 is present in the local repository, 
but cached from a remote repository ID that is unavailable in current build context, 
verifying that is downloadable from [clojars.org (https://clojars.org/repo, default,
 releases+snapshots), exist-db (https://repo.exist-db.org/repository/exist-db/, 
default, releases), exist-db-snapshots (https://repo.exist-db.org/repository/exist-db-snapshots/, 
default, snapshots), evolved-binary (https://repo.evolvedbinary.com/repository/exist-db/, 
default, releases), evolved-binary-snapshots (https://repo.evolvedbinary.com/repository/exist-db-snapshots/, 
default, snapshots), github (https://maven.pkg.github.com/eXist-db/exist, default, snapshots), 
central (https://repo.maven.apache.org/maven2, default, releases), sonatype-nexus-snapshots 
(https://oss.sonatype.org/content/repositories/snapshots, default, snapshots)]

[INFO] Artifact net.jcip:jcip-annotations:jar:1.0 is present in the local repository, but cached from a remote repository ID that is unavailable in current build context, verifying that is downloadable from [clojars.org (https://clojars.org/repo, default, releases+snapshots), exist-db (https://repo.exist-db.org/repository/exist-db/, default, releases), exist-db-snapshots (https://repo.exist-db.org/repository/exist-db-snapshots/, default, snapshots), evolved-binary (https://repo.evolvedbinary.com/repository/exist-db/, default, releases), evolved-binary-snapshots (https://repo.evolvedbinary.com/repository/exist-db-snapshots/, default, snapshots), github (https://maven.pkg.github.com/eXist-db/exist, default, snapshots), central (https://repo.maven.apache.org/maven2, default, releases), sonatype-nexus-snapshots (https://oss.sonatype.org/content/repositories/snapshots, default, snapshots)]

dizzzz avatar Jul 28 '25 19:07 dizzzz

and the last ones: the 401's

[WARNING] org.bouncycastle:bcpkix-jdk18on/maven-metadata.xml failed to transfer from https://maven.pkg.github.com/eXist-db/exist during a previous attempt. This failure was cached in the local repository and resolution will not be reattempted until the update interval of github has elapsed or updates are forced. Original error: Could not transfer metadata org.bouncycastle:bcpkix-jdk18on/maven-metadata.xml from/to github (https://maven.pkg.github.com/eXist-db/exist): status code: 401, reason phrase: Unauthorized (401)

[WARNING] org.bouncycastle:bcutil-jdk18on/maven-metadata.xml failed to transfer from https://maven.pkg.github.com/eXist-db/exist during a previous attempt. This failure was cached in the local repository and resolution will not be reattempted until the update interval of github has elapsed or updates are forced. Original error: Could not transfer metadata org.bouncycastle:bcutil-jdk18on/maven-metadata.xml from/to github (https://maven.pkg.github.com/eXist-db/exist): status code: 401, reason phrase: Unauthorized (401)

[WARNING] org.bouncycastle:bcprov-jdk18on/maven-metadata.xml failed to transfer from https://maven.pkg.github.com/eXist-db/exist during a previous attempt. This failure was cached in the local repository and resolution will not be reattempted until the update interval of github has elapsed or updates are forced. Original error: Could not transfer metadata org.bouncycastle:bcprov-jdk18on/maven-metadata.xml from/to github (https://maven.pkg.github.com/eXist-db/exist): status code: 401, reason phrase: Unauthorized (401)

[WARNING] org.eclipse.emf:org.eclipse.emf.common/maven-metadata.xml failed to transfer from https://maven.pkg.github.com/eXist-db/exist during a previous attempt. This failure was cached in the local repository and resolution will not be reattempted until the update interval of github has elapsed or updates are forced. Original error: Could not transfer metadata org.eclipse.emf:org.eclipse.emf.common/maven-metadata.xml from/to github (https://maven.pkg.github.com/eXist-db/exist): status code: 401, reason phrase: Unauthorized (401)

[WARNING] org.eclipse.emf:org.eclipse.emf.ecore/maven-metadata.xml failed to transfer from https://maven.pkg.github.com/eXist-db/exist during a previous attempt. This failure was cached in the local repository and resolution will not be reattempted until the update interval of github has elapsed or updates are forced. Original error: Could not transfer metadata org.eclipse.emf:org.eclipse.emf.ecore/maven-metadata.xml from/to github (https://maven.pkg.github.com/eXist-db/exist): status code: 401, reason phrase: Unauthorized (401)

dizzzz avatar Jul 28 '25 19:07 dizzzz

Afaik Maven will simply try to round-robin all the repositories and attempts to download everything from each repository as it can't know ahead of time which dependency is in which repo. It should not cause any problems though. For 6.x.x you can probably update to rely on only clojars, geo, and Maven Central

adamretter avatar Jul 28 '25 20:07 adamretter

From my (limited) experience with maven repository downloads: The first entry in the list of repositories, that has the requested resource, will be picked for downloads. For us this is maven-central-mirror most of the time.

There will be one entry per configured repository

Downloading from exist-db: https://repo.exist-db.org/repository/exist-db/org/apache/maven/maven-plugin-api/3.5.2/maven-plugin-api-3.5.2.jar

but only one

Downloaded from exist-db: https://repo.exist-db.org/repository/exist-db/org/apache/maven/maven-plugin-api/3.5.2/maven-plugin-api-3.5.2.jar

line-o avatar Jul 30 '25 18:07 line-o