A Maven plugin to use GString templating
Switch branches/tags
Nothing to show
Clone or download
Failed to load latest commit information.
gstring-maven-plugin Next version stream is 1.2.0 Jun 17, 2014
README.md Next version stream is 1.2.0 Jun 17, 2014



What does it does?

This plugin is meant to allow you to use Groovy GString template mechanism during your Maven build simply by executing a plugin. Templating with GString is one of the simplest and more powerful way to do templating for Java developers. See

Big advantage of GStrings over simple pattern replacement/filtering (like the one provided by maven-resource-plugin), is that GString allow you to make branching, conditional values, and everthing else Groovy allows you to do.

How does it work?

Here is an example usage of how to use the gstring-maven-plugin

Given a template named 'results.html' with the content:

Hello ${place} !
Hello ${place.toUpperCase()} !
<% /* define closures */ upper = { arg -> arg.toUpperCase() + " (from a closure)" } %>
Hello ${upper place} !

In your pom.xml:


This will create ${project.build.directory}/results.html that contains

Hello world !
Hello WORLD !

Hello WORLD (from a closure) !

You can either re-build it locally, or consume it directly from JBoss Nexus:

			<name>JBoss Releases Maven Repository</name>
			<name>JBoss Snapshots Repository</name>


A Google Group is used as a mailing-list: https://groups.google.com/forum/#!forum/gstring-maven-plugin


It's EPL


Fork it, submit issues and pull requests.