Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what does pomOnly() do in .sbt files?

what does pomOnly() do in .sbt files?

For example,

"com.github.fommil.netlib" % "all" % "1.0" pomOnly()
like image 302
Won Jun Bae Avatar asked Aug 10 '17 08:08

Won Jun Bae


People also ask

What are library dependencies in SBT?

Library dependencies can be added in two ways: unmanaged dependencies are jars dropped into the lib directory. managed dependencies are configured in the build definition and downloaded automatically from repositories.

What is Ivy in SBT?

Apache Ivy is a transitive package manager. It is a sub-project of the Apache Ant project, with which Ivy works to resolve project dependencies. An external XML file defines project dependencies and lists the resources necessary to build a project.

Where are SBT dependencies stored?

All new SBT versions (after 0.7. x ) by default put the downloaded JARS into the . ivy2 directory in your home directory. If you are using Linux, this is usually /home/<username>/.

Does SBT use ivy?

By default, sbt uses the standard Ivy home directory location ${user.


1 Answers

Indeed, SBT reference guide does not seem to provide much info about pomOnly().

As per mvnrepository, the dependency "com.github.fommil.netlib:all" corresponds to an aggregate pom.xml:

<dependency>
  <groupId>com.github.fommil.netlib</groupId>
  <artifactId>all</artifactId>
  <version>1.0</version>
  <type>pom</type>
</dependency>

The call of pomOnly() in build.sbt indicates to the dependency management handlers that they should not look for jar libs/artifacts for this dependency, but only load the metadata from the aggregate pom.

like image 199
Antot Avatar answered Oct 18 '22 09:10

Antot