what does pomOnly() do in .sbt files?
For example,
"com.github.fommil.netlib" % "all" % "1.0" pomOnly()
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.
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.
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>/.
By default, sbt uses the standard Ivy home directory location ${user.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With