From 690cc0c9f97f618b85cc234983960f212b7799a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Boutemy?= Date: Thu, 19 Jan 2023 08:53:48 +0100 Subject: [PATCH] replace generatedBy context value by template --- .../codehaus/modello/plugin/velocity/VelocityGenerator.java | 2 +- .../modello-plugin-velocity/src/site/xdoc/index.xml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modello-plugins/modello-plugin-velocity/src/main/java/org/codehaus/modello/plugin/velocity/VelocityGenerator.java b/modello-plugins/modello-plugin-velocity/src/main/java/org/codehaus/modello/plugin/velocity/VelocityGenerator.java index d47daae27..7007a9a72 100644 --- a/modello-plugins/modello-plugin-velocity/src/main/java/org/codehaus/modello/plugin/velocity/VelocityGenerator.java +++ b/modello-plugins/modello-plugin-velocity/src/main/java/org/codehaus/modello/plugin/velocity/VelocityGenerator.java @@ -82,7 +82,7 @@ public void generate( Model model, Properties parameters ) throws ModelloExcepti for ( String templatePath : templates.split( "," ) ) { Template template = velocity.getTemplate( templatePath ); - context.put( "generatedBy", "Generated by Modello Velocity from " + templatePath + " template, any modifications will be overwritten." ); + context.put( "template", templatePath ); try ( Writer w = new RedirectingWriter( Paths.get( output ) ) ) { diff --git a/modello-plugins/modello-plugin-velocity/src/site/xdoc/index.xml b/modello-plugins/modello-plugin-velocity/src/site/xdoc/index.xml index e260e5642..92e9595af 100644 --- a/modello-plugins/modello-plugin-velocity/src/site/xdoc/index.xml +++ b/modello-plugins/modello-plugin-velocity/src/site/xdoc/index.xml @@ -34,8 +34,8 @@ HelperHelper A helper tool with classical functions useful to generate content from a Modello model API. - generatedByString - "Generated by Modello Velocity from " + templatePath + " template, any modifications will be overwritten." + templateString + the template that is being evaluated.