2

I'm trying to publish artifacts to an SFTP resolver. After some initial struggle, the following configuration works fine:

publishTo := Some(Resolver.sftp("foo-resolver", "domain", 22, "path/to/repo")
  .as("me", new java.io.File("path/to/key")))

The issue I'm having is that this doesn't create or update the maven-metadata.xml file, even though I've enabled the maven resolver plugin (addMavenResolverPlugin).

I feel the problem is linked to the SFTP resolver, since replacing my publishTo as follows will create / update maven-metadata.xml:

publishTo := Some("foo-resolver" at "file:////path/to/some/local/folder")

Is there some limitation inherent to the SFTP resolver? I couldn't find any hint of this in the documentation - if anything, the 0.13.8 release notes (http://notes.implicit.ly/post/114141158904/sbt-0138) seem to imply it should work:

Additionally, sbt will now be able to fully construct maven-metadata.xml files when publishing to remote repositories

I'm using SBT 0.13.13.

carlspring
  • 31,231
  • 29
  • 115
  • 197
Nicolas Rinaudo
  • 6,068
  • 28
  • 41

1 Answers1

0

I have encountered the same issue while trying to publish my jar to the AWS codeartifact.

Adding the plugin sbt-maven-resolver to the plugins.sbt fixed the issue :

addSbtPlugin("org.scala-sbt" % "sbt-maven-resolver" % "0.1.0")

when you run sbt assembly after adding the plugin, the maven-metadata.xml file will be created (which solves the problem)

mahmoud mehdi
  • 1,493
  • 1
  • 19
  • 28