Maven plugin for baking and serving sites with JBake and Jetty.
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

JBake Maven Plugin

Maven plugin for baking and serving sites with JBake and Jetty.

Add jbake-maven-plugin to build section in POM:


Baking is done during phase process-resources by default.



Will bake the site once.

mvn jbake:bake


Will bake the site and watch for changes in source, baking again on any change.

mvn jbake:watch


Will bake the site, watch for changes in source (baking again on any change) and serve the site with Jetty.

mvn jbake:serve


parameter default goals description
source src/main/jbake all The source directory where assets, content templates and are stored.
Parameter is passed to JBake Oven.
destination target/jbake all The destination directory where the baked site is written to.
Parameter is passed to JBake Oven.
clearCache true all The local cache is cleared when true.
Parameter is passed to JBake Oven.
cleanDestination true watch, serve All files in destination directory are removed when true before baking. This prevents orphaned files, but requires a full bake (see local cache).
failOnError true all Breaks the build when true and errors occur during baking in JBake Oven.
port 8080 serve The HTTP port Jetty is listening on.
Parameter is passed to Jetty Server.

All parameters can be set on command line with prefix jbake as usual, e.g.:

mvn jbake:serve -Djbake.source=src/main/resources -Djbake.destination=target/site -Djbake.port=8181

For details see JBake's documentation.