This SBuild plugin provides targets to deploy artifacts with the Maven. E.g. you can use it to deploy to Nexus OSS.
SBuild Maven Deploy Plugin can be downloaded from Maven Central.
To include it in you SBuild buildfile use the @classpath
annotation:
@classpath("mvn:org.sbuild:org.sbuild.plugins.mavendeploy:0.1.0")
git clone https://github.com/SBuild-org/maven-deploy.git cd sbuild-sbuild-plugin/org.sbuild.plugins.mavendeploy sbuild all
You will find the built jar in the directory org.sbuild.plugins.mavendeploy/target
.
All configurable properties are documented via ScalaDoc. See file MavenDeploy
.
import de.tototec.sbuild._
@version("0.7.1")
@classpath("mvn:org.sbuild:org.sbuild.plugins.mavendeploy:0.1.0")
class SBuild(implicit _project: Project) {
import org.sbuild.plugins.mavendeploy._
Plugin[MavenDeploy] configure { _.copy(
groupId = "org.example",
artifactId = "hello",
version = "1.0.0",
repository = Repository(id = "nexus", url = "http:://nexus.my-company.local/repo"),
files = Map(
"jar" -> "target/hello-1.0.0.jar",
"sources" -> "target/hello-1.0.0-sources.jar"
)
)}
}
bash$ sbuild -l
To deploy the artifacts use the maven-deploy
target. It is essential, to run sbuild with the -j 1
option, as the targets are interactive and require user input.