atais / sbt-eclipselink-static-weave

SBT plugin for EclipseLink Static Weaving

Version Matrix

sbt-eclipselink-static-weave license

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

  1. 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 access StaticWeaveProcessor.
    If you would like to override the EclipseLink version, specify it in plugins.sbt:

    libraryDependencies += "org.eclipse.persistence" % "org.eclipse.persistence.jpa" % "<version>"
  2. Activate the plugin in your project:

  3. 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 ...


persistenceXmlLocation: String

Location of your persistence.xml. Make sure this file is copied into classes folder before weaving.
default: "META-INF/persistence.xml"

staticWeaverLogLevel: Int

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

weavedClassesDest: File

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",