0

There are 2 questions,

  1. I defined publishTo with a resolver "abc", which is not in the external ivysettings.xml. When I do the publish, sbt complains resolver "abc" is undefined.

  2. I defined an artifact, which is a zipped package, to be published, and the corresponding settings are as follows,

    val ZIP = Configurations.config("app") val artifact = SettingKey[Artifact]("artifact") val pack = TaskKey[File]("pack") val settings = Seq(artifact := Artifact(name.value, "zip", "zip", Some("app"), List(ZIP), None)) ++ addArtifact(artifact, pack).settings

It works pretty well when dependencies are managed by sbt itself, but totally cannot work (meaning the local publish just ignores publish of this artifact) if they are managed by ivy. How can I get over these?

Seems like the custom artifact settings does not work only if they are imported with an auto plugin, is it a bug or am I missing something?

Sheng
  • 1,697
  • 4
  • 19
  • 33

1 Answers1

0

thanks to this post: How can a default task be overridden from an AutoPlugin?

so the artifacts settings must be introduced after sbt's own plugins are imported, otherwise it'd be overwritten.

Community
  • 1
  • 1
Sheng
  • 1,697
  • 4
  • 19
  • 33