I am able to build one of my multi-project's jars as a single jar and then publish it How do I publish a fat JAR (JAR with dependencies) using sbt and sbt-release?

However, the associated pom.xml is not published with it.

How can I create and publish the pom.xml (and ivy file) descriptors for an sbt-assembly jar?

My project is lions-share.

有帮助吗?

解决方案

Do you need to publish the contents of an existing pom.xml file, or can you let sbt generate the pom's contents for you? If the latter, consider using pomExtra:

pomExtra := (
  <url>http://jsuereth.com/scala-arm</url>
  <licenses>
    <license>
      <name>BSD-style</name>
      <url>http://www.opensource.org/licenses/bsd-license.php</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <scm>
    <url>git@github.com:jsuereth/scala-arm.git</url>
    <connection>scm:git:git@github.com:jsuereth/scala-arm.git</connection>
  </scm>
  <developers>
    <developer>
      <id>jsuereth</id>
      <name>Josh Suereth</name>
      <url>http://jsuereth.com</url>
    </developer>
  </developers>)

其他提示

If you are making your fat jar via sbt clean assembly and want to include .pom with the jar, use sbt clean makePom assembly. This will automatically create the .pom file with the .jar file

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top