@Component(role = ModelWriter.class, hint = "clojure")
public class ClojureModelWriter extends ModelWriterSupport {
public void write(Writer writer, Map<String, Object> stringObjectMap, Model model) throws IOException {
try {
final Var REQUIRE = Var.intern(RT.CLOJURE_NS, Symbol.create("require"));
final Symbol REFLECTOR = Symbol.create("org.sonatype.maven.polyglot.clojure.dsl.writer");
REQUIRE.invoke(REFLECTOR);
final Var WRITER = Var.intern(Namespace.findOrCreate(REFLECTOR), Symbol.create("write-model"));
WRITER.invoke(model, writer);
} catch (Exception e) {
e.printStackTrace();
// Don't use new IOException(e) because it doesn't exist in Java 5
throw (IOException) new IOException(e.toString()).initCause(e);
}