Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions java/cuvs-java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@

<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The 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

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The 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.

<id>central</id>
<url>https://central.sonatype.com/repository/maven-snapshots/</url>
</snapshotRepository>
</distributionManagement>

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The 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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The 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

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).

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The 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.


Expand Down Expand Up @@ -205,14 +205,13 @@
</executions>
</plugin>
<plugin>

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mvn verify attempts to download any dependencies involved in the build "lifecycle" up to but not including deploy (https://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html#usual-command-line-calls).

It also will try to download and check any dependencies for any stage that have <extensions>true</extensions>.

That's why the original build failures we saw mentioned this nexus-staging-maven-plugin package.

We can just remove this... the release process for cuvs-java doesn't use mvn deploy, it directly hits the Sonatype API with a command similar to this:

curl \
  -XPOST \
  -F bundle=@com.nvidia.cuvs:cuvs-java:26.06.0.zip \
  https://central.sonatype.com/api/v1/publisher/upload

As 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>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seeing a similar error:

[INFO] Scanning for projects...
Downloading from central: https://repo.maven.apache.org/maven2/org/sonatype/central/central-publishing-maven-plugin/0.9.0/central-publishing-maven-plugin-0.9.0.pom
Error: ] Some problems were encountered while processing the POMs:
Error:  Unresolveable build extension: Plugin org.sonatype.central:central-publishing-maven-plugin:0.9.0 or one of its dependencies could not be resolved:
	Failed to read artifact descriptor for org.sonatype.central:central-publishing-maven-plugin:jar:0.9.0
 @ 
 @ 
Error:  The build could not read 1 project -> [Help 1]
Error:    
Error:    The project com.nvidia.cuvs:cuvs-java:26.08.0 (/__w/cuvs/cuvs/java/cuvs-java/pom.xml) has 1 error
Error:      Unresolveable build extension: Plugin org.sonatype.central:central-publishing-maven-plugin:0.9.0 or one of its dependencies could not be resolved:
Error:      	Failed to read artifact descriptor for org.sonatype.central:central-publishing-maven-plugin:jar:0.9.0
Error:      -> [Help 2]
Error:  
Error:  To see the full stack trace of the errors, re-run Maven with the -e switch.
Error:  Re-run Maven using the -X switch to enable full debug logging.
Error:  
Error:  For more information about the errors and possible solutions, please read the following articles:
Error:  [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
Error:  [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/PluginManagerException

https://github.com/rapidsai/cuvs/actions/runs/27970909678/job/82782494961?pr=2253

Makes me think that maybe there's something else happening here, like maybe an SSL error downloading stuff from one of the package repositories or something. Will try re-running with more verbose logs.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Debug logs show the real problem... the package repository is responding with 429s. We're getting rate-limited.

Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: The following artifacts could not be resolved: org.sonatype.central:central-publishing-maven-plugin:pom:0.9.0 (absent): Could not transfer artifact org.sonatype.central:central-publishing-maven-plugin:pom:0.9.0 from/to central (https://repo.maven.apache.org/maven2): status code: 429, reason phrase: Too Many Requests (429)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve (DefaultArtifactResolver.java:474)

https://github.com/rapidsai/cuvs/actions/runs/27974250285/job/82792307295?pr=2253#step:13:5175

This would also explain why we OFTEN but not ALWAYS see this issue in cuvs / cuvs-lucene CI!

We should probably keep the -e option to mvn so errors like this aren't swallowed in the future. Seeing that traceback would have saved a lot of time here.

<version>0.9.0</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>false</autoReleaseAfterClose>
<publishingServerId>central</publishingServerId>
<autoPublish>false</autoPublish>
</configuration>
</plugin>
<plugin>
Expand Down
Loading