From 7b79de4ebe6cb3d114f740227715251645632535 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 c5010c1cb..219b6ba03 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 @@ -84,7 +84,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 0c4674588..df3885287 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.