[2.x] feat: Ivyless publish to Ivy repo#8686
Merged
eed3si9n merged 7 commits intosbt:developfrom Feb 4, 2026
Merged
Conversation
Implements ivyless publish task as part of sbt#7639 (drop Ivy dependency). Fixes sbt#8639. - Add ivylessPublish for URLRepository: HTTP PUT with optional Basic auth, same layout as ivyless publishLocal (artifacts + ivy.xml + checksums). - Add ivylessPublishToFile for FileRepository: write to local path for testing without HTTP server. - Add ivylessPublishTask: when useIvy is false, use ivyless path for URLRepository or FileRepository; otherwise use Ivy. - Wire publish in Defaults to LibraryManagement.ivylessPublishTask (tagged Publish, Network). - Add scripted test dependency-management/ivyless-publish using Resolver.file to verify ivyless publish produces identical layout. Credentials supported via allCredentials (Basic auth for PUT).
Per issue sbt#8639: scripted test where an HTTP server accepts PUT to repo directory and publish uses ivyless publisher to upload via HTTP. - project/HttpPutServer.scala: minimal JDK HttpServer that handles PUT and writes request body to baseDir/path (repo directory). - publishTo := Resolver.url(..., http://localhost:3030)(ivyStylePatterns) with allowInsecureProtocol for localhost. - publishToHttp task: start server, run publish, stop server. - test: cleanPublishRepo, publishToHttp, checkIvylessPublish.
- Format LibraryManagement.scala with scalafmt - Add PatternsBasedRepository branch for scripted classloader - Write ivy.xml first in ivylessPublishLocal for consistent layout
The slash in optional patterns like (scala_[scalaVersion]/) is inside the parentheses, not outside. Change regex from \\)/ to /\\) to correctly strip these patterns from artifact URLs. Fixes dependency-management/ivyless-publish-http test.
Contributor
Author
|
@eed3si9n Please check the pr and give me the result. |
eed3si9n
reviewed
Feb 4, 2026
eed3si9n
reviewed
Feb 4, 2026
Contributor
Author
|
@eed3si9n Would you check the update again? |
Contributor
Author
|
@eed3si9n If you want to edit the pr description, I would like you to edit it before you merge. Because it's related to my score. Thanks for your quick approval!!! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ivy-less publish to HTTP (issue #8639)
Summary
Adds a scripted test for ivy-less publish over HTTP. The existing
ivyless-publishtest only covers publishing to a file resolver; this test verifies that ivy-less publish works when the destination is an HTTP URL (PUT to a repo).Changes
ivyless-publish-http: Runs a local HTTP server that accepts PUT requests to a repo directory, runspublish, then asserts the published layout (jars, poms, ivys, checksums) matches the expected ivy-style structure.build.sbt: Usesjava.net.URLexplicitly forResolver.url(...)because in build.sbt the literalurlissbt.URI;Resolver.urlexpectsjava.net.URL.How to verify
Run the scripted test:
sbt "scripted dependency-management/ivyless-publish-http"Related
Closes #8639