This SBuild Plugin adds support to create JAR archives.
SBuild Jar 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.jar:0.0.9000")
You need a recent version of SBuild.
git clone https://github.com/SBuild-org/sbuild-jar-plugin.git cd sbuild-sbuild-plugin/org.sbuild.plugins.jar sbuild all
You will find the built jar in the directory org.sbuild.plugins.jar/target
.
All configurable properties are documented via ScalaDoc. See file Jar.scala
.
In it’s default configuration, this plugin will provides a file target producing the JAR file and a phony target jar
, which is a placeholder to that file target.
In non-default plugin instances with a name other than ""
or "main"
, no extra phony target will be created.
You can always overwrite the creation of the additional phony target with the Jar.phonyTarget
property.