-
Notifications
You must be signed in to change notification settings - Fork 204
fix(java): use Maven mirror, remove unnecessary plugins, other CI-stability improvements #2253
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 13 commits
1e95a87
31b26cf
a79577c
c5060bb
0fbdc3b
a94f8c5
ddc3e61
b150a67
00e1d60
bf87dc8
cff50f8
879aba4
56e5507
01a6637
67d7633
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| -e | ||
| -B | ||
| -Daether.connector.basic.downstreamThreads=1 | ||
| -Daether.transport.http.retryHandler.count=5 | ||
| -Daether.transport.http.retryHandler.interval=10000 | ||
| -Dmaven.wagon.http.retryHandler.count=5 | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This will affect every In short, this is basically "loudly report errors, and make requests to package repositories more slowly" Explanations:
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,6 @@ | ||
| <!-- | ||
| /* | ||
| * SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION. | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| */ | ||
| SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| SPDX-License-Identifier: Apache-2.0 | ||
| --> | ||
| <project xmlns="http://maven.apache.org/POM/4.0.0" | ||
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
|
|
@@ -54,13 +52,59 @@ | |
| <native.build.path>${project.build.directory}/../../../cpp/build</native.build.path> | ||
| </properties> | ||
|
|
||
| <distributionManagement> | ||
| <snapshotRepository> | ||
| <id>ossrh</id> | ||
| <url>https://oss.sonatype.org/content/repositories/snapshots</url> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Suppose the deploy/distribute cuvs-java JARs do not depend on this part? If yes, good to remove it
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's right, as of now we don't pull or publish snapshots. As Corey pointed out in #2253 (comment) we may do that in the future, but for now this is unused. |
||
| </snapshotRepository> | ||
| </distributionManagement> | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This project doesn't distributed any snapshots... you'll only see releases at https://central.sonatype.com/artifact/com.nvidia.cuvs/cuvs-java/versions And it doesn't rely on downloading any snapshots of dependencies. So this configuration is totally unnecessary. As more evidence of that... it references a repo (https://oss.sonatype.org/) that doesn't even exist any more. $ curl -I https://oss.sonatype.org
HTTP/2 404
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
We are actualy shortly going to be deploying nightly snapshos. I know this doesn't change much in this PR (and we still need to ditch the oss.sonatype.org), but I want to point this out because we have several customers asking us to distriute snapshots (some of them cannot build our code).
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yep makes sense, whatever configuration is needed can be added as part of the work of publishing snapshots. |
||
| <repositories> | ||
| <!-- Prefer Google Cloud mirror, which has higher rate limits --> | ||
| <repository> | ||
| <id>gcs-maven-central-mirror</id> | ||
| <name>GCS Maven Central mirror</name> | ||
| <url>https://maven-central.storage-download.googleapis.com/maven2/</url> | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This read-only mirror of Maven Central faces much higher (or no?) rate limits. Its docs at https://storage-download.googleapis.com/maven-central/index.html say "This is not an officially supported Google product.", but I think we can trust it... it was first set up back in 2015 by the creator of Maven (http://takari.io/2015/10/28/google-maven-central.html) with enough official Google backing that it was announced on GCP's tech blog: https://cloudplatform.googleblog.com/2015/11/faster-builds-for-Java-developers-with-Maven-Central-mirror.html It is used by big, high-profile Java projects like Apache Beam, Gluten, Lucene, Orc, and Spark: https://github.com/search?q=org%3Aapache%20%22maven-central.storage-download.googleapis.com%22&type=code And was recently adopted by cuDF: rapidsai/cudf#22875 |
||
| <releases> | ||
| <enabled>true</enabled> | ||
| </releases> | ||
| <snapshots> | ||
| <enabled>false</enabled> | ||
| </snapshots> | ||
| </repository> | ||
| <!-- Fall back to Maven upstream for packages not found in GCS mirror --> | ||
| <repository> | ||
| <id>central</id> | ||
| <name>Maven Central</name> | ||
| <url>https://repo.maven.apache.org/maven2</url> | ||
| <releases> | ||
| <enabled>true</enabled> | ||
| </releases> | ||
| <snapshots> | ||
| <enabled>false</enabled> | ||
| </snapshots> | ||
| </repository> | ||
| </repositories> | ||
|
|
||
| <pluginRepositories> | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This configuration has to be duplicated, once for regular dependencies and once for plugins. |
||
| <!-- Prefer Google Cloud mirror, which has higher rate limits --> | ||
| <pluginRepository> | ||
| <id>gcs-maven-central-mirror</id> | ||
| <name>GCS Maven Central mirror</name> | ||
| <url>https://maven-central.storage-download.googleapis.com/maven2/</url> | ||
| <releases> | ||
| <enabled>true</enabled> | ||
| </releases> | ||
| <snapshots> | ||
| <enabled>false</enabled> | ||
| </snapshots> | ||
| </pluginRepository> | ||
| <!-- Fall back to Maven upstream for packages not found in GCS mirror --> | ||
| <pluginRepository> | ||
| <id>central</id> | ||
| <name>Maven Plugin Repository</name> | ||
| <url>https://repo.maven.apache.org/maven2</url> | ||
| <releases> | ||
| <enabled>true</enabled> | ||
| </releases> | ||
| <snapshots> | ||
| <enabled>false</enabled> | ||
| </snapshots> | ||
| </pluginRepository> | ||
| </pluginRepositories> | ||
|
|
||
| <dependencies> | ||
|
|
||
|
|
@@ -204,17 +248,6 @@ | |
| </execution> | ||
| </executions> | ||
| </plugin> | ||
| <plugin> | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
It also will try to download and check any dependencies for any stage that have That's why the original build failures we saw mentioned this We can just remove this... the release process for curl \
-XPOST \
-F bundle=@com.nvidia.cuvs:cuvs-java:26.06.0.zip \
https://central.sonatype.com/api/v1/publisher/uploadAs described at https://central.sonatype.org/publish/publish-portal-api/#uploading-a-deployment-bundle (publishing code is private, but can link offline for reviewers) |
||
| <groupId>org.sonatype.plugins</groupId> | ||
| <artifactId>nexus-staging-maven-plugin</artifactId> | ||
| <version>1.6.7</version> | ||
| <extensions>true</extensions> | ||
| <configuration> | ||
| <serverId>ossrh</serverId> | ||
| <nexusUrl>https://oss.sonatype.org/</nexusUrl> | ||
| <autoReleaseAfterClose>false</autoReleaseAfterClose> | ||
| </configuration> | ||
| </plugin> | ||
| <plugin> | ||
| <groupId>com.diffplug.spotless</groupId> | ||
| <artifactId>spotless-maven-plugin</artifactId> | ||
|
|
@@ -416,5 +449,22 @@ | |
| </plugins> | ||
| </build> | ||
| </profile> | ||
| <profile> | ||
| <id>release</id> | ||
| <build> | ||
| <plugins> | ||
| <plugin> | ||
| <groupId>org.sonatype.central</groupId> | ||
| <artifactId>central-publishing-maven-plugin</artifactId> | ||
| <version>0.9.0</version> | ||
| <extensions>true</extensions> | ||
| <configuration> | ||
| <publishingServerId>central</publishingServerId> | ||
| <autoPublish>false</autoPublish> | ||
| </configuration> | ||
| </plugin> | ||
| </plugins> | ||
| </build> | ||
| </profile> | ||
| </profiles> | ||
| </project> | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All of these whitespace changes are intentional. I was reading these docs and found that all the lines being smooshed together made it slightly harder to find what I was looking for.
This can also prevent some renderers from formatting them correctly, see https://yihui.org/en/2021/06/markdown-breath/
Happy to revert these style changes if reviewers disagree with them.