SBT plugin for EclipseLink Static Weaving.
Greatly inspired on eclipselink-staticweave-maven-plugin
You can find the sbt-eclipselink-static-weave
plugin on Maven Central
-
Add the plugin dependency to your
plugins.sbt
:addSbtPlugin("com.github.atais" % "sbt-eclipselink-static-weave" % "0.1.2")
By default EclipseLink
2.5.1
is used by the plugin to accessStaticWeaveProcessor
.
If you would like to override the EclipseLink version, specify it inplugins.sbt
:libraryDependencies += "org.eclipse.persistence" % "org.eclipse.persistence.jpa" % "<version>"
-
Activate the plugin in your project:
enablePlugins(EclipseLinkStaticWeaver)
-
Enjoy, your should notice weaving step during your build:
[info] Done compiling. [info] Starting EclipseLink static weaving... [info] Finished EclipseLink static weaving in 23345 ms. [info] Packaging ...
Location of your persistence.xml
.
Make sure this file is copied into classes
folder before weaving.
default: "META-INF/persistence.xml"
Defines Eclipselink logging levels (that are used throughout EclipseLink code) with the following integer values:
- all - 0
- finest - 1
- finer - 2
- fine - 3
- config - 4
- info - 5
- warning - 6
- severe - 7
- off - 8
default: 5
Location into which weaved classes are saved. Also, it is a source for jar
file building.
default: crossTarget.value / "classes-weaved"
sbt release
prepare file sonatype.sbt
in ~/.sbt/1.0/
with content:
credentials += Credentials("Sonatype Nexus Repository Manager",
"oss.sonatype.org",
USERNAME,
PASSWORD)