Skip to content
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

Publishing Always Uses Local File System #37

Closed
michaelahlers opened this issue Sep 10, 2017 · 3 comments
Closed

Publishing Always Uses Local File System #37

michaelahlers opened this issue Sep 10, 2017 · 3 comments

Comments

@michaelahlers
Copy link

michaelahlers commented Sep 10, 2017

In a multi-project build, I'm attempting to publish artifacts from a subproject.

For the root project—which I don't want published—I've disabled using these settings (based on a comment from #29):

publishArtifact := false
publishTo := None
publish := {}
publishLocal := {}

For the subproject, I'm using:

publishMavenStyle := false
publishTo := Some("My Artifacts" at "s3://my-artifacts/")

The plugin is, of course, added to the project:

addSbtPlugin("com.frugalmechanic" % "fm-sbt-s3-resolver" % "0.12.0")

When publishing, I get this output:

sbt:my-project> sbt publish
[info] Loading global plugins from /Users/michaelahlers/.sbt/1.0/plugins
[info] Loading settings from plugins.sbt ...
[info] Loading project definition from /Users/michaelahlers/Projects/my-project/project
[info] Loading settings from build.sbt ...
[info] Set current project to my-project (in build file:/Users/michaelahlers/Projects/my-project/)
[info] Installing the s3:// URLStreamHandler via java.net.URL.setURLStreamHandlerFactory
[info] Using the existing Ivy URLHandlerDispatcher to handle s3:// URLs
[info] The s3:// URLStreamHandler is already installed
[info] Using the existing Ivy URLHandlerDispatcher to handle s3:// URLs
[info] :: delivering :: my-organization#my-subproject_2.12;1.0.0-SNAPSHOT :: 1.0.0-SNAPSHOT :: integration :: Sun Sep 10 14:55:08 MDT 2017
[info] 	delivering ivy file to /Users/michaelahlers/Projects/my-project/my-subproject/target/scala-2.12/ivy-1.0.0-SNAPSHOT.xml
[error] java.lang.UnsupportedOperationException: URL repository only support HTTP PUT at the moment
[error] 	at org.apache.ivy.util.url.BasicURLHandler.upload(BasicURLHandler.java:235)
[error] 	at org.apache.ivy.util.url.URLHandlerDispatcher.upload(URLHandlerDispatcher.java:82)
[error] 	at org.apache.ivy.util.FileUtil.copy(FileUtil.java:150)
[error] 	at org.apache.ivy.plugins.repository.url.URLRepository.put(URLRepository.java:84)
[error] 	at sbt.internal.librarymanagement.ConvertResolver$LocalIfFileRepo.put(ConvertResolver.scala:369)
[error] 	at org.apache.ivy.plugins.repository.AbstractRepository.put(AbstractRepository.java:130)
[error] 	at sbt.internal.librarymanagement.ConvertResolver$ChecksumFriendlyURLResolver.put(ConvertResolver.scala:121)
[error] 	at sbt.internal.librarymanagement.ConvertResolver$ChecksumFriendlyURLResolver.put$(ConvertResolver.scala:108)
[error] 	at sbt.internal.librarymanagement.ConvertResolver$$anonfun$defaultConvert$lzycompute$1$PluginCapableResolver$1.put(ConvertResolver.scala:168)
[error] 	at org.apache.ivy.plugins.resolver.RepositoryResolver.publish(RepositoryResolver.java:216)
[error] 	at sbt.internal.librarymanagement.IvyActions$.$anonfun$publish$5(IvyActions.scala:492)
[error] 	at sbt.internal.librarymanagement.IvyActions$.$anonfun$publish$5$adapted(IvyActions.scala:491)
…
[error] (my-subproject/*:publish) java.lang.UnsupportedOperationException: URL repository only support HTTP PUT at the moment

The publishTo setting is correct:

sbt:my-project> show publishTo 
[info] my-subproject/*:publishTo
[info] 	Some(My Artifacts: s3://my-artifacts)
[info] root/*:publishTo
[info] 	None

And the S3 resolver plugin is enabled:

sbt:my-project> plugins
In file:/Users/michaelahlers/Projects/my-project/
	…
	fm.sbt.S3ResolverPlugin: enabled in root, my-subproject
	…

Using SBT 1.0.1.

Is it trying to publish to the local file system (regardless my publishTo setting)? Any advice?

(Note the truncation, and anonymized identifiers where appropriate.)

@tpunder
Copy link
Owner

tpunder commented Nov 29, 2017

This looks like a dupe of #38 which is solved by upgrading to SBT 1.0.4.

See if that helps.

@tpunder
Copy link
Owner

tpunder commented Nov 29, 2017

Also, upgrade to version 0.13.0 which has a few SBT 1.0 related fixes:

addSbtPlugin("com.frugalmechanic" % "fm-sbt-s3-resolver" % "0.13.0")

@tpunder
Copy link
Owner

tpunder commented Jul 3, 2018

Please re-open if this is still an issue.

@tpunder tpunder closed this as completed Jul 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants