Tasks for managing Nexus server from SBT.
Add the following to your project/plugins.sbt:
resolvers += Opts.resolver.sonatypeSnapshots
addSbtPlugin("com.github.eldis" % "sbt-nexus-tasks" % "0.1.0-SNAPSHOT")Add the following to your build.sbt:
import sbtnexustasks._
enablePlugins(SbtNexusTasksPlugin)
nexusSettings in ThisBuild := Some(NexusSettings(
url("http://nexus.example.com/nexus"),
NexusCredentials("user", "pass1234")
))
nexusExpireProxyCacheArgs in ThisBuild := Some(ExpireProxyCacheArgs(
Domain.Group,
"my_repository_group"
))
An alternative to SBT config is passing JVM system properties. This can be useful in CI scripts:
sbt -Dnexustasks.url=http://nexus.example.com/nexus \
-Dnexustasks.username=user \
-Dnexustasks.password=pass1234 \
-Dnexustasks.domain=group \
-Dnexustasks.target=my_repository_group
Expires the cache on Nexus Proxy repository corresponding to the current module.
It's sometimes useful to trigger it automatically on publish:
publish := {
nexusExpireProxyCache.in(Compile)
.dependsOn(publish).value
}The MIT License (MIT). Please see License File for more information.